Update 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= Review URL: https://codereview.chromium.org/505263002 Cr-Commit-Position: refs/heads/master@{#292141}
Showing
Please register or sign in to comment