Commit Graph

7 Commits

Author SHA1 Message Date
Brian Osman
ea236bf818 Move skcms.h to include/third_party/skcms
Add a shim to redirect until clients are updated

Change-Id: Ib43614e5620b1a24ca18187c1646a8ed1a9ee7a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211003
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-04-29 15:02:45 +00:00
Mike Klein
c0bd9f9fe5 rewrite includes to not need so much -Ifoo
Current strategy: everything from the top

Things to look at first are the manual changes:

   - added tools/rewrite_includes.py
   - removed -Idirectives from BUILD.gn
   - various compile.sh simplifications
   - tweak tools/embed_resources.py
   - update gn/find_headers.py to write paths from the top
   - update gn/gn_to_bp.py SkUserConfig.h layout
     so that #include "include/config/SkUserConfig.h" always
     gets the header we want.

No-Presubmit: true
Change-Id: I73a4b181654e0e38d229bc456c0d0854bae3363e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209706
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-04-24 16:27:11 +00:00
Brian Osman
c3186302bd Add skcms directory to public includes
skcms is part of Skia's public API now. This attempts to recognize that,
and pave the way for moving the header to another location more easily
in a follow up CL, or - at a minimum - for clients that redistribute
Skia as a library + includes to relocate the skcms.h header as part of
that.

Change-Id: I15da63b0d4ab8916a71fb7e6ab3656db87252707
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209640
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-04-22 20:32:23 +00:00
Brian Osman
18df87ec8b Fix bugs and add features to imgcvt
- The dst_profile data needs to live at least as long as the profile.
- Support converting jpg sources (where pixmap alpha type is kOpaque).
- Add a fallback path that makes the destination profile usable.

Bug: skia:
Change-Id: I11c2c7213532f4b6ba38afd45dd6a2afddea0c52
Reviewed-on: https://skia-review.googlesource.com/c/181171
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-01-04 16:43:07 +00:00
Mike Klein
fd731e4684 add a few more ways to convert images to imgcvt
Interestingly, the draw ends up a little different than the
writePixels() and skcms paths.  Maybe just premul/unpremul?

Bug: chromium:867813
Change-Id: I8bf645c8354cbeb9a07512add258e8defc755366
Reviewed-on: https://skia-review.googlesource.com/c/164621
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-10-23 17:57:18 +00:00
Mike Klein
06a215b768 add profile->profile mode to imgcvt
E.g.

out/imgcvt /System/Library/ColorSync/Profiles/ITU-2020.icc ~/skcms/profiles/mobile/sRGB_parametric.icc
(0, 0, 0) --> (+0.0000, +0.0000, +0.0000)
(1, 1, 1) --> (+0.9998, +0.9998, +0.9998)
(1, 0, 0) --> (+1.2481, -0.3879, -0.1435)
(0, 1, 0) --> (-0.7903, +1.0561, -0.3501)
(0, 0, 1) --> (-0.2992, -0.0886, +1.0503)
(0, 1, 1) --> (-0.8325, +1.0527, +1.0077)
(1, 0, 1) --> (+1.2239, -0.4000, +1.0428)
(1, 1, 0) --> (+1.0312, +1.0035, -0.3791)

Change-Id: Ieb38a3b519f00ae56491c3265ed9725888b692e9
Reviewed-on: https://skia-review.googlesource.com/152360
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-09-06 18:54:19 +00:00
Mike Klein
7af351a68c add imgcvt
This uses skcms to convert an image into a PNG with a new color profile.

Change-Id: Iaefdbbfba6f4b85637386569a65355df255b980d
Reviewed-on: https://skia-review.googlesource.com/143709
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
2018-07-27 15:11:17 +00:00