diff options
author | John Reck <jreck@google.com> | 2015-05-27 17:39:17 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-05-27 17:39:18 +0000 |
commit | 302abd22468367bcdeb1f85ea8014fe05ed95610 (patch) | |
tree | 293b9ffe0fd0159931e39e9867bd36a393040ad1 /libs | |
parent | 165229ba417fd77ccbb4feb3bc3c664d2cac7ce5 (diff) | |
parent | 4cd44f8110c3b648a7eeb526152b2a50e0a376a1 (diff) | |
download | frameworks_base-302abd22468367bcdeb1f85ea8014fe05ed95610.zip frameworks_base-302abd22468367bcdeb1f85ea8014fe05ed95610.tar.gz frameworks_base-302abd22468367bcdeb1f85ea8014fe05ed95610.tar.bz2 |
Merge "Enable swapBuffersWithDamage by default" into mnc-dev
Diffstat (limited to 'libs')
-rw-r--r-- | libs/hwui/Properties.cpp | 4 | ||||
-rw-r--r-- | libs/hwui/renderthread/EglManager.cpp | 7 |
2 files changed, 3 insertions, 8 deletions
diff --git a/libs/hwui/Properties.cpp b/libs/hwui/Properties.cpp index 723a177..7dbe3b7 100644 --- a/libs/hwui/Properties.cpp +++ b/libs/hwui/Properties.cpp @@ -29,7 +29,7 @@ bool Properties::debugLayersUpdates = false; bool Properties::debugOverdraw = false; bool Properties::showDirtyRegions = false; bool Properties::skipEmptyFrames = true; -bool Properties::swapBuffersWithDamage = false; +bool Properties::swapBuffersWithDamage = true; DebugLevel Properties::debugLevel = kDebugDisabled; OverdrawColorSet Properties::overdrawColorSet = OverdrawColorSet::Default; @@ -104,7 +104,7 @@ bool Properties::load() { } skipEmptyFrames = property_get_bool(PROPERTY_SKIP_EMPTY_DAMAGE, true); - swapBuffersWithDamage = property_get_bool(PROPERTY_SWAP_WITH_DAMAGE, false); + swapBuffersWithDamage = property_get_bool(PROPERTY_SWAP_WITH_DAMAGE, true); return (prevDebugLayersUpdates != debugLayersUpdates) || (prevDebugOverdraw != debugOverdraw) diff --git a/libs/hwui/renderthread/EglManager.cpp b/libs/hwui/renderthread/EglManager.cpp index c0e7c73..cb34e00 100644 --- a/libs/hwui/renderthread/EglManager.cpp +++ b/libs/hwui/renderthread/EglManager.cpp @@ -256,7 +256,7 @@ bool EglManager::swapBuffers(EGLSurface surface, const SkRect& dirty, #endif #ifdef EGL_KHR_swap_buffers_with_damage - if (CC_UNLIKELY(Properties::swapBuffersWithDamage)) { + if (CC_LIKELY(Properties::swapBuffersWithDamage)) { SkIRect idirty; dirty.roundOut(&idirty); /* @@ -273,11 +273,6 @@ bool EglManager::swapBuffers(EGLSurface surface, const SkRect& dirty, // layout: {x, y, width, height} EGLint rects[4] = { idirty.x(), y, idirty.width(), idirty.height() }; EGLint numrects = dirty.isEmpty() ? 0 : 1; - // TODO: Remove prior to enabling this path by default - ALOGD("Swap buffers with damage %d: %d, %d, %d, %d (src=" - RECT_STRING ")", - dirty.isEmpty() ? 0 : 1, rects[0], rects[1], rects[2], rects[3], - SK_RECT_ARGS(dirty)); eglSwapBuffersWithDamageKHR(mEglDisplay, surface, rects, numrects); } else { eglSwapBuffers(mEglDisplay, surface); |