From e13af711d4ff9031c9ed3054a4c33a56a0c62e1f Mon Sep 17 00:00:00 2001 From: "commit-bot@chromium.org" Date: Mon, 13 Jan 2014 20:39:14 +0000 Subject: Revert of https://codereview.chromium.org/132643007/ Reason for revert: broken tests TBR= NOTREECHECKS=true NOTRY=true BUG= Author: reed@google.com Review URL: https://codereview.chromium.org/134843008 git-svn-id: http://skia.googlecode.com/svn/trunk@13058 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/image/SkSurface_Raster.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/image/SkSurface_Raster.cpp') diff --git a/src/image/SkSurface_Raster.cpp b/src/image/SkSurface_Raster.cpp index 7010b5fb2a..1b218eb446 100644 --- a/src/image/SkSurface_Raster.cpp +++ b/src/image/SkSurface_Raster.cpp @@ -85,12 +85,15 @@ SkSurface_Raster::SkSurface_Raster(const SkImageInfo& info, void* pixels, size_t } 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); } } -- cgit v1.2.3