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

Unified Diff: src/core/SkPicturePlayback.cpp

Issue 20806003: Plumb in "bleed" flag (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Updated .skp version number Created 7 years, 5 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
===================================================================
--- src/core/SkPicturePlayback.cpp (revision 10408)
+++ src/core/SkPicturePlayback.cpp (working copy)
@@ -834,7 +834,15 @@
const SkBitmap& bitmap = getBitmap(reader);
const SkRect* src = this->getRectPtr(reader); // may be null
const SkRect& dst = reader.skipT<SkRect>(); // required
- canvas.drawBitmapRectToRect(bitmap, src, dst, paint);
+ // TODO: remove this backwards compatibility code once the .skps are
+ // regenerated
+ SkCanvas::DrawBitmapRectFlags flags = SkCanvas::kNone_DrawBitmapRectflag;
+ SkASSERT(32 == size || 48 == size || // old sizes
+ 36 == size || 52 == size); // new sizes
+ if (36 == size || 52 == size) {
+ flags = (SkCanvas::DrawBitmapRectFlags) reader.readInt();
+ }
+ canvas.drawBitmapRectToRect(bitmap, src, dst, paint, flags);
} break;
case DRAW_BITMAP_MATRIX: {
const SkPaint* paint = getPaint(reader);

Powered by Google App Engine
This is Rietveld 408576698