diff options
author | brianosman <brianosman@google.com> | 2016-06-16 11:10:03 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-16 11:10:04 -0700 |
commit | 6a61a875467646f8dbc37cfecf49e12d1f475170 (patch) | |
tree | db9b06850ce0d7f35fb9d21b14a0b1c431edb349 /tools/picture_utils.cpp | |
parent | dea0340cadb759932e53416a657f5ea75fee8b5f (diff) |
Lots of progress on switching to SkColorSpace rather than SkColorProfileType
Fixed a bunch of code in Ganesh, as well as usage of SkColorProfileType in most of our tools (DM, SampleApp, Viewer, nanobench, skiaserve, HelloWorld).
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2069173002
Review-Url: https://codereview.chromium.org/2069173002
Diffstat (limited to 'tools/picture_utils.cpp')
-rw-r--r-- | tools/picture_utils.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/picture_utils.cpp b/tools/picture_utils.cpp index 63a48ce3e1..a6803c67db 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(); |