aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/codec/SkBmpCodec.cpp
diff options
context:
space:
mode:
authorGravatar benjaminwagner <benjaminwagner@google.com>2015-12-04 08:48:26 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-12-04 08:48:26 -0800
commit886e5e41db5d6d42368f225785013c9308dc66bc (patch)
treee168d7240ec06966d6469f5821e38b537e45bb71 /src/codec/SkBmpCodec.cpp
parentbe8216a922241cc8f3ea3b813608fcb06936fde0 (diff)
Fix overflow caught by ASAN.
Diffstat (limited to 'src/codec/SkBmpCodec.cpp')
-rw-r--r--src/codec/SkBmpCodec.cpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/codec/SkBmpCodec.cpp b/src/codec/SkBmpCodec.cpp
index aff54021a7..580ff25ddd 100644
--- a/src/codec/SkBmpCodec.cpp
+++ b/src/codec/SkBmpCodec.cpp
@@ -550,19 +550,6 @@ int32_t SkBmpCodec::getDstRow(int32_t y, int32_t height) const {
return height - y - 1;
}
-/*
- * Compute the number of colors in the color table
- */
-uint32_t SkBmpCodec::computeNumColors(uint32_t numColors) {
- // Zero is a default for maxColors
- // Also set numColors to maxColors when it is too large
- uint32_t maxColors = 1 << fBitsPerPixel;
- if (numColors == 0 || numColors >= maxColors) {
- return maxColors;
- }
- return numColors;
-}
-
SkCodec::Result SkBmpCodec::onStartScanlineDecode(const SkImageInfo& dstInfo,
const SkCodec::Options& options, SkPMColor inputColorPtr[], int* inputColorCount) {
if (!conversion_possible(dstInfo, this->getInfo())) {