| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 private: | 91 private: |
| 92 skiagm::GMRegistry::Factory fFactory; | 92 skiagm::GMRegistry::Factory fFactory; |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 class CodecSrc : public Src { | 95 class CodecSrc : public Src { |
| 96 public: | 96 public: |
| 97 enum Mode { | 97 enum Mode { |
| 98 kNormal_Mode, | 98 kNormal_Mode, |
| 99 kScanline_Mode, | 99 kScanline_Mode, |
| 100 kScanline_Subset_Mode, | 100 kScanline_Subset_Mode, |
| 101 kStripe_Mode, // Tests the skipping of scanlines |
| 101 }; | 102 }; |
| 102 enum DstColorType { | 103 enum DstColorType { |
| 103 kGetFromCanvas_DstColorType, | 104 kGetFromCanvas_DstColorType, |
| 104 kIndex8_Always_DstColorType, | 105 kIndex8_Always_DstColorType, |
| 105 kGrayscale_Always_DstColorType, | 106 kGrayscale_Always_DstColorType, |
| 106 }; | 107 }; |
| 107 CodecSrc(Path, Mode, DstColorType); | 108 CodecSrc(Path, Mode, DstColorType, float); |
| 108 | 109 |
| 109 Error draw(SkCanvas*) const override; | 110 Error draw(SkCanvas*) const override; |
| 110 SkISize size() const override; | 111 SkISize size() const override; |
| 111 Name name() const override; | 112 Name name() const override; |
| 112 private: | 113 private: |
| 113 Path fPath; | 114 Path fPath; |
| 114 Mode fMode; | 115 Mode fMode; |
| 115 DstColorType fDstColorType; | 116 DstColorType fDstColorType; |
| 117 float fScale; |
| 116 }; | 118 }; |
| 117 | 119 |
| 118 | 120 |
| 119 class ImageSrc : public Src { | 121 class ImageSrc : public Src { |
| 120 public: | 122 public: |
| 121 // divisor == 0 means decode the whole image | 123 // divisor == 0 means decode the whole image |
| 122 // divisor > 0 means decode in subsets, dividing into a divisor x divisor gr
id. | 124 // divisor > 0 means decode in subsets, dividing into a divisor x divisor gr
id. |
| 123 explicit ImageSrc(Path path, int divisor = 0); | 125 explicit ImageSrc(Path path, int divisor = 0); |
| 124 | 126 |
| 125 Error draw(SkCanvas*) const override; | 127 Error draw(SkCanvas*) const override; |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 | 286 |
| 285 class ViaTwice : public Via { | 287 class ViaTwice : public Via { |
| 286 public: | 288 public: |
| 287 explicit ViaTwice(Sink* sink) : Via(sink) {} | 289 explicit ViaTwice(Sink* sink) : Via(sink) {} |
| 288 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; | 290 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; |
| 289 }; | 291 }; |
| 290 | 292 |
| 291 } // namespace DM | 293 } // namespace DM |
| 292 | 294 |
| 293 #endif//DMSrcSink_DEFINED | 295 #endif//DMSrcSink_DEFINED |
| OLD | NEW |