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

Unified Diff: src/core/SkBitmap.cpp

Issue 1893203006: Make all the codecs default profiles based on gDefaultProfileIsSRGB. (Closed) Base URL: https://skia.googlesource.com/skia.git@add-imageinfo-to-SkImage_Base
Patch Set: Make private work. 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 | « include/private/SkImageInfoPriv.h ('k') | src/core/SkBitmapProvider.cpp » ('j') | 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 3bb763b4f43cf65f7117dbcdb79cbe8f444b79bb..f9da29bc275b8219c4de0cf4c6bdf3b2918416de 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(),
Brian Osman 2016/04/21 13:33:37 Sorry, I just went back and looked at this change
herb_g 2016/04/21 15:09:54 No This is a regression probably from one of the m
+ 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) {
« no previous file with comments | « include/private/SkImageInfoPriv.h ('k') | src/core/SkBitmapProvider.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698