aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkMallocPixelRef.h
diff options
context:
space:
mode:
authorGravatar djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-03-28 20:47:01 +0000
committerGravatar djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-03-28 20:47:01 +0000
commit5370cd969d8f3957e4306068e6195ac1bca3d6cd (patch)
treecf1639cfb2dcc013e992f75b86056455bbe8ad18 /include/core/SkMallocPixelRef.h
parenta728e35edcffd99216e3965a4b908ad0df7f69c2 (diff)
Consolidate PixelRef flattables with the standard impl
The flatten method on these functions can no longer be const as SkFlattenables declaration is not const and would result in the const methods only being called when the reference to the object was const. Review URL: https://codereview.appspot.com/5941043 git-svn-id: http://skia.googlecode.com/svn/trunk@3533 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkMallocPixelRef.h')
-rw-r--r--include/core/SkMallocPixelRef.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/include/core/SkMallocPixelRef.h b/include/core/SkMallocPixelRef.h
index 903bad334d..cdfec75873 100644
--- a/include/core/SkMallocPixelRef.h
+++ b/include/core/SkMallocPixelRef.h
@@ -29,15 +29,9 @@ public:
void* getAddr() const { return fStorage; }
// overrides from SkPixelRef
- virtual void flatten(SkFlattenableWriteBuffer&) const;
- virtual Factory getFactory() const {
- return Create;
- }
- static SkPixelRef* Create(SkFlattenableReadBuffer& buffer) {
- return SkNEW_ARGS(SkMallocPixelRef, (buffer));
- }
-
- SK_DECLARE_PIXEL_REF_REGISTRAR()
+ virtual void flatten(SkFlattenableWriteBuffer&);
+ SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMallocPixelRef)
+
protected:
// overrides from SkPixelRef
virtual void* onLockPixels(SkColorTable**);