Add SkCodec, including PNG implementation.
authorscroggo <scroggo@google.com>
Mon, 2 Mar 2015 20:23:48 +0000 (12:23 -0800)
committerCommit bot <commit-bot@chromium.org>
Mon, 2 Mar 2015 20:23:48 +0000 (12:23 -0800)
commitca358852b4fed656d11107b2aaf28318a4518b49
tree88ccb56a0f51ac9c40d639a095e328a3ac380257
parentd0f5457c5ec974b3a0b080125a5ba07214c6d9d2
Add SkCodec, including PNG implementation.

DM:
Add a flag to use SkCodec instead of SkImageDecoder.

SkCodec:
Base class for codecs, allowing creation from an SkStream or an SkData.
An SkCodec, on creation, knows properties of the data like its width and height. Further calls can be used to generate the image.
TODO: Add scanline iterator

SkPngCodec:
New decoder for png. Wraps libpng. The code has been repurposed from SkImageDecoder_libpng.
TODO: Handle other destination colortypes
TODO: Substitute the transpose color
TODO: Allow silencing warnings
TODO: Use RGB instead of filler?
TODO: sRGB

SkSwizzler:
Simplified version of SkScaledSampler. Unlike the sampler, this object does no sampling.
TODO: Implement other swizzles.

BUG=skia:3257

Review URL: https://codereview.chromium.org/930283002
13 files changed:
DEPS
dm/DMSrcSink.cpp
gyp/codec.gyp [new file with mode: 0644]
gyp/common_variables.gypi
gyp/copy_file.py [new file with mode: 0644]
gyp/libpng.gyp
gyp/skia_lib.gyp
include/codec/SkCodec.h [new file with mode: 0644]
src/codec/SkCodec.cpp [new file with mode: 0644]
src/codec/SkCodec_libpng.cpp [new file with mode: 0644]
src/codec/SkCodec_libpng.h [new file with mode: 0644]
src/codec/SkSwizzler.cpp [new file with mode: 0644]
src/codec/SkSwizzler.h [new file with mode: 0644]