SkCanvas::onDrawPicture() quick-reject
R=reed@google.com,mtklein@google.com Review URL: https://codereview.chromium.org/1264133003
This commit is contained in:
parent
e00368018d
commit
48ed62b29d
@ -2744,6 +2744,19 @@ void SkCanvas::drawPicture(const SkPicture* picture, const SkMatrix* matrix, con
|
||||
|
||||
void SkCanvas::onDrawPicture(const SkPicture* picture, const SkMatrix* matrix,
|
||||
const SkPaint* paint) {
|
||||
if (!paint || paint->canComputeFastBounds()) {
|
||||
SkRect bounds = picture->cullRect();
|
||||
if (paint) {
|
||||
paint->computeFastBounds(bounds, &bounds);
|
||||
}
|
||||
if (matrix) {
|
||||
matrix->mapRect(&bounds);
|
||||
}
|
||||
if (this->quickReject(bounds)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
SkBaseDevice* device = this->getTopDevice();
|
||||
if (device) {
|
||||
// Canvas has to first give the device the opportunity to render
|
||||
|
Loading…
Reference in New Issue
Block a user