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/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index 0375ab7..d57b62f 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -1074,8 +1074,8 @@
 
 bool SkCanvas::clipRectBounds(const SkRect* bounds, SaveLayerFlags saveLayerFlags,
                               SkIRect* intersection, const SkImageFilter* imageFilter) {
-    SkIRect clipBounds;
-    if (!this->getClipDeviceBounds(&clipBounds)) {
+    SkIRect clipBounds = this->getDeviceClipBounds();
+    if (clipBounds.isEmpty()) {
         return false;
     }
 
@@ -1774,8 +1774,11 @@
 }
 
 bool SkCanvas::getClipBounds(SkRect* bounds) const {
-    SkIRect ibounds;
-    if (!this->getClipDeviceBounds(&ibounds)) {
+    SkIRect ibounds = this->getDeviceClipBounds();
+    if (ibounds.isEmpty()) {
+        if (bounds) {
+            bounds->setEmpty();
+        }
         return false;
     }
 
@@ -2070,7 +2073,7 @@
         matrix->preTranslate(-layer_bounds.left(), -layer_bounds.top());
     }
     if (clip_bounds) {
-        this->getClipDeviceBounds(clip_bounds);
+        *clip_bounds = this->getDeviceClipBounds();
         clip_bounds->offset(-layer_bounds.left(), -layer_bounds.top());
     }
 }