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

Unified Diff: src/images/SkImageDecoder_libgif.cpp

Issue 611093002: remove alphatype from colortable (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update codecs Created 6 years, 3 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
« no previous file with comments | « src/core/SkReadBuffer.h ('k') | src/images/SkImageDecoder_libpng.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/images/SkImageDecoder_libgif.cpp
diff --git a/src/images/SkImageDecoder_libgif.cpp b/src/images/SkImageDecoder_libgif.cpp
index 745f4e11f11116fbd876318bfbe4131de8efee0d..81071c95158be16957e20d3fdfb0ad3554ade7ce 100644
--- a/src/images/SkImageDecoder_libgif.cpp
+++ b/src/images/SkImageDecoder_libgif.cpp
@@ -332,7 +332,6 @@ bool SkGIFImageDecoder::onDecode(SkStream* sk_stream, SkBitmap* bm, Mode mode) {
// Declare colorPtr here for scope.
SkPMColor colorPtr[256]; // storage for worst-case
const ColorMapObject* cmap = find_colormap(gif);
- SkAlphaType alphaType = kOpaque_SkAlphaType;
if (cmap != NULL) {
SkASSERT(cmap->ColorCount == (1 << (cmap->BitsPerPixel)));
colorCount = cmap->ColorCount;
@@ -355,16 +354,13 @@ bool SkGIFImageDecoder::onDecode(SkStream* sk_stream, SkBitmap* bm, Mode mode) {
transpIndex = find_transpIndex(temp_save, colorCount);
if (transpIndex >= 0) {
colorPtr[transpIndex] = SK_ColorTRANSPARENT; // ram in a transparent SkPMColor
- alphaType = kPremul_SkAlphaType;
fillIndex = transpIndex;
} else if (fillIndex >= colorCount) {
// gif->SBackGroundColor should be less than colorCount.
fillIndex = 0; // If not, fix it.
}
- SkAutoTUnref<SkColorTable> ctable(SkNEW_ARGS(SkColorTable,
- (colorPtr, colorCount,
- alphaType)));
+ SkAutoTUnref<SkColorTable> ctable(SkNEW_ARGS(SkColorTable, (colorPtr, colorCount)));
if (!this->allocPixelRef(bm, ctable)) {
return error_return(*bm, "allocPixelRef");
}
« no previous file with comments | « src/core/SkReadBuffer.h ('k') | src/images/SkImageDecoder_libpng.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698