aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/image
diff options
context:
space:
mode:
authorGravatar fmalita <fmalita@chromium.org>2015-07-09 17:10:31 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-09 17:10:31 -0700
commitea561bf055bb803f4c10ca323ea60a9d94da7956 (patch)
tree170de1a02b6829fe9de73c7489de901a2e88b4f1 /src/image
parent694307c9f1ade20a3c5f968c248a66b6a2d151a8 (diff)
Fix SkImage::asLegacyBitmap() rowBytes assert
When reusing the pixel ref, we need to observe its rowBytes. R=reed@google.com Review URL: https://codereview.chromium.org/1227413002
Diffstat (limited to 'src/image')
-rw-r--r--src/image/SkImage_Raster.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/image/SkImage_Raster.cpp b/src/image/SkImage_Raster.cpp
index 489685b2fc..aac4995cfb 100644
--- a/src/image/SkImage_Raster.cpp
+++ b/src/image/SkImage_Raster.cpp
@@ -270,7 +270,7 @@ bool SkImage_Raster::onAsLegacyBitmap(SkBitmap* bitmap, LegacyBitmapMode mode) c
// pixelref since the caller might call setImmutable() themselves
// (thus changing our state).
if (fBitmap.isImmutable()) {
- bitmap->setInfo(fBitmap.info());
+ bitmap->setInfo(fBitmap.info(), fBitmap.rowBytes());
bitmap->setPixelRef(fBitmap.pixelRef(), fBitmap.pixelRefOrigin());
return true;
}