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

Unified Diff: gm/complexclip3.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 | « gm/complexclip2.cpp ('k') | gm/complexclip_blur_tiled.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/complexclip3.cpp
diff --git a/gm/complexclip3.cpp b/gm/complexclip3.cpp
index 1deb44614587013217dc411e2406978c7f754370..fd8cd3510040858506df9289f11d9e59d1b4ebc0 100644
--- a/gm/complexclip3.cpp
+++ b/gm/complexclip3.cpp
@@ -52,14 +52,14 @@ protected:
paint.setTextSize(SkIntToScalar(20));
constexpr struct {
- SkRegion::Op fOp;
- const char* fName;
+ SkCanvas::ClipOp fOp;
+ const char* fName;
} gOps[] = {
- {SkRegion::kIntersect_Op, "I"},
- {SkRegion::kDifference_Op, "D" },
- {SkRegion::kUnion_Op, "U"},
- {SkRegion::kXOR_Op, "X" },
- {SkRegion::kReverseDifference_Op, "R"}
+ {SkCanvas::kIntersect_Op, "I"},
+ {SkCanvas::kDifference_Op, "D" },
+ {SkCanvas::kUnion_Op, "U"},
+ {SkCanvas::kXOR_Op, "X" },
+ {SkCanvas::kReverseDifference_Op, "R"}
};
canvas->translate(SkIntToScalar(20), SkIntToScalar(20));
@@ -84,7 +84,7 @@ protected:
SkPath::kEvenOdd_FillType);
secondClip->setFillType(doInvB ? SkPath::kInverseEvenOdd_FillType :
SkPath::kEvenOdd_FillType);
- canvas->clipPath(*firstClip, SkRegion::kIntersect_Op, doAAA);
+ canvas->clipPath(*firstClip, SkCanvas::kIntersect_Op, doAAA);
canvas->clipPath(*secondClip, gOps[op].fOp, doAAB);
// draw rect clipped
« no previous file with comments | « gm/complexclip2.cpp ('k') | gm/complexclip_blur_tiled.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698