aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/codec
diff options
context:
space:
mode:
authorGravatar scroggo <scroggo@google.com>2015-03-20 11:55:55 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-03-20 11:55:55 -0700
commit1dd3ea9d4523436578c86dc8d8f43d63fa188c01 (patch)
treefe7f1732cf90437a87a8e4b74fd741f0bded10e1 /src/codec
parent01a78130dc357e5ee746a37650dba622e0c07f8e (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.h2
-rw-r--r--src/codec/SkCodec_libpng.h2
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;