aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar herb <herb@google.com>2016-04-14 13:58:05 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-14 13:58:05 -0700
commit149b47fec73ce945ef26463a3092bad5569b6a53 (patch)
treec58577b5112cd37075c085caff7774d60252f9f6 /src/core
parenta9eb626104e6174f16095ad69c84f5b1338f5e6b (diff)
Make sure the color profile propagetes through the system.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/SkBitmap.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp
index 7e8e62e88b..3bb763b4f4 100644
--- a/src/core/SkBitmap.cpp
+++ b/src/core/SkBitmap.cpp
@@ -747,8 +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()));
+ dst.setInfo(this->info().makeWH(subset.width(), subset.height()));
dst.setIsVolatile(this->isVolatile());
dst.setPixelRef(pixelRef)->unref();
SkDEBUGCODE(dst.validate());
@@ -763,8 +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->rowBytes());
+ dst.setInfo(this->info().makeWH(r.width(), r.height()), this->rowBytes());
dst.setIsVolatile(this->isVolatile());
if (fPixelRef) {