| 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 SkAlphaType fDstAlphaType; | 206 SkAlphaType fDstAlphaType; |
| 207 bool fIsGpu; | 207 bool fIsGpu; |
| 208 bool fRunSerially; | 208 bool fRunSerially; |
| 209 }; | 209 }; |
| 210 | 210 |
| 211 class ColorCodecSrc : public Src { | 211 class ColorCodecSrc : public Src { |
| 212 public: | 212 public: |
| 213 enum Mode { | 213 enum Mode { |
| 214 // Mimic legacy behavior and apply no color correction. | 214 // Mimic legacy behavior and apply no color correction. |
| 215 kBaseline_Mode, | 215 kBaseline_Mode, |
| 216 |
| 217 // Apply gamma correction into a linear space. Does not |
| 218 // change the gamut. |
| 219 kSrcToLinear_Mode, |
| 216 }; | 220 }; |
| 217 | 221 |
| 218 ColorCodecSrc(Path, Mode); | 222 ColorCodecSrc(Path, Mode); |
| 219 | 223 |
| 220 Error draw(SkCanvas*) const override; | 224 Error draw(SkCanvas*) const override; |
| 221 SkISize size() const override; | 225 SkISize size() const override; |
| 222 Name name() const override; | 226 Name name() const override; |
| 223 bool veto(SinkFlags) const override; | 227 bool veto(SinkFlags) const override; |
| 224 private: | 228 private: |
| 225 Path fPath; | 229 Path fPath; |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 | 396 |
| 393 class ViaMojo : public Via { | 397 class ViaMojo : public Via { |
| 394 public: | 398 public: |
| 395 explicit ViaMojo(Sink* sink) : Via(sink) {} | 399 explicit ViaMojo(Sink* sink) : Via(sink) {} |
| 396 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; | 400 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; |
| 397 }; | 401 }; |
| 398 | 402 |
| 399 } // namespace DM | 403 } // namespace DM |
| 400 | 404 |
| 401 #endif//DMSrcSink_DEFINED | 405 #endif//DMSrcSink_DEFINED |
| OLD | NEW |