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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 bool veto(SinkFlags) const override; | 201 bool veto(SinkFlags) const override; |
202 bool serial() const override { return fRunSerially; } | 202 bool serial() const override { return fRunSerially; } |
203 private: | 203 private: |
204 Path fPath; | 204 Path fPath; |
205 Mode fMode; | 205 Mode fMode; |
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 { |
| 212 public: |
| 213 enum Mode { |
| 214 // Mimic legacy behavior and apply no color correction. |
| 215 kBaseline_Mode, |
| 216 }; |
| 217 |
| 218 ColorCodecSrc(Path, Mode); |
| 219 |
| 220 Error draw(SkCanvas*) const override; |
| 221 SkISize size() const override; |
| 222 Name name() const override; |
| 223 bool veto(SinkFlags) const override; |
| 224 private: |
| 225 Path fPath; |
| 226 Mode fMode; |
| 227 }; |
| 228 |
211 class SKPSrc : public Src { | 229 class SKPSrc : public Src { |
212 public: | 230 public: |
213 explicit SKPSrc(Path path); | 231 explicit SKPSrc(Path path); |
214 | 232 |
215 Error draw(SkCanvas*) const override; | 233 Error draw(SkCanvas*) const override; |
216 SkISize size() const override; | 234 SkISize size() const override; |
217 Name name() const override; | 235 Name name() const override; |
218 private: | 236 private: |
219 Path fPath; | 237 Path fPath; |
220 }; | 238 }; |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 | 392 |
375 class ViaMojo : public Via { | 393 class ViaMojo : public Via { |
376 public: | 394 public: |
377 explicit ViaMojo(Sink* sink) : Via(sink) {} | 395 explicit ViaMojo(Sink* sink) : Via(sink) {} |
378 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; | 396 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; |
379 }; | 397 }; |
380 | 398 |
381 } // namespace DM | 399 } // namespace DM |
382 | 400 |
383 #endif//DMSrcSink_DEFINED | 401 #endif//DMSrcSink_DEFINED |
OLD | NEW |