diff options
author | djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-03-28 20:47:01 +0000 |
---|---|---|
committer | djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-03-28 20:47:01 +0000 |
commit | 5370cd969d8f3957e4306068e6195ac1bca3d6cd (patch) | |
tree | cf1639cfb2dcc013e992f75b86056455bbe8ad18 /include/images/SkFlipPixelRef.h | |
parent | a728e35edcffd99216e3965a4b908ad0df7f69c2 (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/images/SkFlipPixelRef.h')
-rw-r--r-- | include/images/SkFlipPixelRef.h | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/include/images/SkFlipPixelRef.h b/include/images/SkFlipPixelRef.h index 455a3dace3..c9ba026878 100644 --- a/include/images/SkFlipPixelRef.h +++ b/include/images/SkFlipPixelRef.h @@ -32,6 +32,15 @@ public: const SkRegion& beginUpdate(SkBitmap* device); void endUpdate(); + + virtual void flatten(SkFlattenableWriteBuffer&); + SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkFlipPixelRef) + +protected: + virtual void* onLockPixels(SkColorTable**); + virtual void onUnlockPixels(); + + SkFlipPixelRef(SkFlattenableReadBuffer&); private: void getFrontBack(const void** front, void** back) const { @@ -50,22 +59,6 @@ private: static void CopyBitsFromAddr(const SkBitmap& dst, const SkRegion& clip, const void* srcAddr); - // serialization - -public: - virtual Factory getFactory() const { return Create; } - virtual void flatten(SkFlattenableWriteBuffer&) const; - static SkPixelRef* Create(SkFlattenableReadBuffer& buffer); - - SK_DECLARE_PIXEL_REF_REGISTRAR() - -protected: - virtual void* onLockPixels(SkColorTable**); - virtual void onUnlockPixels(); - - SkFlipPixelRef(SkFlattenableReadBuffer&); - -private: SkMutex fMutex; SkPageFlipper fFlipper; |