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

Unified Diff: src/utils/SkCanvasStateUtils.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 | « src/utils/SkCanvasStack.cpp ('k') | src/utils/SkDeferredCanvas.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkCanvasStateUtils.cpp
diff --git a/src/utils/SkCanvasStateUtils.cpp b/src/utils/SkCanvasStateUtils.cpp
index 4ef5e2f731acf98a8b6c50b5f1d14ad80afb207d..cc8ea43d43a9cec4a2b13de7d10265e698070580 100644
--- a/src/utils/SkCanvasStateUtils.cpp
+++ b/src/utils/SkCanvasStateUtils.cpp
@@ -142,15 +142,15 @@ public:
bool failed() { return fFailed; }
// ClipVisitor
- void clipRect(const SkRect& rect, SkRegion::Op op, bool antialias) override {
+ void clipRect(const SkRect& rect, SkCanvas::ClipOp op, bool antialias) override {
fFailed |= antialias;
}
- void clipRRect(const SkRRect& rrect, SkRegion::Op op, bool antialias) override {
+ void clipRRect(const SkRRect& rrect, SkCanvas::ClipOp op, bool antialias) override {
fFailed |= antialias;
}
- void clipPath(const SkPath&, SkRegion::Op, bool antialias) override {
+ void clipPath(const SkPath&, SkCanvas::ClipOp, bool antialias) override {
fFailed |= antialias;
}
@@ -284,7 +284,7 @@ static void setup_canvas_from_MC_state(const SkMCState& state, SkCanvas* canvas)
}
canvas->setMatrix(matrix);
- canvas->setClipRegion(clip);
+ canvas->clipRegion(clip, SkCanvas::kReplace_Op);
}
static SkCanvas* create_canvas_from_canvas_layer(const SkCanvasLayerState& layerState) {
« no previous file with comments | « src/utils/SkCanvasStack.cpp ('k') | src/utils/SkDeferredCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698