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

Unified Diff: src/core/SkPicturePlayback.cpp

Issue 20806003: Plumb in "bleed" flag (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Addressed pipe-specific issues and updated to ToT Created 7 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
Index: src/core/SkPicturePlayback.cpp
===================================================================
--- src/core/SkPicturePlayback.cpp (revision 10709)
+++ src/core/SkPicturePlayback.cpp (working copy)
@@ -834,7 +834,20 @@
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);
+ SkCanvas::DrawBitmapRectFlags flags;
+#ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V13_AND_ALL_OTHER_INSTANCES_TOO
+ flags = SkCanvas::kNone_DrawBitmapRectflag;
+ // TODO: remove this backwards compatibility code once the .skps are
+ // regenerated
+ SkASSERT(32 == size || 48 == size || // old sizes
+ 36 == size || 52 == size); // new sizes
+ if (36 == size || 52 == size) {
+#endif
+ flags = (SkCanvas::DrawBitmapRectFlags) reader.readInt();
+#ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V13_AND_ALL_OTHER_INSTANCES_TOO
+ }
+#endif
+ 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