diff options
author | 2012-05-23 11:44:08 +0000 | |
---|---|---|
committer | 2012-05-23 11:44:08 +0000 | |
commit | 49d9fd5fdb9ffd48538c8fc5a2f6f2d43a2e4fe9 (patch) | |
tree | d9ac469c4bc3a933872276d3047d67b616efb507 /include/core | |
parent | af46cff4ee6099cebf3aa395805748af7d193a31 (diff) |
Plumbing to propagate save & restore from SkCanvas down to GrContext & lower
http://codereview.appspot.com/6203067/
git-svn-id: http://skia.googlecode.com/svn/trunk@4034 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core')
-rw-r--r-- | include/core/SkDevice.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/core/SkDevice.h b/include/core/SkDevice.h index db9c542ada..1e4e0a3166 100644 --- a/include/core/SkDevice.h +++ b/include/core/SkDevice.h @@ -351,6 +351,20 @@ private: friend class SkDeviceFilteredPaint; friend class DeviceImageFilterProxy; + /** + * postSave is called by SkCanvas to inform the device that it has + * just completed a save operation. This allows derived + * classes to initialize their state-dependent caches. + */ + virtual void postSave() {}; + + /** + * preRestore is called by SkCanvas right before it executes a restore + * operation. As the partner of postSave, it allows + * derived classes to clear their state-dependent caches. + */ + virtual void preRestore() {}; + // just called by SkCanvas when built as a layer void setOrigin(int x, int y) { fOrigin.set(x, y); } // just called by SkCanvas for saveLayer |