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

Unified Diff: samplecode/SampleClipDrawMatch.cpp

Issue 2357333002: allow clip calls w/o op param, remove unnecessary kReplace ops (Closed)
Patch Set: 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 | « include/core/SkCanvas.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleClipDrawMatch.cpp
diff --git a/samplecode/SampleClipDrawMatch.cpp b/samplecode/SampleClipDrawMatch.cpp
index ddb9f66836d8f3dff363fff9c8e58b0d4269b288..ea30cc609459f19a3ccc56e22d2a9de9d068d8f1 100644
--- a/samplecode/SampleClipDrawMatch.cpp
+++ b/samplecode/SampleClipDrawMatch.cpp
@@ -164,43 +164,43 @@ protected:
switch (fGeom) {
case kRect_Geometry:
- canvas->clipRect(create_rect(offset), SkCanvas::kReplace_Op, useAA);
+ canvas->clipRect(create_rect(offset), useAA);
break;
case kRRect_Geometry:
- canvas->clipRRect(create_rrect(offset), SkCanvas::kReplace_Op, useAA);
+ canvas->clipRRect(create_rrect(offset), useAA);
break;
case kCircle_Geometry:
- canvas->clipRRect(create_circle(offset), SkCanvas::kReplace_Op, useAA);
+ canvas->clipRRect(create_circle(offset), useAA);
break;
case kConvexPath_Geometry:
- canvas->clipPath(create_convex_path(offset), SkCanvas::kReplace_Op, useAA);
+ canvas->clipPath(create_convex_path(offset), useAA);
break;
case kConcavePath_Geometry:
- canvas->clipPath(create_concave_path(offset), SkCanvas::kReplace_Op, useAA);
+ canvas->clipPath(create_concave_path(offset), useAA);
break;
case kRectAndRect_Geometry: {
SkRect r = create_rect(offset);
r.offset(fSign * kXlate, fSign * kXlate);
- canvas->clipRect(r, SkCanvas::kReplace_Op, true); // AA here forces shader clips
- canvas->clipRect(create_rect(offset), SkCanvas::kIntersect_Op, useAA);
+ canvas->clipRect(r, true); // AA here forces shader clips
+ canvas->clipRect(create_rect(offset), useAA);
} break;
case kRectAndRRect_Geometry: {
SkRect r = create_rect(offset);
r.offset(fSign * kXlate, fSign * kXlate);
- canvas->clipRect(r, SkCanvas::kReplace_Op, true); // AA here forces shader clips
- canvas->clipRRect(create_rrect(offset), SkCanvas::kIntersect_Op, useAA);
+ canvas->clipRect(r, true); // AA here forces shader clips
+ canvas->clipRRect(create_rrect(offset), useAA);
} break;
case kRectAndConvex_Geometry: {
SkRect r = create_rect(offset);
r.offset(fSign * kXlate, fSign * kXlate);
- canvas->clipRect(r, SkCanvas::kReplace_Op, true); // AA here forces shader clips
- canvas->clipPath(create_convex_path(offset), SkCanvas::kIntersect_Op, useAA);
+ canvas->clipRect(r, true); // AA here forces shader clips
+ canvas->clipPath(create_convex_path(offset), useAA);
} break;
case kRectAndConcave_Geometry: {
SkRect r = create_rect(offset);
r.offset(fSign * kXlate, fSign * kXlate);
- canvas->clipRect(r, SkCanvas::kReplace_Op, true); // AA here forces shader clips
- canvas->clipPath(create_concave_path(offset), SkCanvas::kIntersect_Op, useAA);
+ canvas->clipRect(r, true); // AA here forces shader clips
+ canvas->clipPath(create_concave_path(offset), useAA);
} break;
}
« no previous file with comments | « include/core/SkCanvas.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698