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

Unified Diff: src/ports/SkImageDecoder_WIC.cpp

Issue 177823002: use colortypes instead of bitmap::config (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkImageDecoder_WIC.cpp
diff --git a/src/ports/SkImageDecoder_WIC.cpp b/src/ports/SkImageDecoder_WIC.cpp
index 9aaed869e363592a97ed31ccf145d89a5c78d6d1..9d5479497ea3899227dec269440d438d8ab745ac 100644
--- a/src/ports/SkImageDecoder_WIC.cpp
+++ b/src/ports/SkImageDecoder_WIC.cpp
@@ -186,7 +186,7 @@ bool SkImageDecoder_WIC::decodeStream(SkStream* stream, SkBitmap* bm, WICModes w
//Exit early if we're only looking for the bitmap bounds.
if (SUCCEEDED(hr)) {
- bm->setConfig(SkBitmap::kARGB_8888_Config, width, height);
+ bm->setConfig(SkImageInfo::MakeN32Premul(width, height));
if (kDecodeBounds_WICMode == wicMode) {
return true;
}
@@ -306,10 +306,10 @@ bool SkImageEncoder_WIC::onEncode(SkWStream* stream
//Convert to 8888 if needed.
const SkBitmap* bitmap;
SkBitmap bitmapCopy;
- if (SkBitmap::kARGB_8888_Config == bitmapOrig.config() && bitmapOrig.isOpaque()) {
+ if (kPMColor_SkColorType == bitmapOrig.colorType() && bitmapOrig.isOpaque()) {
bitmap = &bitmapOrig;
} else {
- if (!bitmapOrig.copyTo(&bitmapCopy, SkBitmap::kARGB_8888_Config)) {
+ if (!bitmapOrig.copyTo(&bitmapCopy, kPMColor_SkColorType)) {
return false;
}
bitmap = &bitmapCopy;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698