use SkImageInfo directly, instead of convert to Config
authorcommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 8 Jan 2014 22:24:55 +0000 (22:24 +0000)
committercommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 8 Jan 2014 22:24:55 +0000 (22:24 +0000)
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

index 9863c33..32d53fc 100644 (file)
@@ -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);
 }