summaryrefslogtreecommitdiffstats
path: root/core/jni
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2015-05-05 21:30:08 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-05-05 21:30:08 +0000
commit356b1777092e7da3ac5eae0bc94bd21e1cf9319a (patch)
tree2036beb26312765c0dbba76f8409a8cc95bf39a3 /core/jni
parentd6abbd29b7f453397036cf602655534bbd6c0430 (diff)
parent2507c34d91bb0d722b6012e85cb47387b2aa6873 (diff)
downloadframeworks_base-356b1777092e7da3ac5eae0bc94bd21e1cf9319a.zip
frameworks_base-356b1777092e7da3ac5eae0bc94bd21e1cf9319a.tar.gz
frameworks_base-356b1777092e7da3ac5eae0bc94bd21e1cf9319a.tar.bz2
Merge "Cleanup properties" into mnc-dev
Diffstat (limited to 'core/jni')
-rw-r--r--core/jni/android_view_DisplayListCanvas.cpp20
-rw-r--r--core/jni/android_view_ThreadedRenderer.cpp10
2 files changed, 10 insertions, 20 deletions
diff --git a/core/jni/android_view_DisplayListCanvas.cpp b/core/jni/android_view_DisplayListCanvas.cpp
index 39449b0..bb8ef83 100644
--- a/core/jni/android_view_DisplayListCanvas.cpp
+++ b/core/jni/android_view_DisplayListCanvas.cpp
@@ -86,24 +86,6 @@ static void android_view_DisplayListCanvas_finish(JNIEnv* env, jobject clazz,
renderer->finish();
}
-static void android_view_DisplayListCanvas_setProperty(JNIEnv* env,
- jobject clazz, jstring name, jstring value) {
- if (!Caches::hasInstance()) {
- ALOGW("can't set property, no Caches instance");
- return;
- }
-
- if (name == NULL || value == NULL) {
- ALOGW("can't set prop, null passed");
- }
-
- const char* nameCharArray = env->GetStringUTFChars(name, NULL);
- const char* valueCharArray = env->GetStringUTFChars(value, NULL);
- Caches::getInstance().setTempProperty(nameCharArray, valueCharArray);
- env->ReleaseStringUTFChars(name, nameCharArray);
- env->ReleaseStringUTFChars(name, valueCharArray);
-}
-
// ----------------------------------------------------------------------------
// Functor
// ----------------------------------------------------------------------------
@@ -268,8 +250,6 @@ static JNINativeMethod gMethods[] = {
{ "nPrepare", "(J)V", (void*) android_view_DisplayListCanvas_prepare },
{ "nPrepareDirty", "(JIIII)V", (void*) android_view_DisplayListCanvas_prepareDirty },
{ "nFinish", "(J)V", (void*) android_view_DisplayListCanvas_finish },
- { "nSetProperty", "(Ljava/lang/String;Ljava/lang/String;)V",
- (void*) android_view_DisplayListCanvas_setProperty },
{ "nCallDrawGLFunction", "(JJ)V", (void*) android_view_DisplayListCanvas_callDrawGLFunction },
diff --git a/core/jni/android_view_ThreadedRenderer.cpp b/core/jni/android_view_ThreadedRenderer.cpp
index 4ccbb41..5d5465b 100644
--- a/core/jni/android_view_ThreadedRenderer.cpp
+++ b/core/jni/android_view_ThreadedRenderer.cpp
@@ -388,6 +388,15 @@ static void android_view_ThreadedRenderer_trimMemory(JNIEnv* env, jobject clazz,
RenderProxy::trimMemory(level);
}
+static void android_view_ThreadedRenderer_overrideProperty(JNIEnv* env, jobject clazz,
+ jstring name, jstring value) {
+ const char* nameCharArray = env->GetStringUTFChars(name, NULL);
+ const char* valueCharArray = env->GetStringUTFChars(value, NULL);
+ RenderProxy::overrideProperty(nameCharArray, valueCharArray);
+ env->ReleaseStringUTFChars(name, nameCharArray);
+ env->ReleaseStringUTFChars(name, valueCharArray);
+}
+
static void android_view_ThreadedRenderer_fence(JNIEnv* env, jobject clazz,
jlong proxyPtr) {
RenderProxy* proxy = reinterpret_cast<RenderProxy*>(proxyPtr);
@@ -466,6 +475,7 @@ static JNINativeMethod gMethods[] = {
{ "nDetachSurfaceTexture", "(JJ)V", (void*) android_view_ThreadedRenderer_detachSurfaceTexture },
{ "nDestroyHardwareResources", "(J)V", (void*) android_view_ThreadedRenderer_destroyHardwareResources },
{ "nTrimMemory", "(I)V", (void*) android_view_ThreadedRenderer_trimMemory },
+ { "nOverrideProperty", "(Ljava/lang/String;Ljava/lang/String;)V", (void*) android_view_ThreadedRenderer_overrideProperty },
{ "nFence", "(J)V", (void*) android_view_ThreadedRenderer_fence },
{ "nStopDrawing", "(J)V", (void*) android_view_ThreadedRenderer_stopDrawing },
{ "nNotifyFramePending", "(J)V", (void*) android_view_ThreadedRenderer_notifyFramePending },