summaryrefslogtreecommitdiffstats
path: root/core/jni/android_view_Surface.cpp
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2014-10-23 11:02:19 -0700
committerJohn Reck <jreck@google.com>2014-10-23 13:59:47 -0700
commit1125d1fa92ab9f3b8315bbfb72e038b62dfd454b (patch)
treeb4a292e191bc815bb658355f879178706ed3f3e9 /core/jni/android_view_Surface.cpp
parent9b67a1a232dc0e1cda346271c3a9d118228001ee (diff)
downloadframeworks_base-1125d1fa92ab9f3b8315bbfb72e038b62dfd454b.zip
frameworks_base-1125d1fa92ab9f3b8315bbfb72e038b62dfd454b.tar.gz
frameworks_base-1125d1fa92ab9f3b8315bbfb72e038b62dfd454b.tar.bz2
Add some free zoom to lockHardwareCanvas
Bug: 18099195 Don't use EGL_SWAP_BUFFER_PRESERVED on surfaces that will never benefit. Also clean up some confusing naming Change-Id: I674ca64e0464a3282cff79e5ecd350d08f47c014
Diffstat (limited to 'core/jni/android_view_Surface.cpp')
-rw-r--r--core/jni/android_view_Surface.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/jni/android_view_Surface.cpp b/core/jni/android_view_Surface.cpp
index b3d9890..a0b2ca8 100644
--- a/core/jni/android_view_Surface.cpp
+++ b/core/jni/android_view_Surface.cpp
@@ -374,6 +374,7 @@ static jlong create(JNIEnv* env, jclass clazz, jlong rootNodePtr, jlong surfaceP
ContextFactory factory;
RenderProxy* proxy = new RenderProxy(false, rootNode, &factory);
proxy->loadSystemProperties();
+ proxy->setSwapBehavior(kSwap_discardBuffer);
proxy->initialize(surface);
// Shadows can't be used via this interface, so just set the light source
// to all 0s. (and width & height are unused, TODO remove them)