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

Unified Diff: src/lazy/SkLazyPixelRef.cpp

Issue 25275004: store SkAlphaType inside SkBitmap, on road to support unpremul (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: remove occurances of setIsOpaque Created 7 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
Index: src/lazy/SkLazyPixelRef.cpp
diff --git a/src/lazy/SkLazyPixelRef.cpp b/src/lazy/SkLazyPixelRef.cpp
index 9e023c4a7c8859369886fe07a650c85fe1c69e23..f322c9324dd3ee7ef31a75bea53364061d1ca1cf 100644
--- a/src/lazy/SkLazyPixelRef.cpp
+++ b/src/lazy/SkLazyPixelRef.cpp
@@ -156,9 +156,10 @@ static bool init_from_info(SkBitmap* bm, const SkImage::Info& info,
return false;
}
- bm->setConfig(config, info.fWidth, info.fHeight, rowBytes);
- bm->setIsOpaque(isOpaque);
- return bm->allocPixels();
+ return bm->setConfig(config, info.fWidth, info.fHeight, rowBytes,
+ isOpaque ? kOpaque_SkAlphaType : kPremul_SkAlphaType)
scroggo 2013/09/30 22:20:04 Again, I think you can just use info.fAlphaType.
+ &&
+ bm->allocPixels();
}
bool SkLazyPixelRef::onImplementsDecodeInto() {

Powered by Google App Engine
This is Rietveld 408576698