don't call eglMakeCurrent() before calling HWC commit() on HWC 1.1

this call is not needed and misleading on HWC 1.1; it can also have
a negative performance impact when multiple displays are used.

Bug: 7124069
Change-Id: I47cd25c9d6e69abcc9333b9ecd5044e8fb1919ec
This commit is contained in:
Mathias Agopian 2012-09-24 18:12:35 -07:00
parent 52e21483fa
commit 2a23184e41

View File

@ -927,10 +927,13 @@ void SurfaceFlinger::postFramebuffer()
HWComposer& hwc(getHwComposer());
if (hwc.initCheck() == NO_ERROR) {
// FIXME: EGL spec says:
// "surface must be bound to the calling thread's current context,
// for the current rendering API."
DisplayDevice::makeCurrent(mEGLDisplay, getDefaultDisplayDevice(), mEGLContext);
if (!hwc.supportsFramebufferTarget()) {
// EGL spec says:
// "surface must be bound to the calling thread's current context,
// for the current rendering API."
DisplayDevice::makeCurrent(mEGLDisplay,
getDefaultDisplayDevice(), mEGLContext);
}
hwc.commit();
}