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

Unified Diff: gm/convexpolyclip.cpp

Issue 777643003: use ClipOp instead of SkRegion for clipping (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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/distantclip.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/convexpolyclip.cpp
diff --git a/gm/convexpolyclip.cpp b/gm/convexpolyclip.cpp
index 328cdb5207f763fc957df3b0a986c52b1c871eda..2d2851dd01fa8639fe51f9b7011bcedd25f25524 100644
--- a/gm/convexpolyclip.cpp
+++ b/gm/convexpolyclip.cpp
@@ -173,7 +173,7 @@ protected:
canvas->save();
}
canvas->translate(x, y);
- clip->setOnCanvas(canvas, SkRegion::kIntersect_Op, SkToBool(aa));
+ clip->setOnCanvas(canvas, kIntersect_SkClipOp, SkToBool(aa));
canvas->drawBitmap(fBmp, 0, 0);
canvas->restore();
x += fBmp.width() + kMargin;
@@ -199,7 +199,7 @@ protected:
SkPath closedClipPath;
clip->asClosedPath(&closedClipPath);
canvas->drawPath(closedClipPath, clipOutlinePaint);
- clip->setOnCanvas(canvas, SkRegion::kIntersect_Op, SkToBool(aa));
+ clip->setOnCanvas(canvas, kIntersect_SkClipOp, SkToBool(aa));
canvas->scale(1.f, 1.8f);
canvas->drawText(kTxt, SK_ARRAY_COUNT(kTxt)-1,
0, 1.5f * txtPaint.getTextSize(),
@@ -229,7 +229,7 @@ private:
Clip () : fClipType(kNone_ClipType) {}
- void setOnCanvas(SkCanvas* canvas, SkRegion::Op op, bool aa) const {
+ void setOnCanvas(SkCanvas* canvas, SkClipOp op, bool aa) const {
switch (fClipType) {
case kPath_ClipType:
canvas->clipPath(fPath, op, aa);
« no previous file with comments | « gm/complexclip2.cpp ('k') | gm/distantclip.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698