when there is a choice between UPDATE_ON_DEMAND and SWAP_BUFFER optimizations, choose UPDATE_ON_DEMAND which is often more efficient.

This commit is contained in:
Mathias Agopian
2009-06-29 18:53:53 -07:00
parent ecfa7ccd4f
commit 3a6b160a3b

View File

@@ -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;