Bug 940851 - Initialize acquire & release-fence fds of HWC_BACKGROUND layer. r=dwilson
authorSushil Chauhan <sushilchauhan@codeaurora.org>
Mon, 02 Dec 2013 16:58:39 -0800
changeset 174106 4d198cb36af0b6b759f22f12a972ff7c95c3d643
parent 174105 ed9645b3d6eca189e60310a85c1194dfe0e5790c
child 174107 806ed2a530f9d8269124b46050a0dcfb47447b9d
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdwilson
bugs940851
milestone28.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 940851 - Initialize acquire & release-fence fds of HWC_BACKGROUND layer. r=dwilson
widget/gonk/HwcComposer2D.cpp
widget/gonk/libdisplay/GonkDisplayJB.cpp
--- a/widget/gonk/HwcComposer2D.cpp
+++ b/widget/gonk/HwcComposer2D.cpp
@@ -520,16 +520,18 @@ HwcComposer2D::Render(EGLDisplay dpy, EG
         mList->hwLayers[mList->numHwLayers - 1].handle = fbsurface->lastHandle;
         mList->hwLayers[mList->numHwLayers - 1].acquireFenceFd = fbsurface->lastFenceFD;
     } else {
         mList->numHwLayers = 2;
         mList->hwLayers[0].hints = 0;
         mList->hwLayers[0].compositionType = HWC_BACKGROUND;
         mList->hwLayers[0].flags = HWC_SKIP_LAYER;
         mList->hwLayers[0].backgroundColor = {0};
+        mList->hwLayers[0].acquireFenceFd = -1;
+        mList->hwLayers[0].releaseFenceFd = -1;
         mList->hwLayers[0].displayFrame = {0, 0, mScreenRect.width, mScreenRect.height};
         Prepare(fbsurface->lastHandle, fbsurface->lastFenceFD);
     }
 
     // GPU or partial HWC Composition
     Commit();
 
     GetGonkDisplay()->SetFBReleaseFd(mList->hwLayers[mList->numHwLayers - 1].releaseFenceFd);
--- a/widget/gonk/libdisplay/GonkDisplayJB.cpp
+++ b/widget/gonk/libdisplay/GonkDisplayJB.cpp
@@ -229,16 +229,18 @@ GonkDisplayJB::Post(buffer_handle_t buf,
     mList->retireFenceFd = -1;
     mList->numHwLayers = 2;
     mList->flags = HWC_GEOMETRY_CHANGED;
     mList->hwLayers[0].compositionType = HWC_BACKGROUND;
     mList->hwLayers[0].hints = 0;
     /* Skip this layer so the hwc module doesn't complain about null handles */
     mList->hwLayers[0].flags = HWC_SKIP_LAYER;
     mList->hwLayers[0].backgroundColor = {0};
+    mList->hwLayers[0].acquireFenceFd = -1;
+    mList->hwLayers[0].releaseFenceFd = -1;
     /* hwc module checks displayFrame even though it shouldn't */
     mList->hwLayers[0].displayFrame = r;
     mList->hwLayers[1].compositionType = HWC_FRAMEBUFFER_TARGET;
     mList->hwLayers[1].hints = 0;
     mList->hwLayers[1].flags = 0;
     mList->hwLayers[1].handle = buf;
     mList->hwLayers[1].transform = 0;
     mList->hwLayers[1].blending = HWC_BLENDING_PREMULT;