am a6aca3e0: Merge change 25435 into eclair

Merge commit 'a6aca3e094719b181c9858aa57d6c2160c5cb16a' into eclair-plus-aosp

* commit 'a6aca3e094719b181c9858aa57d6c2160c5cb16a':
  disable backbuffer preservation when possible, which may improve performance a bit
This commit is contained in:
Mathias Agopian
2009-09-17 08:45:34 -07:00
committed by Android Git Automerger

View File

@@ -174,6 +174,13 @@ void DisplayHardware::init(uint32_t dpy)
surface = eglCreateWindowSurface(display, config, mNativeWindow.get(), NULL);
if (mFlags & UPDATE_ON_DEMAND) {
// if we have update on demand, we definitely don't need to
// preserve the backbuffer, which is usually costly.
eglSurfaceAttrib(display, surface,
EGL_SWAP_BEHAVIOR, EGL_BUFFER_DESTROYED);
}
if (eglQuerySurface(display, surface, EGL_SWAP_BEHAVIOR, &dummy) == EGL_TRUE) {
if (dummy == EGL_BUFFER_PRESERVED) {
mFlags |= BUFFER_PRESERVED;