Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Unified Diff: src/core/SkCanvas.cpp

Issue 513983002: Try out scalar picture sizes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update to ToT again Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkBBoxRecord.cpp ('k') | src/core/SkCanvasPriv.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkCanvas.cpp
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index 16459b0a0378c965dd39d6ec43e6bac245b4c048..2b08a94c85e603a434d35dece267c3ab96bb0498 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -2445,7 +2445,7 @@ void SkCanvas::onDrawPicture(const SkPicture* picture, const SkMatrix* matrix,
}
}
- SkAutoCanvasMatrixPaint acmp(this, matrix, paint, picture->width(), picture->height());
+ SkAutoCanvasMatrixPaint acmp(this, matrix, paint, picture->cullRect());
picture->draw(this);
}
@@ -2549,16 +2549,16 @@ SkCanvas* SkCanvas::NewRasterDirect(const SkImageInfo& info, void* pixels, size_
///////////////////////////////////////////////////////////////////////////////
SkAutoCanvasMatrixPaint::SkAutoCanvasMatrixPaint(SkCanvas* canvas, const SkMatrix* matrix,
- const SkPaint* paint, int width, int height)
+ const SkPaint* paint, const SkRect& bounds)
: fCanvas(canvas)
, fSaveCount(canvas->getSaveCount())
{
if (NULL != paint) {
- SkRect bounds = SkRect::MakeWH(SkIntToScalar(width), SkIntToScalar(height));
+ SkRect newBounds = bounds;
if (matrix) {
- matrix->mapRect(&bounds);
+ matrix->mapRect(&newBounds);
}
- canvas->saveLayer(&bounds, paint);
+ canvas->saveLayer(&newBounds, paint);
} else if (NULL != matrix) {
canvas->save();
}
« no previous file with comments | « src/core/SkBBoxRecord.cpp ('k') | src/core/SkCanvasPriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698