DescriptionUpdate AnalysisCanvas drawRect early-exit logic to match SkCanvas.cpp again.
We're getting away without checking bounds today because we're building
and checking a bounding-box hierarchy at record time; draws outside the
picture bounds happen to never be recorded.
This isn't a guarantee of the recording API, and indeed doesn't happen if you
record without a bounding-box hierarchy. We want to lean on this lack of
guarantee a bit more. To cut down on time spent recording, we may move around
when we build a bounding box hierarchy. The upshot is that the SkPicture may
contain commands that won't draw anything, and AnalysisCanvas might receive them.
In short, the safe thing to do is quickReject just like SkCanvas does.
tested: cc_unittests, unit_tests
(Background: found this when debugging PicturePileImplTest.AnalyzeIsSolid* failures from http://crrev.com/504823003)
BUG=
Committed: https://crrev.com/ae5bc7f7a80a8d8eb2bef1fc50c2e935def19d7b
Cr-Commit-Position: refs/heads/master@{#292141}
Patch Set 1 #Patch Set 2 : put back paint.nothingToDraw() check #Patch Set 3 : fmt #Patch Set 4 : no, fmt for real #Messages
Total messages: 18 (0 generated)
|