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

Unified Diff: tools/picture_utils.cpp

Issue 2072813002: Revert of Lots of progress switching to SkColorSpace rather than SkColorProfileType (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 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 | « tools/flags/SkCommonFlagsConfig.cpp ('k') | tools/skiaserve/Request.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/picture_utils.cpp
diff --git a/tools/picture_utils.cpp b/tools/picture_utils.cpp
index a6803c67db42efdb26d5a4d8a50869860350a65c..63a48ce3e17b61749ecde00178d609fa98795fa3 100644
--- a/tools/picture_utils.cpp
+++ b/tools/picture_utils.cpp
@@ -80,9 +80,8 @@
SkAutoTMalloc<uint32_t> rgba(w*h);
- auto srgbColorSpace = SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named);
- if (bitmap. colorType() == kN32_SkColorType &&
- bitmap.colorSpace() == srgbColorSpace.get()) {
+ if (bitmap. colorType() == kN32_SkColorType &&
+ bitmap.profileType() == kSRGB_SkColorProfileType) {
// These are premul sRGB 8-bit pixels in SkPMColor order.
// We want unpremul sRGB 8-bit pixels in RGBA order. We'll get there via floats.
bitmap.lockPixels();
« no previous file with comments | « tools/flags/SkCommonFlagsConfig.cpp ('k') | tools/skiaserve/Request.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698