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

Unified Diff: src/core/SkPicturePlayback.cpp

Issue 354533004: Begin atlasing (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix unit test Created 6 years, 6 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
Index: src/core/SkPicturePlayback.cpp
diff --git a/src/core/SkPicturePlayback.cpp b/src/core/SkPicturePlayback.cpp
index c3f24b95e1f801566973888b460b3056ba88baa1..7a7c9c0716a157efd31d9fbfc0c366d0be360c6d 100644
--- a/src/core/SkPicturePlayback.cpp
+++ b/src/core/SkPicturePlayback.cpp
@@ -902,7 +902,11 @@ void SkPicturePlayback::draw(SkCanvas& canvas, SkDrawPictureCallback* callback)
SkASSERT(NULL != temp->fPaint);
canvas.save();
canvas.setMatrix(initialMatrix);
- canvas.drawBitmap(*temp->fBM, temp->fPos.fX, temp->fPos.fY, temp->fPaint);
+ SkRect src = SkRect::MakeFromIRect(temp->fSrcRect);
+ SkRect dst = SkRect::MakeXYWH(temp->fPos.fX, temp->fPos.fY,
+ temp->fSrcRect.width(),
+ temp->fSrcRect.height());
+ canvas.drawBitmapRectToRect(*temp->fBM, &src, dst, temp->fPaint);
canvas.restore();
if (it.isValid()) {
« include/core/SkSurface.h ('K') | « src/core/SkPicturePlayback.h ('k') | src/gpu/GrAtlas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698