aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-11-28 17:08:45 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-11-29 22:43:41 +0000
commit83c8dd9b1a20ec5b866a6c5a557313c13ae8904f (patch)
tree10d55288352d41f6fc68313cf617267f2bd83cb5 /include
parent5eaa297267ab2df13598f74425e036c19e9cfaec (diff)
devirtualize SkCanvas getClipBounds methods
We no longer have any subclasses overriding the virtual hooks, and we've seen subtle bugs come up back when they did. In all modes, SkCanvas can answer these queries itself. BUG=chromium:781238 Change-Id: I37c7511c7bd00c638faacbe4bee89f785691453f Reviewed-on: https://skia-review.googlesource.com/77202 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/core/SkCanvas.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index a6fe197caf..15ee8721cd 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -1025,7 +1025,7 @@ public:
@return bounds of clip in local coordinates
*/
- SkRect getLocalClipBounds() const { return this->onGetLocalClipBounds(); }
+ SkRect getLocalClipBounds() const;
/** Return bounds of clip, transformed by inverse of SkMatrix. If clip is empty,
return false, and set bounds to SkRect::MakeEmpty, where all SkRect sides equal zero.
@@ -1037,7 +1037,7 @@ public:
@return true if clip bounds is not empty
*/
bool getLocalClipBounds(SkRect* bounds) const {
- *bounds = this->onGetLocalClipBounds();
+ *bounds = this->getLocalClipBounds();
return !bounds->isEmpty();
}
@@ -1048,7 +1048,7 @@ public:
@return bounds of clip in SkBaseDevice coordinates
*/
- SkIRect getDeviceClipBounds() const { return this->onGetDeviceClipBounds(); }
+ SkIRect getDeviceClipBounds() const;
/** Return SkIRect bounds of clip, unaffected by SkMatrix. If clip is empty,
return false, and set bounds to SkRect::MakeEmpty, where all SkRect sides equal zero.
@@ -1059,7 +1059,7 @@ public:
@return true if clip bounds is not empty
*/
bool getDeviceClipBounds(SkIRect* bounds) const {
- *bounds = this->onGetDeviceClipBounds();
+ *bounds = this->getDeviceClipBounds();
return !bounds->isEmpty();
}
@@ -2471,10 +2471,6 @@ protected:
this->didConcat(SkMatrix::MakeTrans(dx, dy));
}
- virtual SkRect onGetLocalClipBounds() const;
- virtual SkIRect onGetDeviceClipBounds() const;
-
-
virtual void onDrawAnnotation(const SkRect& rect, const char key[], SkData* value);
virtual void onDrawDRRect(const SkRRect& outer, const SkRRect& inner, const SkPaint& paint);