aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/image/SkImage_Raster.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/image/SkImage_Raster.cpp')
-rw-r--r--src/image/SkImage_Raster.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/image/SkImage_Raster.cpp b/src/image/SkImage_Raster.cpp
index 93de5ea3ab..a872ae36e5 100644
--- a/src/image/SkImage_Raster.cpp
+++ b/src/image/SkImage_Raster.cpp
@@ -84,8 +84,10 @@ SkImage* SkImage_Raster::NewEmpty() {
SkImage_Raster::SkImage_Raster(const Info& info, SkData* data, size_t rowBytes)
: INHERITED(info.fWidth, info.fHeight) {
- fBitmap.setConfig(info, rowBytes);
- fBitmap.setPixelRef(SkNEW_ARGS(SkDataPixelRef, (info, data, rowBytes)))->unref();
+ SkBitmap::Config config = SkImageInfoToBitmapConfig(info);
+
+ fBitmap.setConfig(config, info.fWidth, info.fHeight, rowBytes, info.fAlphaType);
+ fBitmap.setPixelRef(SkNEW_ARGS(SkDataPixelRef, (data)))->unref();
fBitmap.setImmutable();
}