Bug 905304 - Call compositionComplete(). r=mwu

This commit is contained in:
Sotaro Ikeda 2013-08-19 08:43:16 -04:00
parent 92f8c6b869
commit 0b579e74c0
2 changed files with 11 additions and 0 deletions

View File

@ -163,6 +163,10 @@ 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)
return eglSwapBuffers(dpy, sur);

View File

@ -166,6 +166,13 @@ GonkDisplayJB::SwapBuffers(EGLDisplay dpy, EGLSurface sur)
StopBootAnimation();
mBootAnimBuffer = nullptr;
// Should be called when composition rendering is complete for a frame.
// Only HWC v1.0 needs this call.
// HWC > v1.0 case, do not call compositionComplete().
// mFBDevice is present only when HWC is v1.0.
if (mFBDevice && mFBDevice->compositionComplete) {
mFBDevice->compositionComplete(mFBDevice);
}
mList->outbuf = nullptr;
mList->outbufAcquireFenceFd = -1;
eglSwapBuffers(dpy, sur);