Replace EncodeBitmap with an interface.
authorscroggo <scroggo@google.com>
Thu, 11 Dec 2014 18:53:58 +0000 (10:53 -0800)
committerCommit bot <commit-bot@chromium.org>
Thu, 11 Dec 2014 18:53:58 +0000 (10:53 -0800)
commit895c43b28b27bb3124db3d32efd0c7219eb4a3cb
tree6ddad54915062eca5db65a8ad56525540ce380b1
parent436293a3308d58ce494d9667bd13428dd6e35236
Replace EncodeBitmap with an interface.

Gives more flexibility to the caller to decide whether to use the
encoded data returned by refEncodedData().

Provides an implementation that supports the old version of
SkPicture::serialize().

TODO: Update Chrome, so we can remove SK_LEGACY_ENCODE_BITMAP entirely

BUG=skia:3190

Review URL: https://codereview.chromium.org/784643002
12 files changed:
dm/DMSerializeTask.cpp
gm/gmmain.cpp
gyp/skia_for_chromium_defines.gypi
include/core/SkPicture.h
include/core/SkPixelSerializer.h [new file with mode: 0644]
include/core/SkWriteBuffer.h
src/core/SkPicture.cpp
src/core/SkPictureData.cpp
src/core/SkPictureData.h
src/core/SkWriteBuffer.cpp
tests/PictureTest.cpp
tools/PictureRenderer.cpp