Fix code regression to more precise call.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1905993002

Review URL: https://codereview.chromium.org/1905993002
This commit is contained in:
herb 2016-04-21 08:45:39 -07:00 committed by Commit bot
parent e0c1d285a0
commit b5d7468e55

View File

@ -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) {