aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBitmap.cpp
diff options
context:
space:
mode:
authorGravatar herb <herb@google.com>2016-04-21 08:45:39 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-21 08:45:39 -0700
commitb5d7468e5559c78a7c3fe2c0b97ea262fbac550c (patch)
tree2209356159e03376130be2debf61b95d9c409a94 /src/core/SkBitmap.cpp
parente0c1d285a00e47e1d1584e6a35b95ef2f0d945ff (diff)
Fix code regression to more precise call.
Diffstat (limited to 'src/core/SkBitmap.cpp')
-rw-r--r--src/core/SkBitmap.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp
index f9da29bc27..3bb763b4f4 100644
--- a/src/core/SkBitmap.cpp
+++ b/src/core/SkBitmap.cpp
@@ -747,9 +747,7 @@ bool SkBitmap::extractSubset(SkBitmap* result, const SkIRect& subset) const {
SkPixelRef* pixelRef = fPixelRef->deepCopy(this->colorType(), this->profileType(), &subset);
if (pixelRef != nullptr) {
SkBitmap dst;
- dst.setInfo(SkImageInfo::Make(subset.width(), subset.height(),
- this->colorType(), this->alphaType(),
- this->profileType()));
+ dst.setInfo(this->info().makeWH(subset.width(), subset.height()));
dst.setIsVolatile(this->isVolatile());
dst.setPixelRef(pixelRef)->unref();
SkDEBUGCODE(dst.validate());
@@ -764,9 +762,7 @@ bool SkBitmap::extractSubset(SkBitmap* result, const SkIRect& subset) const {
SkASSERT(static_cast<unsigned>(r.fTop) < static_cast<unsigned>(this->height()));
SkBitmap dst;
- dst.setInfo(SkImageInfo::Make(r.width(), r.height(),
- this->colorType(), this->alphaType(), this->profileType()),
- this->rowBytes());
+ dst.setInfo(this->info().makeWH(r.width(), r.height()), this->rowBytes());
dst.setIsVolatile(this->isVolatile());
if (fPixelRef) {