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

Unified Diff: src/core/SkPicturePlayback.cpp

Issue 2355483002: abstract name of clipping ops, to transtion to a more restricted set (Closed)
Patch Set: no need for ifdef for globals Created 4 years, 3 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/SkPictureFlat.h ('k') | src/core/SkPictureRecord.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 4520b6d325107ff262f9d961337532e142b6660b..cc16855abfe7157c4f64a3fa0f226e12ad8e64f8 100644
--- a/src/core/SkPicturePlayback.cpp
+++ b/src/core/SkPicturePlayback.cpp
@@ -126,11 +126,11 @@ void SkPicturePlayback::handleOp(SkReadBuffer* reader,
case CLIP_PATH: {
const SkPath& path = fPictureData->getPath(reader);
uint32_t packed = reader->readInt();
- SkRegion::Op regionOp = ClipParams_unpackRegionOp(packed);
+ SkCanvas::ClipOp clipOp = ClipParams_unpackRegionOp(packed);
bool doAA = ClipParams_unpackDoAA(packed);
size_t offsetToRestore = reader->readInt();
SkASSERT(!offsetToRestore || offsetToRestore >= reader->offset());
- canvas->clipPath(path, regionOp, doAA);
+ canvas->clipPath(path, clipOp, doAA);
if (canvas->isClipEmpty() && offsetToRestore) {
reader->skip(offsetToRestore - reader->offset());
}
@@ -139,10 +139,10 @@ void SkPicturePlayback::handleOp(SkReadBuffer* reader,
SkRegion region;
reader->readRegion(&region);
uint32_t packed = reader->readInt();
- SkRegion::Op regionOp = ClipParams_unpackRegionOp(packed);
+ SkCanvas::ClipOp clipOp = ClipParams_unpackRegionOp(packed);
size_t offsetToRestore = reader->readInt();
SkASSERT(!offsetToRestore || offsetToRestore >= reader->offset());
- canvas->clipRegion(region, regionOp);
+ canvas->clipRegion(region, clipOp);
if (canvas->isClipEmpty() && offsetToRestore) {
reader->skip(offsetToRestore - reader->offset());
}
@@ -151,11 +151,11 @@ void SkPicturePlayback::handleOp(SkReadBuffer* reader,
SkRect rect;
reader->readRect(&rect);
uint32_t packed = reader->readInt();
- SkRegion::Op regionOp = ClipParams_unpackRegionOp(packed);
+ SkCanvas::ClipOp clipOp = ClipParams_unpackRegionOp(packed);
bool doAA = ClipParams_unpackDoAA(packed);
size_t offsetToRestore = reader->readInt();
SkASSERT(!offsetToRestore || offsetToRestore >= reader->offset());
- canvas->clipRect(rect, regionOp, doAA);
+ canvas->clipRect(rect, clipOp, doAA);
if (canvas->isClipEmpty() && offsetToRestore) {
reader->skip(offsetToRestore - reader->offset());
}
@@ -164,11 +164,11 @@ void SkPicturePlayback::handleOp(SkReadBuffer* reader,
SkRRect rrect;
reader->readRRect(&rrect);
uint32_t packed = reader->readInt();
- SkRegion::Op regionOp = ClipParams_unpackRegionOp(packed);
+ SkCanvas::ClipOp clipOp = ClipParams_unpackRegionOp(packed);
bool doAA = ClipParams_unpackDoAA(packed);
size_t offsetToRestore = reader->readInt();
SkASSERT(!offsetToRestore || offsetToRestore >= reader->offset());
- canvas->clipRRect(rrect, regionOp, doAA);
+ canvas->clipRRect(rrect, clipOp, doAA);
if (canvas->isClipEmpty() && offsetToRestore) {
reader->skip(offsetToRestore - reader->offset());
}
« no previous file with comments | « src/core/SkPictureFlat.h ('k') | src/core/SkPictureRecord.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698