From 9bc22351b59a77d9cafb0bccf69aac84425a7503 Mon Sep 17 00:00:00 2001 From: herb Date: Wed, 20 Apr 2016 15:07:32 -0700 Subject: Make all the codecs default profiles based on gTreatSkColorAsSRGB. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1893203006 Review URL: https://codereview.chromium.org/1893203006 --- src/core/SkBitmap.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/core/SkBitmap.cpp') diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp index 3bb763b4f4..f9da29bc27 100644 --- a/src/core/SkBitmap.cpp +++ b/src/core/SkBitmap.cpp @@ -747,7 +747,9 @@ 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(this->info().makeWH(subset.width(), subset.height())); + dst.setInfo(SkImageInfo::Make(subset.width(), subset.height(), + this->colorType(), this->alphaType(), + this->profileType())); dst.setIsVolatile(this->isVolatile()); dst.setPixelRef(pixelRef)->unref(); SkDEBUGCODE(dst.validate()); @@ -762,7 +764,9 @@ bool SkBitmap::extractSubset(SkBitmap* result, const SkIRect& subset) const { SkASSERT(static_cast(r.fTop) < static_cast(this->height())); SkBitmap dst; - dst.setInfo(this->info().makeWH(r.width(), r.height()), this->rowBytes()); + dst.setInfo(SkImageInfo::Make(r.width(), r.height(), + this->colorType(), this->alphaType(), this->profileType()), + this->rowBytes()); dst.setIsVolatile(this->isVolatile()); if (fPixelRef) { -- cgit v1.2.3