DescriptionRefactor CRC2D::reset() to avoid non-additive SkCanvas state operations
Skia is considering removing the SkCanvas APIs which allow mutating
the state in a non-additive manner:
setMatrix() & clip{Rect,RRect,Path}(kReplace_Op).
CanvasRenderingContext2D uses the above to reset the canvas state to the
initial clip and identity matrix.
The same can be achieved with an initial unbalanced save() frame, and
a restore/save pair in reset(), to reinstate the original clip & matrix.
BUG=skia:5773
R=junov@chromium.org,reed@google.com
Committed: https://crrev.com/9942278f26cdbae264501e6ec4d7110018035a1e
Cr-Commit-Position: refs/heads/master@{#423699}
Patch Set 1 #Patch Set 2 : offscreenCanvas #Patch Set 3 : stricter check #Patch Set 4 : cleanup #Patch Set 5 : PaintRenderingContext2D #Patch Set 6 : unit test fix #
Total comments: 8
Patch Set 7 : review #Messages
Total messages: 27 (21 generated)
|