aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/codec/SkBmpCodec.h
diff options
context:
space:
mode:
authorGravatar Leon Scroggins <scroggo@google.com>2017-07-10 19:51:46 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-10 19:51:59 +0000
commit8321f7585b6aded0c35e50e9af8709b25fdce3f6 (patch)
tree9a9e3a1843c8864a9e847d0c7b59b987946f6b24 /src/codec/SkBmpCodec.h
parenta48ae6ec2feb32e3d781ad43353209a90059a01d (diff)
Revert "Remove support for decoding to kIndex_8"
This reverts commit 742a3e298fda669006147e4a305bab8452369b1f. Reason for revert: Breaking Android roll: frameworks/base/core/jni/android/graphics/BitmapFactory.cpp:453:18: error: no member named 'fColorPtr' in 'SkAndroidCodec::AndroidOptions' codecOptions.fColorPtr = colorPtr; ~~~~~~~~~~~~ ^ frameworks/base/core/jni/android/graphics/BitmapFactory.cpp:454:18: error: no member named 'fColorCount' in 'SkAndroidCodec::AndroidOptions' codecOptions.fColorCount = colorCount; ~~~~~~~~~~~~ ^ Original change's description: > Remove support for decoding to kIndex_8 > > Fix up callsites, and remove tests that no longer make sense. > > Bug: skia:6828 > Change-Id: I2548c4b7528b7b1be7412563156f27b52c9d4295 > Reviewed-on: https://skia-review.googlesource.com/21664 > Reviewed-by: Derek Sollenberger <djsollen@google.com> > Commit-Queue: Leon Scroggins <scroggo@google.com> TBR=djsollen@google.com,scroggo@google.com Change-Id: I1bc669441f250690884e75a9a61427fdf75c6907 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:6828 Reviewed-on: https://skia-review.googlesource.com/22120 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
Diffstat (limited to 'src/codec/SkBmpCodec.h')
-rw-r--r--src/codec/SkBmpCodec.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/codec/SkBmpCodec.h b/src/codec/SkBmpCodec.h
index cf1460582d..e956a9fc40 100644
--- a/src/codec/SkBmpCodec.h
+++ b/src/codec/SkBmpCodec.h
@@ -91,11 +91,20 @@ protected:
* @param dstInfo Contains output information. Height specifies
* the total number of rows that will be decoded.
* @param options Additonal options to pass to the decoder.
+ * @param inputColorPtr Client-provided memory for a color table. Must
+ * be enough for 256 colors. This will be
+ * populated with colors if the encoded image uses
+ * a color table.
+ * @param inputColorCount If the encoded image uses a color table, this
+ * will be set to the number of colors in the
+ * color table.
*/
virtual SkCodec::Result onPrepareToDecode(const SkImageInfo& dstInfo,
- const SkCodec::Options& options) = 0;
+ const SkCodec::Options& options, SkPMColor inputColorPtr[],
+ int* inputColorCount) = 0;
SkCodec::Result prepareToDecode(const SkImageInfo& dstInfo,
- const SkCodec::Options& options);
+ const SkCodec::Options& options, SkPMColor inputColorPtr[],
+ int* inputColorCount);
uint32_t* xformBuffer() const { return fXformBuffer.get(); }
void resetXformBuffer(int count) { fXformBuffer.reset(new uint32_t[count]); }
@@ -135,8 +144,8 @@ private:
virtual bool skipRows(int count);
- Result onStartScanlineDecode(const SkImageInfo& dstInfo,
- const SkCodec::Options&) override;
+ Result onStartScanlineDecode(const SkImageInfo& dstInfo, const SkCodec::Options&,
+ SkPMColor inputColorPtr[], int* inputColorCount) override;
int onGetScanlines(void* dst, int count, size_t rowBytes) override;