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

Unified Diff: src/images/SkImageDecoder_libpng.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/images/SkImageDecoder_libgif.cpp ('k') | src/images/SkImageDecoder_wbmp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/images/SkImageDecoder_libpng.cpp
diff --git a/src/images/SkImageDecoder_libpng.cpp b/src/images/SkImageDecoder_libpng.cpp
index dd1d1c8a98fd69773651dfcf4b2f15e22f35aae0..7911a293f67efc953182dfcf320463b9da2e9ef7 100644
--- a/src/images/SkImageDecoder_libpng.cpp
+++ b/src/images/SkImageDecoder_libpng.cpp
@@ -709,17 +709,7 @@ bool SkPNGImageDecoder::decodePalette(png_structp png_ptr, png_infop info_ptr,
*colorPtr = colorPtr[-1];
}
- SkAlphaType alphaType = kOpaque_SkAlphaType;
- if (reallyHasAlpha) {
- if (this->getRequireUnpremultipliedColors()) {
- alphaType = kUnpremul_SkAlphaType;
- } else {
- alphaType = kPremul_SkAlphaType;
- }
- }
-
- *colorTablep = SkNEW_ARGS(SkColorTable,
- (colorStorage, colorCount, alphaType));
+ *colorTablep = SkNEW_ARGS(SkColorTable, (colorStorage, colorCount));
*reallyHasAlphap = reallyHasAlpha;
return true;
}
« no previous file with comments | « src/images/SkImageDecoder_libgif.cpp ('k') | src/images/SkImageDecoder_wbmp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698