Bug 1157109 - Call eglSwapBuffers() when hwc does not exit r=mwu
authorSotaro Ikeda <sotaro.ikeda.g@gmail.com>
Thu, 26 Nov 2015 01:21:15 -0800
changeset 308444 e2d0fd2b8d177b3ede37702a2d22ce7cb33f336a
parent 308443 298051dbb67c18d7f3d338e8c9ed694f9ae2996e
child 308445 ddd566eb39b7a39d0ff630343f179fedc8fcafd5
push id5513
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 13:55:34 +0000
treeherdermozilla-beta@5ee97dd05b5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmwu
bugs1157109
milestone45.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1157109 - Call eglSwapBuffers() when hwc does not exit r=mwu
widget/gonk/libdisplay/GonkDisplayICS.cpp
--- a/widget/gonk/libdisplay/GonkDisplayICS.cpp
+++ b/widget/gonk/libdisplay/GonkDisplayICS.cpp
@@ -166,16 +166,19 @@ GonkDisplayICS::GetHWCDevice()
 bool
 GonkDisplayICS::SwapBuffers(EGLDisplay dpy, EGLSurface sur)
 {
     // Should be called when composition rendering is complete for a frame.
     // Only HWC v1.0 needs this call. ICS gonk always needs the call.
     mFBSurface->compositionComplete();
 
     if (!mHwc) {
+        if (sur != EGL_NO_SURFACE) {
+            return eglSwapBuffers(dpy, sur);
+        }
         return true;
     }
 
     mHwc->prepare(mHwc, nullptr);
     return !mHwc->set(mHwc, dpy, sur, 0);
 }
 
 ANativeWindowBuffer*