aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils/SkNoSaveLayerCanvas.h
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-02-28 18:19:39 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-02-28 18:19:39 +0000
commit8f90a892c5130d4d26b5588e1ff151d01a40688a (patch)
treec21277731de84a5059659df199659fee9352842c /src/utils/SkNoSaveLayerCanvas.h
parent069c2a46ba2dc419dcd7dbcb9bf3b83c49b45b41 (diff)
add new onClip* methods to SkCanvas
Diffstat (limited to 'src/utils/SkNoSaveLayerCanvas.h')
-rw-r--r--src/utils/SkNoSaveLayerCanvas.h21
1 files changed, 8 insertions, 13 deletions
diff --git a/src/utils/SkNoSaveLayerCanvas.h b/src/utils/SkNoSaveLayerCanvas.h
index 58d28b40b1..60fad87237 100644
--- a/src/utils/SkNoSaveLayerCanvas.h
+++ b/src/utils/SkNoSaveLayerCanvas.h
@@ -32,25 +32,20 @@ public:
return count;
}
+protected:
// disable aa for speed
- virtual bool clipRect(const SkRect& rect,
- SkRegion::Op op,
- bool doAA) SK_OVERRIDE {
- return this->INHERITED::clipRect(rect, op, false);
+ virtual void onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle) SK_OVERRIDE {
+ this->INHERITED::onClipRect(rect, op, kHard_ClipEdgeStyle);
}
// for speed, just respect the bounds, and disable AA. May give us a few
// false positives and negatives.
- virtual bool clipPath(const SkPath& path,
- SkRegion::Op op,
- bool doAA) SK_OVERRIDE {
- return this->updateClipConservativelyUsingBounds(path.getBounds(), op,
- path.isInverseFillType());
+ virtual void onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle) SK_OVERRIDE {
+ this->updateClipConservativelyUsingBounds(path.getBounds(), op,
+ path.isInverseFillType());
}
- virtual bool clipRRect(const SkRRect& rrect,
- SkRegion::Op op,
- bool doAA) SK_OVERRIDE {
- return this->updateClipConservativelyUsingBounds(rrect.getBounds(), op, false);
+ virtual void onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeStyle) SK_OVERRIDE {
+ this->updateClipConservativelyUsingBounds(rrect.getBounds(), op, false);
}
private: