diff options
Diffstat (limited to 'core/jni')
-rwxr-xr-x | core/jni/android/graphics/Bitmap.cpp | 10 | ||||
-rw-r--r-- | core/jni/android/graphics/NinePatch.cpp | 6 | ||||
-rw-r--r-- | core/jni/android/graphics/Path.cpp | 6 | ||||
-rw-r--r-- | core/jni/android_os_Debug.cpp | 8 | ||||
-rw-r--r-- | core/jni/android_view_GLES20Canvas.cpp | 2 | ||||
-rw-r--r-- | core/jni/android_view_HardwareLayer.cpp | 7 |
6 files changed, 19 insertions, 20 deletions
diff --git a/core/jni/android/graphics/Bitmap.cpp b/core/jni/android/graphics/Bitmap.cpp index 70cf9a8..d7eef6e 100755 --- a/core/jni/android/graphics/Bitmap.cpp +++ b/core/jni/android/graphics/Bitmap.cpp @@ -17,7 +17,7 @@ #include <jni.h> -#include <Caches.h> +#include <ResourceCache.h> #if 0 #define TRACE_BITMAP(code) code @@ -365,8 +365,8 @@ static jobject Bitmap_copy(JNIEnv* env, jobject, jlong srcHandle, static void Bitmap_destructor(JNIEnv* env, jobject, jlong bitmapHandle) { SkBitmap* bitmap = reinterpret_cast<SkBitmap*>(bitmapHandle); #ifdef USE_OPENGL_RENDERER - if (android::uirenderer::Caches::hasInstance()) { - android::uirenderer::Caches::getInstance().resourceCache.destructor(bitmap); + if (android::uirenderer::ResourceCache::hasInstance()) { + android::uirenderer::ResourceCache::getInstance().destructor(bitmap); return; } #endif // USE_OPENGL_RENDERER @@ -376,9 +376,9 @@ static void Bitmap_destructor(JNIEnv* env, jobject, jlong bitmapHandle) { static jboolean Bitmap_recycle(JNIEnv* env, jobject, jlong bitmapHandle) { SkBitmap* bitmap = reinterpret_cast<SkBitmap*>(bitmapHandle); #ifdef USE_OPENGL_RENDERER - if (android::uirenderer::Caches::hasInstance()) { + if (android::uirenderer::ResourceCache::hasInstance()) { bool result; - result = android::uirenderer::Caches::getInstance().resourceCache.recycle(bitmap); + result = android::uirenderer::ResourceCache::getInstance().recycle(bitmap); return result ? JNI_TRUE : JNI_FALSE; } #endif // USE_OPENGL_RENDERER diff --git a/core/jni/android/graphics/NinePatch.cpp b/core/jni/android/graphics/NinePatch.cpp index cf23771..be62fdd 100644 --- a/core/jni/android/graphics/NinePatch.cpp +++ b/core/jni/android/graphics/NinePatch.cpp @@ -21,7 +21,7 @@ #include <androidfw/ResourceTypes.h> #include <utils/Log.h> -#include <Caches.h> +#include <ResourceCache.h> #include "Paint.h" #include "Canvas.h" @@ -80,9 +80,9 @@ public: static void finalize(JNIEnv* env, jobject, jlong patchHandle) { int8_t* patch = reinterpret_cast<int8_t*>(patchHandle); #ifdef USE_OPENGL_RENDERER - if (android::uirenderer::Caches::hasInstance()) { + if (android::uirenderer::ResourceCache::hasInstance()) { Res_png_9patch* p = (Res_png_9patch*) patch; - android::uirenderer::Caches::getInstance().resourceCache.destructor(p); + android::uirenderer::ResourceCache::getInstance().destructor(p); return; } #endif // USE_OPENGL_RENDERER diff --git a/core/jni/android/graphics/Path.cpp b/core/jni/android/graphics/Path.cpp index 9d3e74b..30ce58d 100644 --- a/core/jni/android/graphics/Path.cpp +++ b/core/jni/android/graphics/Path.cpp @@ -27,7 +27,7 @@ #include "SkPath.h" #include "SkPathOps.h" -#include <Caches.h> +#include <ResourceCache.h> #include <vector> #include <map> @@ -39,8 +39,8 @@ public: static void finalizer(JNIEnv* env, jobject clazz, jlong objHandle) { SkPath* obj = reinterpret_cast<SkPath*>(objHandle); #ifdef USE_OPENGL_RENDERER - if (android::uirenderer::Caches::hasInstance()) { - android::uirenderer::Caches::getInstance().resourceCache.destructor(obj); + if (android::uirenderer::ResourceCache::hasInstance()) { + android::uirenderer::ResourceCache::getInstance().destructor(obj); return; } #endif diff --git a/core/jni/android_os_Debug.cpp b/core/jni/android_os_Debug.cpp index 9ec9993..178bab6 100644 --- a/core/jni/android_os_Debug.cpp +++ b/core/jni/android_os_Debug.cpp @@ -46,10 +46,12 @@ enum { HEAP_UNKNOWN, HEAP_DALVIK, HEAP_NATIVE, + HEAP_DALVIK_OTHER, HEAP_STACK, HEAP_CURSOR, HEAP_ASHMEM, + HEAP_GL_DEV, HEAP_UNKNOWN_DEV, HEAP_SO, HEAP_JAR, @@ -297,7 +299,11 @@ static void read_mapinfo(FILE *fp, stats_t* stats) } else if (strncmp(name, "[stack", 6) == 0) { whichHeap = HEAP_STACK; } else if (strncmp(name, "/dev/", 5) == 0) { - whichHeap = HEAP_UNKNOWN_DEV; + if (strncmp(name, "/dev/kgsl-3d0", 13) == 0) { + whichHeap = HEAP_GL_DEV; + } else { + whichHeap = HEAP_UNKNOWN_DEV; + } } else if (nameLen > 3 && strcmp(name+nameLen-3, ".so") == 0) { whichHeap = HEAP_SO; is_swappable = true; diff --git a/core/jni/android_view_GLES20Canvas.cpp b/core/jni/android_view_GLES20Canvas.cpp index 9bdc6b5..b023ebd 100644 --- a/core/jni/android_view_GLES20Canvas.cpp +++ b/core/jni/android_view_GLES20Canvas.cpp @@ -828,7 +828,7 @@ static jint android_view_GLES20Canvas_drawRenderNode(JNIEnv* env, static void android_view_GLES20Canvas_drawLayer(JNIEnv* env, jobject clazz, jlong rendererPtr, jlong layerPtr, jfloat x, jfloat y) { DisplayListRenderer* renderer = reinterpret_cast<DisplayListRenderer*>(rendererPtr); - Layer* layer = reinterpret_cast<Layer*>(layerPtr); + DeferredLayerUpdater* layer = reinterpret_cast<DeferredLayerUpdater*>(layerPtr); renderer->drawLayer(layer, x, y); } diff --git a/core/jni/android_view_HardwareLayer.cpp b/core/jni/android_view_HardwareLayer.cpp index aa674de..1ffff03 100644 --- a/core/jni/android_view_HardwareLayer.cpp +++ b/core/jni/android_view_HardwareLayer.cpp @@ -81,12 +81,6 @@ static void android_view_HardwareLayer_updateSurfaceTexture(JNIEnv* env, jobject layer->updateTexImage(); } -static jlong android_view_HardwareLayer_getLayer(JNIEnv* env, jobject clazz, - jlong layerUpdaterPtr) { - DeferredLayerUpdater* layer = reinterpret_cast<DeferredLayerUpdater*>(layerUpdaterPtr); - return reinterpret_cast<jlong>( layer->backingLayer() ); -} - static jint android_view_HardwareLayer_getTexName(JNIEnv* env, jobject clazz, jlong layerUpdaterPtr) { DeferredLayerUpdater* layer = reinterpret_cast<DeferredLayerUpdater*>(layerUpdaterPtr); @@ -111,7 +105,6 @@ static JNINativeMethod gMethods[] = { (void*) android_view_HardwareLayer_setSurfaceTexture }, { "nUpdateSurfaceTexture", "(J)V", (void*) android_view_HardwareLayer_updateSurfaceTexture }, - { "nGetLayer", "(J)J", (void*) android_view_HardwareLayer_getLayer }, { "nGetTexName", "(J)I", (void*) android_view_HardwareLayer_getTexName }, #endif }; |