diff options
-rw-r--r-- | libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp b/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp index 3ce93c0..5c522c5 100644 --- a/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp +++ b/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp @@ -211,7 +211,12 @@ void DisplayHardware::init(uint32_t dpy) if (strstr(egl_extensions, "EGL_ANDROID_swap_rectangle")) { mFlags |= SWAP_RECTANGLE; } + // when we have the choice between UPDATE_ON_DEMAND and SWAP_RECTANGLE + // choose UPDATE_ON_DEMAND, which is more efficient + if (mFlags & UPDATE_ON_DEMAND) + mFlags &= ~SWAP_RECTANGLE; #endif + mDpiX = mNativeWindow->xdpi; mDpiX = mNativeWindow->ydpi; |