change clip-bounds getters to always return the rect
(actually fixes undefined result in getClipBounds)
future CLs
- update all callers to new apis
- move/rename virtuals
BUG=skia:
DOCS_PREVIEW= https://skia.org/?cl=7400
Change-Id: I45b93014e915c0d1c36d97d948c9ac8931f23258
Reviewed-on: https://skia-review.googlesource.com/7400
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Mike Reed <reed@google.com>
diff --git a/bench/ChromeBench.cpp b/bench/ChromeBench.cpp
index 94c3f25..60d86f9 100644
--- a/bench/ChromeBench.cpp
+++ b/bench/ChromeBench.cpp
@@ -480,10 +480,11 @@
SkIntToScalar(gmailScrollingRectSpec[i*3+1]), SkIntToScalar(gmailScrollingRectSpec[i*3+2]));
}
void validateBounds(SkCanvas* canvas) {
- SkIRect bounds;
- canvas->getClipDeviceBounds(&bounds);
+#ifdef SK_DEBUG
+ SkIRect bounds = canvas->getDeviceClipBounds();
SkASSERT(bounds.right()-bounds.left() >= W);
SkASSERT(bounds.bottom()-bounds.top() >= H);
+#endif
}