Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Unified Diff: src/codec/SkCodec_libbmp.cpp

Issue 1061713007: Adding png scanline decoding to kIndex8 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: ctableCount requirements Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/codec/SkCodec_libbmp.cpp
diff --git a/src/codec/SkCodec_libbmp.cpp b/src/codec/SkCodec_libbmp.cpp
index 56663f84ee3b871fcb50fedc33c41af1aec4dd96..a4b58cbb244055caeeaa9c08f9b8e547ae113658 100644
--- a/src/codec/SkCodec_libbmp.cpp
+++ b/src/codec/SkCodec_libbmp.cpp
@@ -9,7 +9,6 @@
#include "SkCodecPriv.h"
#include "SkColorPriv.h"
#include "SkStream.h"
-#include "SkUtils.h"
/*
*
@@ -603,12 +602,7 @@ SkCodec::Result SkBmpCodec::onGetPixels(const SkImageInfo& dstInfo,
}
// Copy the color table to the client if necessary
- if (kIndex_8_SkColorType == dstInfo.colorType()) {
- SkASSERT(NULL != inputColorPtr);
- SkASSERT(NULL != inputColorCount);
- SkASSERT(NULL != fColorTable.get());
- sk_memcpy32(inputColorPtr, fColorTable->readColors(), *inputColorCount);
- }
+ copy_color_table(dstInfo, fColorTable, inputColorPtr, inputColorCount);
// Perform the decode
switch (fInputFormat) {
@@ -644,7 +638,6 @@ SkCodec::Result SkBmpCodec::onGetPixels(const SkImageInfo& dstInfo,
// Inform the caller of the number of colors
if (NULL != numColors) {
- SkASSERT(256 == *numColors);
// We set the number of colors to maxColors in order to ensure
// safe memory accesses. Otherwise, an invalid pixel could
// access memory outside of our color table array.

Powered by Google App Engine
This is Rietveld 408576698