diff options
author | 2015-03-20 11:55:55 -0700 | |
---|---|---|
committer | 2015-03-20 11:55:55 -0700 | |
commit | 1dd3ea9d4523436578c86dc8d8f43d63fa188c01 (patch) | |
tree | fe7f1732cf90437a87a8e4b74fd741f0bded10e1 /src/codec | |
parent | 01a78130dc357e5ee746a37650dba622e0c07f8e (diff) |
Add SkEncodedFormat, used by SkCodec.
Needed by Android to determine the format.
Review URL: https://codereview.chromium.org/1018953003
Diffstat (limited to 'src/codec')
-rw-r--r-- | src/codec/SkCodec_libbmp.h | 2 | ||||
-rw-r--r-- | src/codec/SkCodec_libpng.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/codec/SkCodec_libbmp.h b/src/codec/SkCodec_libbmp.h index e6620d275d..fb23716f77 100644 --- a/src/codec/SkCodec_libbmp.h +++ b/src/codec/SkCodec_libbmp.h @@ -7,6 +7,7 @@ #include "SkCodec.h" #include "SkColorTable.h" +#include "SkEncodedFormat.h" #include "SkImageInfo.h" #include "SkMaskSwizzler.h" #include "SkStream.h" @@ -60,6 +61,7 @@ protected: size_t dstRowBytes, const Options&, SkPMColor*, int*) SK_OVERRIDE; + SkEncodedFormat onGetEncodedFormat() const SK_OVERRIDE { return kBMP_SkEncodedFormat; } private: /* diff --git a/src/codec/SkCodec_libpng.h b/src/codec/SkCodec_libpng.h index b255449fb5..debb14b882 100644 --- a/src/codec/SkCodec_libpng.h +++ b/src/codec/SkCodec_libpng.h @@ -6,6 +6,7 @@ */ #include "SkCodec.h" +#include "SkEncodedFormat.h" #include "SkImageInfo.h" extern "C" { @@ -24,6 +25,7 @@ public: protected: Result onGetPixels(const SkImageInfo&, void*, size_t, const Options&, SkPMColor*, int*) SK_OVERRIDE; + SkEncodedFormat onGetEncodedFormat() const SK_OVERRIDE { return kPNG_SkEncodedFormat; } private: png_structp fPng_ptr; png_infop fInfo_ptr; |