summaryrefslogtreecommitdiffstats
path: root/core/jni/android/graphics/Matrix.cpp
diff options
context:
space:
mode:
authorChet Haase <chet@google.com>2010-10-08 08:37:55 -0700
committerChet Haase <chet@google.com>2010-10-21 12:02:42 -0700
commit5c13d89c1332fcc499379b9064b891187b75ca32 (patch)
tree439222e6d58a765a84133345ac6ef7cb13f1c04e /core/jni/android/graphics/Matrix.cpp
parenta376d030a2075909219926d622b71016418d7dcd (diff)
downloadframeworks_base-5c13d89c1332fcc499379b9064b891187b75ca32.zip
frameworks_base-5c13d89c1332fcc499379b9064b891187b75ca32.tar.gz
frameworks_base-5c13d89c1332fcc499379b9064b891187b75ca32.tar.bz2
Optimizing display lists by referencing pointers to resources instead of copying them
Change-Id: I81ad3551d74aa1e5bb64d69e33d2eb29a6c1eb6a
Diffstat (limited to 'core/jni/android/graphics/Matrix.cpp')
-rw-r--r--core/jni/android/graphics/Matrix.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/core/jni/android/graphics/Matrix.cpp b/core/jni/android/graphics/Matrix.cpp
index cafceab..6667756 100644
--- a/core/jni/android/graphics/Matrix.cpp
+++ b/core/jni/android/graphics/Matrix.cpp
@@ -15,11 +15,6 @@
** limitations under the License.
*/
-// This file was generated from the C++ include file: SkMatrix.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>
@@ -29,13 +24,21 @@
#include "Matrix.h"
+#include <Caches.h>
+
namespace android {
class SkMatrixGlue {
public:
static void finalizer(JNIEnv* env, jobject clazz, SkMatrix* 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 SkMatrix* create(JNIEnv* env, jobject clazz, const SkMatrix* src) {