diff options
Diffstat (limited to 'include/core/SkCanvas.h')
-rw-r--r-- | include/core/SkCanvas.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h index 0a1b393..39fd998 100644 --- a/include/core/SkCanvas.h +++ b/include/core/SkCanvas.h @@ -78,12 +78,16 @@ public: /** If the Device supports GL viewports, return true and set size (if not null) to the size of the viewport. If it is not supported, ignore size and return false. + + DEPRECATED: the gpu-device backend takes care of managing the viewport */ virtual bool getViewport(SkIPoint* size) const; /** If the Device supports GL viewports, return true and set the viewport to the specified x and y dimensions. If it is not supported, ignore x and y and return false. + + DEPRECATED: the gpu-device backend takes care of managing the viewport */ virtual bool setViewport(int x, int y); @@ -99,6 +103,15 @@ public: */ SkDevice* setDevice(SkDevice* device); + /** + * saveLayer() can create another device (which is later drawn onto + * the previous device). getTopDevice() returns the top-most device current + * installed. Note that this can change on other calls like save/restore, + * so do not access this device after subsequent canvas calls. + * The reference count of the device is not changed. + */ + SkDevice* getTopDevice() const; + /** May be overridden by subclasses. This returns a compatible device for this canvas, with the specified config/width/height. If the device is raster, the pixels will be allocated automatically. |