aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBitmap.cpp
diff options
context:
space:
mode:
authorGravatar herb <herb@google.com>2016-04-20 15:07:32 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-20 15:07:32 -0700
commit9bc22351b59a77d9cafb0bccf69aac84425a7503 (patch)
tree0d2f6e79b7beedc4b644b78ffa6ebcfd75809c9c /src/core/SkBitmap.cpp
parent650f9e9a2630026d578970c6d031d7d4644f63b4 (diff)
Make all the codecs default profiles based on gTreatSkColorAsSRGB.
Diffstat (limited to 'src/core/SkBitmap.cpp')
-rw-r--r--src/core/SkBitmap.cpp8
1 files changed, 6 insertions, 2 deletions
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<unsigned>(r.fTop) < static_cast<unsigned>(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) {