diff options
author | 2016-02-25 16:54:08 -0800 | |
---|---|---|
committer | 2016-02-25 16:59:19 -0800 | |
commit | 4876de16e34622634266d09522c9153c78c7c2fb (patch) | |
tree | 08a054ece3cb68203113b899a60bd891ab299b07 /libs/hwui/LayerBuilder.cpp | |
parent | 1b7db4000eabb570697f4c5097588acbfa4df62b (diff) |
Properly reject empty unclipped savelayers
bug:27225580
bug:27281241
Empty unclipped savelayers (clipped at defer time, often by dirty rect)
were resulting in invalid layer clear rectangles. Simplify by just
rejecting these unclipped savelayers entirely at defer.
Also, use repaint rect as base clip for constructed ops within
LayerBuilder.
Change-Id: I5c466199e85201a2f68f5cdc60b29187c849961b
Diffstat (limited to 'libs/hwui/LayerBuilder.cpp')
-rw-r--r-- | libs/hwui/LayerBuilder.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/hwui/LayerBuilder.cpp b/libs/hwui/LayerBuilder.cpp index c5d7191f1b62..bc39621f2cb2 100644 --- a/libs/hwui/LayerBuilder.cpp +++ b/libs/hwui/LayerBuilder.cpp @@ -199,10 +199,10 @@ LayerBuilder::LayerBuilder(uint32_t width, uint32_t height, : width(width) , height(height) , repaintRect(repaintRect) + , repaintClip(repaintRect) , offscreenBuffer(renderNode ? renderNode->getLayer() : nullptr) , beginLayerOp(beginLayerOp) - , renderNode(renderNode) - , viewportClip(Rect(width, height)) {} + , renderNode(renderNode) {} // iterate back toward target to see if anything drawn since should overlap the new op // if no target, merging ops still iterate to find similar batch to insert after @@ -260,7 +260,7 @@ void LayerBuilder::flushLayerClears(LinearAllocator& allocator) { Matrix4::identity(), nullptr, paint, verts, vertCount); BakedOpState* bakedState = BakedOpState::directConstruct(allocator, - &viewportClip, bounds, *op); + &repaintClip, bounds, *op); deferUnmergeableOp(allocator, bakedState, OpBatchType::Vertices); } } |