Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 280bcd3b authored by Sravan Kumar D.V.N's avatar Sravan Kumar D.V.N Committed by Linux Build Service Account
Browse files

sf: Clear FrameBuffer only if there are GLES composed layers

Clear FrameBuffer Target only if there are layers to be composed by
GLES. Otherwise, it results unnecessary gl calls and increases power
consumption in full MDP comp use cases

Change-Id: Ib84c4fe154bb67668e4e8b8ce2f2328c55aed7c6
parent 74180cb2
Loading
Loading
Loading
Loading
+16 −13
Original line number Diff line number Diff line
@@ -2196,10 +2196,12 @@ bool SurfaceFlinger::doComposeSurfaces(const sp<const DisplayDevice>& hw, const
                hw->eglSwapPreserved(false);
            }
            // DrawWormHole/Any Draw has to be within startTile & EndTile
            if (hasGlesComposition) {
                if (hasHwcComposition) {
                    if(mCanUseGpuTileRender && !mUnionDirtyRect.isEmpty()) {
                        const Rect& scissor(mUnionDirtyRect);
                    engine.setScissor(scissor.left, hw->getHeight()- scissor.bottom,
                        engine.setScissor(scissor.left,
                              hw->getHeight()- scissor.bottom,
                              scissor.getWidth(), scissor.getHeight());
                        engine.clearWithColor(0, 0, 0, 0);
                        engine.disableScissor();
@@ -2213,6 +2215,7 @@ bool SurfaceFlinger::doComposeSurfaces(const sp<const DisplayDevice>& hw, const
                    }
                }
            }
        }
#endif

        for (size_t i=0 ; i<count && cur!=end ; ++i, ++cur) {