From 888dc16684da2158702639be2023f998b7c27f66 Mon Sep 17 00:00:00 2001 From: msarett Date: Mon, 23 May 2016 10:21:17 -0700 Subject: Test color correction in DM This will allow me to test and visualize some assumptions on parsing and applying color profiles. Also, it should help me find and fix bugs. This is certainly not an optimized implementation, and, as far as I know, it doesn't take any shortcuts to improve performance. We'll probably want to do both of these once we know where it fits in the pipeline. Right now this test is only run on an arbitrary set of ~100 images from the top 10k skps. I'll continue to add more "interesting" images and probably tweak the code as necessary. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1995233003 Review-Url: https://codereview.chromium.org/1995233003 --- dm/DMSrcSink.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'dm/DMSrcSink.h') diff --git a/dm/DMSrcSink.h b/dm/DMSrcSink.h index b0f67dbb29..84096bf0fe 100644 --- a/dm/DMSrcSink.h +++ b/dm/DMSrcSink.h @@ -204,9 +204,17 @@ public: enum Mode { // Mimic legacy behavior and apply no color correction. kBaseline_Mode, + + // Color correct images into a specific dst color space. If you happen to have this + // monitor, you're in luck! The unmarked outputs of this test should display + // correctly on this monitor in the Chrome browser. If not, it's useful to know + // that this monitor has a profile that is fairly similar to Adobe RGB. + // TODO (msarett): Should we add a new test with a new monitor and verify that outputs + // look identical on two different dsts? + kDst_HPZR30w_Mode, }; - ColorCodecSrc(Path, Mode); + ColorCodecSrc(Path, Mode, sk_sp); Error draw(SkCanvas*) const override; SkISize size() const override; @@ -215,6 +223,7 @@ public: private: Path fPath; Mode fMode; + sk_sp fDstSpace; }; class SKPSrc : public Src { -- cgit v1.2.3