OLD | NEW |
1 #ifndef DMSrcSink_DEFINED | 1 #ifndef DMSrcSink_DEFINED |
2 #define DMSrcSink_DEFINED | 2 #define DMSrcSink_DEFINED |
3 | 3 |
4 #include "DMGpuSupport.h" | 4 #include "DMGpuSupport.h" |
5 #include "SkBBHFactory.h" | 5 #include "SkBBHFactory.h" |
6 #include "SkBBoxHierarchy.h" | 6 #include "SkBBoxHierarchy.h" |
7 #include "SkBitmap.h" | 7 #include "SkBitmap.h" |
8 #include "SkCanvas.h" | 8 #include "SkCanvas.h" |
9 #include "SkData.h" | 9 #include "SkData.h" |
10 #include "SkGPipe.h" | 10 #include "SkGPipe.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 76 |
77 Error draw(SkCanvas*) const SK_OVERRIDE; | 77 Error draw(SkCanvas*) const SK_OVERRIDE; |
78 SkISize size() const SK_OVERRIDE; | 78 SkISize size() const SK_OVERRIDE; |
79 Name name() const SK_OVERRIDE; | 79 Name name() const SK_OVERRIDE; |
80 private: | 80 private: |
81 skiagm::GMRegistry::Factory fFactory; | 81 skiagm::GMRegistry::Factory fFactory; |
82 }; | 82 }; |
83 | 83 |
84 class CodecSrc : public Src { | 84 class CodecSrc : public Src { |
85 public: | 85 public: |
86 explicit CodecSrc(Path path); | 86 enum Mode { |
| 87 kNormal_Mode, |
| 88 kScanline_Mode, |
| 89 }; |
| 90 CodecSrc(Path, Mode); |
87 | 91 |
88 Error draw(SkCanvas*) const SK_OVERRIDE; | 92 Error draw(SkCanvas*) const SK_OVERRIDE; |
89 SkISize size() const SK_OVERRIDE; | 93 SkISize size() const SK_OVERRIDE; |
90 Name name() const SK_OVERRIDE; | 94 Name name() const SK_OVERRIDE; |
91 private: | 95 private: |
92 Path fPath; | 96 Path fPath; |
| 97 Mode fMode; |
93 }; | 98 }; |
94 | 99 |
95 | 100 |
96 class ImageSrc : public Src { | 101 class ImageSrc : public Src { |
97 public: | 102 public: |
98 // divisor == 0 means decode the whole image | 103 // divisor == 0 means decode the whole image |
99 // divisor > 0 means decode in subsets, dividing into a divisor x divisor gr
id. | 104 // divisor > 0 means decode in subsets, dividing into a divisor x divisor gr
id. |
100 explicit ImageSrc(Path path, int divisor = 0); | 105 explicit ImageSrc(Path path, int divisor = 0); |
101 | 106 |
102 Error draw(SkCanvas*) const SK_OVERRIDE; | 107 Error draw(SkCanvas*) const SK_OVERRIDE; |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 const char* fileExtension() const SK_OVERRIDE { return fSink->fileExtension(
); } | 255 const char* fileExtension() const SK_OVERRIDE { return fSink->fileExtension(
); } |
251 private: | 256 private: |
252 const int fW, fH; | 257 const int fW, fH; |
253 SkAutoTDelete<SkBBHFactory> fFactory; | 258 SkAutoTDelete<SkBBHFactory> fFactory; |
254 SkAutoTDelete<Sink> fSink; | 259 SkAutoTDelete<Sink> fSink; |
255 }; | 260 }; |
256 | 261 |
257 } // namespace DM | 262 } // namespace DM |
258 | 263 |
259 #endif//DMSrcSink_DEFINED | 264 #endif//DMSrcSink_DEFINED |
OLD | NEW |