diff options
author | Mathias Agopian <mathias@google.com> | 2012-09-24 18:12:35 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2012-09-24 18:12:35 -0700 |
commit | 2a23184e4109060ec772763e80dae2132cf9d2eb (patch) | |
tree | 5030865b9fea392e2e009a6c6da95c61f4534a29 /services | |
parent | 52e21483fa48baeb4a88372d75e083bca2e92923 (diff) | |
download | frameworks_native-2a23184e4109060ec772763e80dae2132cf9d2eb.zip frameworks_native-2a23184e4109060ec772763e80dae2132cf9d2eb.tar.gz frameworks_native-2a23184e4109060ec772763e80dae2132cf9d2eb.tar.bz2 |
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
Diffstat (limited to 'services')
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 8372691..bc7552d 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -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(); } |