Bug 983273 - HwcComposer2D should honor HWC_HINT_CLEAR_FB for bottom layer. r=dwilson
authorSushil Chauhan <sushilchauhan@codeaurora.org>
Thu, 13 Mar 2014 14:22:18 -0700
changeset 190811 369e8353f89c33a830d55191011f3135e51bfa53
parent 190810 a3e7678d969d3e4a465aee15015b8bac14df5ccb
child 190812 16cc3a7db9391e275a105d1ecabdaa0d141c9976
push id3503
push userraliiev@mozilla.com
push dateMon, 28 Apr 2014 18:51:11 +0000
treeherdermozilla-beta@c95ac01e332e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdwilson
bugs983273
milestone30.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 983273 - HwcComposer2D should honor HWC_HINT_CLEAR_FB for bottom layer. r=dwilson
widget/gonk/HwcComposer2D.cpp
--- a/widget/gonk/HwcComposer2D.cpp
+++ b/widget/gonk/HwcComposer2D.cpp
@@ -540,21 +540,19 @@ HwcComposer2D::TryHwComposition()
                 case HWC_BLIT:
                     blitComposite = true;
                     break;
                 case HWC_OVERLAY:
                     // HWC will compose HWC_OVERLAY layers in partial
                     // Overlay Composition, set layer composition flag
                     // on mapped LayerComposite to skip GPU composition
                     mHwcLayerMap[k]->SetLayerComposited(true);
-                    if (k && (mList->hwLayers[k].hints & HWC_HINT_CLEAR_FB) &&
+                    if ((mList->hwLayers[k].hints & HWC_HINT_CLEAR_FB) &&
                         (mList->hwLayers[k].blending == HWC_BLENDING_NONE)) {
                         // Clear visible rect on FB with transparent pixels.
-                        // Never clear the 1st layer since we're guaranteed
-                        // that FB is already cleared.
                         hwc_rect_t r = mList->hwLayers[k].displayFrame;
                         mHwcLayerMap[k]->SetClearRect(nsIntRect(r.left, r.top,
                                                                 r.right - r.left,
                                                                 r.bottom - r.top));
                     }
                     break;
                 default:
                     break;