diff options
author | Mathias Agopian <mathias@google.com> | 2009-06-29 18:53:53 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2009-06-29 18:57:42 -0700 |
commit | 3a6b160a3b52cd96fb383d5ee93c22e5e938e0e2 (patch) | |
tree | 69e19f9d77d76bf37857cf1aeb2ace21919d84da /libs/surfaceflinger/DisplayHardware | |
parent | ecfa7ccd4fc3066a4cfd4d84d7de286d95581c78 (diff) | |
download | frameworks_base-3a6b160a3b52cd96fb383d5ee93c22e5e938e0e2.zip frameworks_base-3a6b160a3b52cd96fb383d5ee93c22e5e938e0e2.tar.gz frameworks_base-3a6b160a3b52cd96fb383d5ee93c22e5e938e0e2.tar.bz2 |
when there is a choice between UPDATE_ON_DEMAND and SWAP_BUFFER optimizations, choose UPDATE_ON_DEMAND which is often more efficient.
Diffstat (limited to 'libs/surfaceflinger/DisplayHardware')
-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; |