diff options
author | 2013-10-21 14:00:07 +0000 | |
---|---|---|
committer | 2013-10-21 14:00:07 +0000 | |
commit | 383a697692cf46951fd451f6f4c3d03634a6a1cb (patch) | |
tree | a1dac6fe4fa0e4d34d032e70ff85503843ad39b8 /src/lazy/SkLazyPixelRef.cpp | |
parent | c2eae4795478ab134a2315b1a9ff2c5de1d049e4 (diff) |
store SkAlphaType inside SkBitmap, on road to support unpremul
BUG=
R=bsalomon@google.com, scroggo@google.com
Review URL: https://codereview.chromium.org/25275004
git-svn-id: http://skia.googlecode.com/svn/trunk@11877 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/lazy/SkLazyPixelRef.cpp')
-rw-r--r-- | src/lazy/SkLazyPixelRef.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/lazy/SkLazyPixelRef.cpp b/src/lazy/SkLazyPixelRef.cpp index 9e023c4a7c..22d4b112f1 100644 --- a/src/lazy/SkLazyPixelRef.cpp +++ b/src/lazy/SkLazyPixelRef.cpp @@ -150,15 +150,14 @@ SkData* SkLazyPixelRef::onRefEncodedData() { static bool init_from_info(SkBitmap* bm, const SkImage::Info& info, size_t rowBytes) { - bool isOpaque; - SkBitmap::Config config = SkImageInfoToBitmapConfig(info, &isOpaque); + SkBitmap::Config config = SkImageInfoToBitmapConfig(info); if (SkBitmap::kNo_Config == config) { 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, info.fAlphaType) + && + bm->allocPixels(); } bool SkLazyPixelRef::onImplementsDecodeInto() { |