OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef DMSrcSink_DEFINED | 8 #ifndef DMSrcSink_DEFINED |
9 #define DMSrcSink_DEFINED | 9 #define DMSrcSink_DEFINED |
10 | 10 |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 // Mimic legacy behavior and apply no color correction. | 205 // Mimic legacy behavior and apply no color correction. |
206 kBaseline_Mode, | 206 kBaseline_Mode, |
207 | 207 |
208 // Color correct images into a specific dst color space. If you happen
to have this | 208 // Color correct images into a specific dst color space. If you happen
to have this |
209 // monitor, you're in luck! The unmarked outputs of this test should di
splay | 209 // monitor, you're in luck! The unmarked outputs of this test should di
splay |
210 // correctly on this monitor in the Chrome browser. If not, it's useful
to know | 210 // correctly on this monitor in the Chrome browser. If not, it's useful
to know |
211 // that this monitor has a profile that is fairly similar to Adobe RGB. | 211 // that this monitor has a profile that is fairly similar to Adobe RGB. |
212 // TODO (msarett): Should we add a new test with a new monitor and verif
y that outputs | 212 // TODO (msarett): Should we add a new test with a new monitor and verif
y that outputs |
213 // look identical on two different dsts? | 213 // look identical on two different dsts? |
214 kDst_HPZR30w_Mode, | 214 kDst_HPZR30w_Mode, |
215 | |
216 // Use QCMS for color correction. | |
217 kQCMS_HPZR30w_Mode, | |
218 }; | 215 }; |
219 | 216 |
220 ColorCodecSrc(Path, Mode); | 217 ColorCodecSrc(Path, Mode, sk_sp<SkColorSpace>); |
221 | 218 |
222 Error draw(SkCanvas*) const override; | 219 Error draw(SkCanvas*) const override; |
223 SkISize size() const override; | 220 SkISize size() const override; |
224 Name name() const override; | 221 Name name() const override; |
225 bool veto(SinkFlags) const override; | 222 bool veto(SinkFlags) const override; |
226 private: | 223 private: |
227 Path fPath; | 224 Path fPath; |
228 Mode fMode; | 225 Mode fMode; |
| 226 sk_sp<SkColorSpace> fDstSpace; |
229 }; | 227 }; |
230 | 228 |
231 class SKPSrc : public Src { | 229 class SKPSrc : public Src { |
232 public: | 230 public: |
233 explicit SKPSrc(Path path); | 231 explicit SKPSrc(Path path); |
234 | 232 |
235 Error draw(SkCanvas*) const override; | 233 Error draw(SkCanvas*) const override; |
236 SkISize size() const override; | 234 SkISize size() const override; |
237 Name name() const override; | 235 Name name() const override; |
238 private: | 236 private: |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 | 392 |
395 class ViaMojo : public Via { | 393 class ViaMojo : public Via { |
396 public: | 394 public: |
397 explicit ViaMojo(Sink* sink) : Via(sink) {} | 395 explicit ViaMojo(Sink* sink) : Via(sink) {} |
398 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; | 396 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; |
399 }; | 397 }; |
400 | 398 |
401 } // namespace DM | 399 } // namespace DM |
402 | 400 |
403 #endif//DMSrcSink_DEFINED | 401 #endif//DMSrcSink_DEFINED |
OLD | NEW |