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

Unified Diff: src/core/SkPicturePlayback.cpp

Issue 2277053002: Add drawRegion() API to SkCanvas (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Added shader to test Created 4 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
diff --git a/src/core/SkPicturePlayback.cpp b/src/core/SkPicturePlayback.cpp
index 611b556cc00655ac97dcdff3418ec3be4a1e1d06..3df64227a6de169c19ebc6700a02d2a92fb47662 100644
--- a/src/core/SkPicturePlayback.cpp
+++ b/src/core/SkPicturePlayback.cpp
@@ -469,6 +469,14 @@ void SkPicturePlayback::handleOp(SkReadBuffer* reader,
canvas->drawRect(rect, *paint);
}
} break;
+ case DRAW_REGION: {
+ const SkPaint* paint = fPictureData->getPaint(reader);
+ SkRegion region;
+ reader->readRegion(&region);
+ if (paint) {
+ canvas->drawRegion(region, *paint);
+ }
+ } break;
case DRAW_RRECT: {
const SkPaint* paint = fPictureData->getPaint(reader);
SkRRect rrect;

Powered by Google App Engine
This is Rietveld 408576698