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

Unified Diff: gm/circularclips.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/blurredclippedcircle.cpp ('k') | gm/clip_strokerect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/circularclips.cpp
diff --git a/gm/circularclips.cpp b/gm/circularclips.cpp
index 2691971398069fe6e9707143e07fe84054518110..39be1a5aec81abc05aca0d1468ad266f9f3ae348 100644
--- a/gm/circularclips.cpp
+++ b/gm/circularclips.cpp
@@ -36,13 +36,13 @@ protected:
}
void onDraw(SkCanvas* canvas) override {
- SkRegion::Op ops[] = {
- SkRegion::kDifference_Op,
- SkRegion::kIntersect_Op,
- SkRegion::kUnion_Op,
- SkRegion::kXOR_Op,
- SkRegion::kReverseDifference_Op,
- SkRegion::kReplace_Op,
+ SkCanvas::ClipOp ops[] = {
+ SkCanvas::kDifference_Op,
+ SkCanvas::kIntersect_Op,
+ SkCanvas::kUnion_Op,
+ SkCanvas::kXOR_Op,
+ SkCanvas::kReverseDifference_Op,
+ SkCanvas::kReplace_Op,
};
SkRect rect = SkRect::MakeLTRB(fX1 - fR, fY - fR, fX2 + fR, fY + fR);
@@ -54,8 +54,8 @@ protected:
canvas->save();
canvas->scale(10, 10);
canvas->translate(-((fX1 + fX2)/2 - fR), -(fY - 2*fR/3));
- canvas->clipPath(fCircle1, SkRegion::kReplace_Op, true);
- canvas->clipPath(fCircle2, SkRegion::kIntersect_Op, true);
+ canvas->clipPath(fCircle1, SkCanvas::kReplace_Op, true);
+ canvas->clipPath(fCircle2, SkCanvas::kIntersect_Op, true);
canvas->drawRect(rect, fillPaint);
@@ -73,7 +73,7 @@ protected:
for (size_t op = 0; op < SK_ARRAY_COUNT(ops); op++) {
canvas->save();
- canvas->clipPath(fCircle1, SkRegion::kReplace_Op);
+ canvas->clipPath(fCircle1, SkCanvas::kReplace_Op);
canvas->clipPath(fCircle2, ops[op]);
canvas->drawRect(rect, fillPaint);
« no previous file with comments | « gm/blurredclippedcircle.cpp ('k') | gm/clip_strokerect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698