| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 skiagm::GMRegistry::Factory fFactory; | 101 skiagm::GMRegistry::Factory fFactory; |
| 102 }; | 102 }; |
| 103 | 103 |
| 104 class CodecSrc : public Src { | 104 class CodecSrc : public Src { |
| 105 public: | 105 public: |
| 106 enum Mode { | 106 enum Mode { |
| 107 kCodec_Mode, | 107 kCodec_Mode, |
| 108 kScanline_Mode, | 108 kScanline_Mode, |
| 109 kStripe_Mode, // Tests the skipping of scanlines | 109 kStripe_Mode, // Tests the skipping of scanlines |
| 110 kSubset_Mode, // For codecs that support subsets directly. | 110 kSubset_Mode, // For codecs that support subsets directly. |
| 111 kYUV_Mode, // Decode to YUV and let the GPU handle drawing. |
| 111 }; | 112 }; |
| 112 enum DstColorType { | 113 enum DstColorType { |
| 113 kGetFromCanvas_DstColorType, | 114 kGetFromCanvas_DstColorType, |
| 114 kIndex8_Always_DstColorType, | 115 kIndex8_Always_DstColorType, |
| 115 kGrayscale_Always_DstColorType, | 116 kGrayscale_Always_DstColorType, |
| 116 }; | 117 }; |
| 117 CodecSrc(Path, Mode, DstColorType, float); | 118 CodecSrc(Path, Mode, DstColorType, float); |
| 118 | 119 |
| 119 Error draw(SkCanvas*) const override; | 120 Error draw(SkCanvas*) const override; |
| 120 SkISize size() const override; | 121 SkISize size() const override; |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 | 361 |
| 361 class ViaTwice : public Via { | 362 class ViaTwice : public Via { |
| 362 public: | 363 public: |
| 363 explicit ViaTwice(Sink* sink) : Via(sink) {} | 364 explicit ViaTwice(Sink* sink) : Via(sink) {} |
| 364 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; | 365 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; |
| 365 }; | 366 }; |
| 366 | 367 |
| 367 } // namespace DM | 368 } // namespace DM |
| 368 | 369 |
| 369 #endif//DMSrcSink_DEFINED | 370 #endif//DMSrcSink_DEFINED |
| OLD | NEW |