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

Unified Diff: tools/picture_utils.cpp

Issue 2069173002: Lots of progress switching to SkColorSpace rather than SkColorProfileType (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix bad assert 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 63a48ce3e17b61749ecde00178d609fa98795fa3..a6803c67db42efdb26d5a4d8a50869860350a65c 100644
--- a/tools/picture_utils.cpp
+++ b/tools/picture_utils.cpp
@@ -80,8 +80,9 @@ namespace sk_tools {
SkAutoTMalloc<uint32_t> rgba(w*h);
- if (bitmap. colorType() == kN32_SkColorType &&
- bitmap.profileType() == kSRGB_SkColorProfileType) {
+ auto srgbColorSpace = SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named);
+ if (bitmap. colorType() == kN32_SkColorType &&
+ bitmap.colorSpace() == srgbColorSpace.get()) {
// 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