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

Unified Diff: src/lazy/SkBitmapFactory.cpp

Issue 25275004: store SkAlphaType inside SkBitmap, on road to support unpremul (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 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/lazy/SkBitmapFactory.cpp
diff --git a/src/lazy/SkBitmapFactory.cpp b/src/lazy/SkBitmapFactory.cpp
index 0ff4ee2d17d018cf36f4af49def81340e33df12f..546485140203b070e9a78c9a017f9765edfe4071 100644
--- a/src/lazy/SkBitmapFactory.cpp
+++ b/src/lazy/SkBitmapFactory.cpp
@@ -53,16 +53,13 @@ bool SkBitmapFactory::installPixelRef(SkData* data, SkBitmap* dst) {
return false;
}
- bool isOpaque = false;
- SkBitmap::Config config = SkImageInfoToBitmapConfig(info, &isOpaque);
+ SkBitmap::Config config = SkImageInfoToBitmapConfig(info);
Target target;
// FIMXE: There will be a problem if this rowbytes is calculated differently from
// in SkLazyPixelRef.
target.fRowBytes = SkImageMinRowBytes(info);
-
- dst->setConfig(config, info.fWidth, info.fHeight, target.fRowBytes);
- dst->setIsOpaque(isOpaque);
+ dst->setConfig(config, info.fWidth, info.fHeight, target.fRowBytes, info.fAlphaType);
// fImageCache and fCacheSelector are mutually exclusive.
SkASSERT(NULL == fImageCache || NULL == fCacheSelector);

Powered by Google App Engine
This is Rietveld 408576698