DescriptionShrink saveLayer device bounds when it supplies an explicit bounds and has a complex paint
This CL shrinks the bound computed for saveLayers that possess both an explicit
bound and a complex paint (e.g., one that affects transparent black). In this
case the bound of the layer should be the clipped explicit bound rather then
the clip prior/after the saveLayer/restore block.
In the following the first bound is the currently computed bound
while the second is the new/desired one:
For a 100x100 picture
saveLayer (no bound, no paint) [ 0 0 100 100 ] [ 50 50 100 100 ]
setMatrix (translate 50, 50) [ 0 0 100 100 ] [ 50 50 100 100 ]
saveLayer (bound of 0, 0, 50, 50 - complex paint) [ 0 0 100 100 ] [ 50 50 100 100 ]
restore [ 0 0 100 100 ] [ 50 50 100 100 ]
restore [ 0 0 100 100 ] [ 50 50 100 100 ]
Committed: https://skia.googlesource.com/skia/+/4d52afef5cf90a2fed3bb69db71675c6450ab397
Patch Set 1 #
Total comments: 3
Patch Set 2 : Propagate use of cull rect #Patch Set 3 : Add unit test #
Total comments: 7
Patch Set 4 : Address code review comments #
Messages
Total messages: 10 (2 generated)
|