Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Unified Diff: src/core/SkBitmap.cpp

Issue 1892543002: Make sure the color profile propagetes through the system. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: change to makeWH call Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmap.cpp
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp
index 7e8e62e88b2c684adb5573a782da5cd06c47d73a..3bb763b4f43cf65f7117dbcdb79cbe8f444b79bb 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) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698