aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-02-28 15:28:02 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-02-28 15:28:02 +0000
commit03fc3b4f67a115e4a7945d173856a6c80b09311e (patch)
tree76665d4141136cb091f7c9e3e5d3bdc2342cdfa2 /include/core
parentd85f32ca40475fb246dd8ca93abaf1c3db0389e1 (diff)
Revert of r13620 (add new onClip* methods to SkCanvas - https://codereview.chromium.org/183453002/) due to broken Chrome Canary and failing tests.
git-svn-id: http://skia.googlecode.com/svn/trunk@13622 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core')
-rw-r--r--include/core/SkCanvas.h25
1 files changed, 8 insertions, 17 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index 27ff8bb493..b73a1e48ca 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -481,9 +481,10 @@ public:
specified region. This does not intersect or in any other way account
for the existing clip region.
@param deviceRgn The region to copy into the current clip.
+ @return true if the new clip region is non-empty
*/
- void setClipRegion(const SkRegion& deviceRgn) {
- this->clipRegion(deviceRgn, SkRegion::kReplace_Op);
+ bool setClipRegion(const SkRegion& deviceRgn) {
+ return this->clipRegion(deviceRgn, SkRegion::kReplace_Op);
}
/** Return true if the specified rectangle, after being transformed by the
@@ -547,13 +548,13 @@ public:
in a way similar to quickReject, in that it tells you that drawing
outside of these bounds will be clipped out.
*/
- virtual bool getClipBounds(SkRect* bounds) const;
+ bool getClipBounds(SkRect* bounds) const;
/** Return the bounds of the current clip, in device coordinates; returns
true if non-empty. Maybe faster than getting the clip explicitly and
then taking its bounds.
*/
- virtual bool getClipDeviceBounds(SkIRect* bounds) const;
+ bool getClipDeviceBounds(SkIRect* bounds) const;
/** Fill the entire canvas' bitmap (restricted to the current clip) with the
@@ -1030,7 +1031,7 @@ public:
* result, subsequent calls will be cheap (until the clip state changes,
* which can happen on any clip..() or restore() call.
*/
- virtual bool isClipEmpty() const;
+ bool isClipEmpty() const;
/** Return the current matrix on the canvas.
This does not account for the translate in any of the devices.
@@ -1047,7 +1048,7 @@ public:
/** Returns a description of the total clip; may be cheaper than
getting the clip and querying it directly.
*/
- virtual ClipType getClipType() const;
+ ClipType getClipType() const;
/** DEPRECATED -- need to move this guy to private/friend
* Return the current device clip (concatenation of all clip calls).
@@ -1129,16 +1130,6 @@ protected:
virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&);
- enum ClipEdgeStyle {
- kHard_ClipEdgeStyle,
- kSoft_ClipEdgeStyle
- };
-
- virtual void onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle edgeStyle);
- virtual void onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeStyle edgeStyle);
- virtual void onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle edgeStyle);
- virtual void onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op);
-
// Returns the canvas to be used by DrawIter. Default implementation
// returns this. Subclasses that encapsulate an indirect canvas may
// need to overload this method. The impl must keep track of this, as it
@@ -1155,7 +1146,7 @@ protected:
// Called by child classes that override clipPath and clipRRect to only
// track fast conservative clip bounds, rather than exact clips.
- void updateClipConservativelyUsingBounds(const SkRect&, SkRegion::Op,
+ bool updateClipConservativelyUsingBounds(const SkRect&, SkRegion::Op,
bool inverseFilled);
// notify our surface (if we have one) that we are about to draw, so it