aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm/DMSrcSink.h
diff options
context:
space:
mode:
authorGravatar msarett <msarett@google.com>2016-05-23 10:21:17 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-05-23 10:21:17 -0700
commit888dc16684da2158702639be2023f998b7c27f66 (patch)
tree13a3917acd2279b80fe540c4525cbeaeb88a6222 /dm/DMSrcSink.h
parent3d7356a833ec30b33944b52dcd429f7b641d9559 (diff)
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
Diffstat (limited to 'dm/DMSrcSink.h')
-rw-r--r--dm/DMSrcSink.h11
1 files changed, 10 insertions, 1 deletions
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<SkColorSpace>);
Error draw(SkCanvas*) const override;
SkISize size() const override;
@@ -215,6 +223,7 @@ public:
private:
Path fPath;
Mode fMode;
+ sk_sp<SkColorSpace> fDstSpace;
};
class SKPSrc : public Src {