Index: src/image/SkSurface_Raster.cpp |
diff --git a/src/image/SkSurface_Raster.cpp b/src/image/SkSurface_Raster.cpp |
index 7010b5fb2abb1f790baa1e5c9fd947c6e7621099..1b218eb446222a1e64802c357b8a7ab3c28e362e 100644 |
--- a/src/image/SkSurface_Raster.cpp |
+++ b/src/image/SkSurface_Raster.cpp |
@@ -85,12 +85,15 @@ |
} |
SkSurface_Raster::SkSurface_Raster(SkPixelRef* pr) |
- : INHERITED(pr->info()) |
+ : INHERITED(pr->info().fWidth, pr->info().fHeight) |
{ |
- fBitmap.installPixelRef(pr); |
+ const SkImageInfo& info = pr->info(); |
+ |
+ fBitmap.setConfig(info, info.minRowBytes()); |
+ fBitmap.setPixelRef(pr); |
fWeOwnThePixels = true; |
- if (!pr->info().isOpaque()) { |
+ if (!info.isOpaque()) { |
fBitmap.eraseColor(SK_ColorTRANSPARENT); |
} |
} |