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

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..1f4fca124bf75579e935a302a5da8da6d7925413 100644
--- a/src/lazy/SkBitmapFactory.cpp
+++ b/src/lazy/SkBitmapFactory.cpp
@@ -61,8 +61,8 @@ bool SkBitmapFactory::installPixelRef(SkData* data, SkBitmap* dst) {
// 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,
+ isOpaque ? kOpaque_SkAlphaType : kPremul_SkAlphaType);
scroggo 2013/10/18 19:32:40 info should have the actual alpha type.
// fImageCache and fCacheSelector are mutually exclusive.
SkASSERT(NULL == fImageCache || NULL == fCacheSelector);

Powered by Google App Engine
This is Rietveld 408576698