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

Unified Diff: src/core/SkPicturePlayback.cpp

Issue 354533004: Begin atlasing (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Readd missing file 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
« no previous file with comments | « src/core/SkPicturePlayback.h ('k') | src/gpu/GrAtlas.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPicturePlayback.cpp
diff --git a/src/core/SkPicturePlayback.cpp b/src/core/SkPicturePlayback.cpp
index 148237a5a8ffee471e96158f2f5356f518b0e3cd..21658f72307c164577ecc831f4b43e128c27c97c 100644
--- a/src/core/SkPicturePlayback.cpp
+++ b/src/core/SkPicturePlayback.cpp
@@ -929,7 +929,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::Make(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()) {
« no previous file with comments | « src/core/SkPicturePlayback.h ('k') | src/gpu/GrAtlas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698