Make SkCanvas::getBaseLayerSize() virtual
authortomhudson <tomhudson@google.com>
Mon, 23 Mar 2015 14:22:40 +0000 (07:22 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 23 Mar 2015 14:22:40 +0000 (07:22 -0700)
Subclasses of SkCanvas may need to override the behavior here - for
example, any proxy or deferred canvas may not know its own size and
need to delegate to another object.

We'll also work on reducing use of this function
(https://skbug.com/3569), but some of the current uses seem to be
semantically necessary.

R=reed@google.com
BUG=skia:3566

Review URL: https://codereview.chromium.org/1022423002

include/core/SkCanvas.h

index 836f7b1..8df2989 100644 (file)
@@ -130,7 +130,7 @@ public:
      * origin of the base layer is always (0,0). The current drawable area may be
      * smaller (due to clipping or saveLayer).
      */
-    SkISize getBaseLayerSize() const;
+    virtual SkISize getBaseLayerSize() const;
 
     /**
      *  DEPRECATED: call getBaseLayerSize