diff options
Diffstat (limited to 'core/jni/android/graphics/Paint.cpp')
-rw-r--r-- | core/jni/android/graphics/Paint.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/core/jni/android/graphics/Paint.cpp b/core/jni/android/graphics/Paint.cpp index ca9f371..339c1a4 100644 --- a/core/jni/android/graphics/Paint.cpp +++ b/core/jni/android/graphics/Paint.cpp @@ -15,11 +15,6 @@ ** limitations under the License. */ -// This file was generated from the C++ include file: SkPaint.h -// Any changes made to this file will be discarded by the build. -// To change this file, either edit the include, or device/tools/gluemaker/main.cpp, -// or one of the auxilary file specifications in device/tools/gluemaker. - #include "jni.h" #include "GraphicsJNI.h" #include <android_runtime/AndroidRuntime.h> @@ -35,6 +30,7 @@ #include "TextLayout.h" // temporary for debugging +#include <Caches.h> #include <utils/Log.h> namespace android { @@ -67,7 +63,13 @@ public: }; static void finalizer(JNIEnv* env, jobject clazz, SkPaint* obj) { +#ifdef USE_OPENGL_RENDERER + if (android::uirenderer::Caches::hasInstance()) { + android::uirenderer::Caches::getInstance().resourceCache.destructor(obj); + } +#else // !USE_OPENGL_RENDERER delete obj; +#endif } static SkPaint* init(JNIEnv* env, jobject clazz) { |