| Index: src/image/SkSurface_Raster.cpp
|
| diff --git a/src/image/SkSurface_Raster.cpp b/src/image/SkSurface_Raster.cpp
|
| index ccfdd27b1cb82cab885098ca458c2f5ffd07cfa9..3835c3b36cace407f968fbb7ce1b95e4ad5df0f8 100644
|
| --- a/src/image/SkSurface_Raster.cpp
|
| +++ b/src/image/SkSurface_Raster.cpp
|
| @@ -86,9 +86,9 @@ SkSurface_Raster::SkSurface_Raster(const SkImage::Info& info, void* pixels, size
|
| bool isOpaque;
|
| SkBitmap::Config config = SkImageInfoToBitmapConfig(info, &isOpaque);
|
|
|
| - fBitmap.setConfig(config, info.fWidth, info.fHeight, rb);
|
| + fBitmap.setConfig(config, info.fWidth, info.fHeight, rb, isOpaque ?
|
| + kOpaque_SkAlphaType : kPremul_SkAlphaType);
|
| fBitmap.setPixels(pixels);
|
| - fBitmap.setIsOpaque(isOpaque);
|
| fWeOwnThePixels = false; // We are "Direct"
|
| }
|
|
|
| @@ -97,9 +97,9 @@ SkSurface_Raster::SkSurface_Raster(const SkImage::Info& info, SkPixelRef* pr, si
|
| bool isOpaque;
|
| SkBitmap::Config config = SkImageInfoToBitmapConfig(info, &isOpaque);
|
|
|
| - fBitmap.setConfig(config, info.fWidth, info.fHeight, rb);
|
| + fBitmap.setConfig(config, info.fWidth, info.fHeight, rb, isOpaque ?
|
| + kOpaque_SkAlphaType : kPremul_SkAlphaType);
|
| fBitmap.setPixelRef(pr);
|
| - fBitmap.setIsOpaque(isOpaque);
|
| fWeOwnThePixels = true;
|
|
|
| if (!isOpaque) {
|
|
|