From f1901788d8753332c5748a30e8d14e290c155bd1 Mon Sep 17 00:00:00 2001 From: "commit-bot@chromium.org" Date: Wed, 8 Jan 2014 22:24:55 +0000 Subject: use SkImageInfo directly, instead of convert to Config BUG= R=scroggo@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/128953003 git-svn-id: http://skia.googlecode.com/svn/trunk@12977 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/image/SkImage_Raster.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/image') diff --git a/src/image/SkImage_Raster.cpp b/src/image/SkImage_Raster.cpp index 9863c337e0..32d53fc52e 100644 --- a/src/image/SkImage_Raster.cpp +++ b/src/image/SkImage_Raster.cpp @@ -92,10 +92,9 @@ SkImage_Raster::SkImage_Raster(const Info& info, SkData* data, size_t rowBytes) } SkImage_Raster::SkImage_Raster(const Info& info, SkPixelRef* pr, size_t rowBytes) -: INHERITED(info.fWidth, info.fHeight) { - SkBitmap::Config config = SkImageInfoToBitmapConfig(info); - - fBitmap.setConfig(config, info.fWidth, info.fHeight, rowBytes, info.fAlphaType); + : INHERITED(info.fWidth, info.fHeight) +{ + fBitmap.setConfig(info, rowBytes); fBitmap.setPixelRef(pr); } -- cgit v1.2.3