Replace EncodeBitmap with an interface.
authorscroggo <scroggo@google.com>
Tue, 9 Dec 2014 13:23:12 +0000 (05:23 -0800)
committerCommit bot <commit-bot@chromium.org>
Tue, 9 Dec 2014 13:23:12 +0000 (05:23 -0800)
commit0c4aba6edb9900c597359dfa49d3ce4a41bc5dd1
tree0a78e9be1fabb6165e41abaadb15c5e5096f0ff2
parent8d95ffa497091d0c9c7cda099684c7bca6714a17
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