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

Unified Diff: gm/complexclip.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/clip_strokerect.cpp ('k') | gm/complexclip2.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/complexclip.cpp
diff --git a/gm/complexclip.cpp b/gm/complexclip.cpp
index ec22204453c64a68ebbdca82d35bb54c9c05431f..fb94957f02619e6b08c69fdf1ff0353ee33bfc9b 100644
--- a/gm/complexclip.cpp
+++ b/gm/complexclip.cpp
@@ -86,14 +86,14 @@ protected:
paint.setTextSize(SkIntToScalar(20));
constexpr struct {
- SkRegion::Op fOp;
- const char* fName;
+ SkCanvas::ClipOp fOp;
+ const char* fName;
} gOps[] = { //extra spaces in names for measureText
- {SkRegion::kIntersect_Op, "Isect "},
- {SkRegion::kDifference_Op, "Diff " },
- {SkRegion::kUnion_Op, "Union "},
- {SkRegion::kXOR_Op, "Xor " },
- {SkRegion::kReverseDifference_Op, "RDiff "}
+ {SkCanvas::kIntersect_Op, "Isect "},
+ {SkCanvas::kDifference_Op, "Diff " },
+ {SkCanvas::kUnion_Op, "Union "},
+ {SkCanvas::kXOR_Op, "Xor " },
+ {SkCanvas::kReverseDifference_Op, "RDiff "}
};
canvas->translate(SkIntToScalar(20), SkIntToScalar(20));
@@ -130,7 +130,7 @@ protected:
SkPath::kEvenOdd_FillType);
clipB.setFillType(doInvB ? SkPath::kInverseEvenOdd_FillType :
SkPath::kEvenOdd_FillType);
- canvas->clipPath(clipA, SkRegion::kIntersect_Op, fDoAAClip);
+ canvas->clipPath(clipA, SkCanvas::kIntersect_Op, fDoAAClip);
canvas->clipPath(clipB, gOps[op].fOp, fDoAAClip);
// In the inverse case we need to prevent the draw from covering the whole
« no previous file with comments | « gm/clip_strokerect.cpp ('k') | gm/complexclip2.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698