From: fmalita Date: Thu, 20 Aug 2015 19:08:18 +0000 (-0700) Subject: SkCanvas::onDrawPicture() quick-reject X-Git-Tag: submit/tizen/20180928.044319~1139 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d028180f0310cf2b23f9744256a41697b0683e67;p=platform%2Fupstream%2FlibSkiaSharp.git SkCanvas::onDrawPicture() quick-reject R=reed@google.com,mtklein@google.com Review URL: https://codereview.chromium.org/1264133003 --- diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp index 02afe92e33..daf8425f57 100644 --- a/src/core/SkCanvas.cpp +++ b/src/core/SkCanvas.cpp @@ -2774,6 +2774,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