diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-12-11 18:19:10 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-12-11 18:19:10 +0000 |
commit | 786f86cea3fa73c8a640abb4643bcb29a65906eb (patch) | |
tree | 8d3992b31d7c34fe1b1ab9626c17098485fccc92 /image/SkImage_Raster.cpp | |
parent | a9d4eb1e5feadbf92991880490cfd6c3295f07ad (diff) | |
download | src-786f86cea3fa73c8a640abb4643bcb29a65906eb.tar.gz |
Revert "PixelRef now returns (nearly) everything that is currently in SkBitmap. The goal is to refactor bitmap later to remove redundancy, and more interestingly, remove the chance for a disconnect between the actual (pixelref) rowbytes and config, and the one claimed by the bitmap."""""
This reverts commit d08eca87a0bef10112a211de540f89656a80b86a.
BUG=
Review URL: https://codereview.chromium.org/108303003
git-svn-id: http://skia.googlecode.com/svn/trunk/src@12623 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'image/SkImage_Raster.cpp')
-rw-r--r-- | image/SkImage_Raster.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/image/SkImage_Raster.cpp b/image/SkImage_Raster.cpp index 93de5ea3..a872ae36 100644 --- a/image/SkImage_Raster.cpp +++ b/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(); } |