Loading libs/hwui/DeferredDisplayList.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -491,6 +491,7 @@ void DeferredDisplayList::addDrawOp(OpenGLRenderer& renderer, DrawOp* op) { deferInfo.mergeable &= !recordingComplexClip(); if (CC_LIKELY(mAvoidOverdraw) && mBatches.size() && op->state.mClipSideFlags != kClipSide_ConservativeFull && deferInfo.opaqueOverBounds && op->state.mBounds.contains(mBounds)) { // avoid overdraw by resetting drawing state + discarding drawing ops discardDrawingBatches(mBatches.size() - 1); Loading libs/hwui/DisplayListOp.h +4 −1 Original line number Diff line number Diff line Loading @@ -129,7 +129,10 @@ public: return; } if (!getLocalBounds(state.mBounds)) { if (getLocalBounds(state.mBounds)) { // valid empty bounds, don't bother deferring if (state.mBounds.isEmpty()) return; } else { // empty bounds signify bounds can't be calculated state.mBounds.setEmpty(); } Loading libs/hwui/OpenGLRenderer.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -1407,9 +1407,9 @@ bool OpenGLRenderer::storeDisplayState(DeferredDisplayState& state, int stateDef } state.mBounds.set(clippedBounds); } else { // If we don't have bounds, let's assume we're clipped // to prevent merging state.mClipSideFlags = kClipSide_Full; // Empty bounds implies size unknown. Label op as conservatively clipped to disable // overdraw avoidance (since we don't know what it overlaps) state.mClipSideFlags = kClipSide_ConservativeFull; state.mBounds.set(currentClip); } } Loading libs/hwui/OpenGLRenderer.h +2 −1 Original line number Diff line number Diff line Loading @@ -86,7 +86,8 @@ enum ClipSideFlags { kClipSide_Top = 0x2, kClipSide_Right = 0x4, kClipSide_Bottom = 0x8, kClipSide_Full = 0xF kClipSide_Full = 0xF, kClipSide_ConservativeFull = 0x1F }; struct DeferredDisplayState { Loading Loading
libs/hwui/DeferredDisplayList.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -491,6 +491,7 @@ void DeferredDisplayList::addDrawOp(OpenGLRenderer& renderer, DrawOp* op) { deferInfo.mergeable &= !recordingComplexClip(); if (CC_LIKELY(mAvoidOverdraw) && mBatches.size() && op->state.mClipSideFlags != kClipSide_ConservativeFull && deferInfo.opaqueOverBounds && op->state.mBounds.contains(mBounds)) { // avoid overdraw by resetting drawing state + discarding drawing ops discardDrawingBatches(mBatches.size() - 1); Loading
libs/hwui/DisplayListOp.h +4 −1 Original line number Diff line number Diff line Loading @@ -129,7 +129,10 @@ public: return; } if (!getLocalBounds(state.mBounds)) { if (getLocalBounds(state.mBounds)) { // valid empty bounds, don't bother deferring if (state.mBounds.isEmpty()) return; } else { // empty bounds signify bounds can't be calculated state.mBounds.setEmpty(); } Loading
libs/hwui/OpenGLRenderer.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -1407,9 +1407,9 @@ bool OpenGLRenderer::storeDisplayState(DeferredDisplayState& state, int stateDef } state.mBounds.set(clippedBounds); } else { // If we don't have bounds, let's assume we're clipped // to prevent merging state.mClipSideFlags = kClipSide_Full; // Empty bounds implies size unknown. Label op as conservatively clipped to disable // overdraw avoidance (since we don't know what it overlaps) state.mClipSideFlags = kClipSide_ConservativeFull; state.mBounds.set(currentClip); } } Loading
libs/hwui/OpenGLRenderer.h +2 −1 Original line number Diff line number Diff line Loading @@ -86,7 +86,8 @@ enum ClipSideFlags { kClipSide_Top = 0x2, kClipSide_Right = 0x4, kClipSide_Bottom = 0x8, kClipSide_Full = 0xF kClipSide_Full = 0xF, kClipSide_ConservativeFull = 0x1F }; struct DeferredDisplayState { Loading