| 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 private: | 172 private: |
| 173 Path fPath; | 173 Path fPath; |
| 174 SkBitmapRegionDecoder::Strategy fStrategy; | 174 SkBitmapRegionDecoder::Strategy fStrategy; |
| 175 Mode fMode; | 175 Mode fMode; |
| 176 CodecSrc::DstColorType fDstColorType; | 176 CodecSrc::DstColorType fDstColorType; |
| 177 uint32_t fSampleSize; | 177 uint32_t fSampleSize; |
| 178 }; | 178 }; |
| 179 | 179 |
| 180 class ImageSrc : public Src { | 180 class ImageSrc : public Src { |
| 181 public: | 181 public: |
| 182 // divisor == 0 means decode the whole image | 182 explicit ImageSrc(Path path); |
| 183 // divisor > 0 means decode in subsets, dividing into a divisor x divisor gr
id. | |
| 184 explicit ImageSrc(Path path, int divisor = 0); | |
| 185 | 183 |
| 186 Error draw(SkCanvas*) const override; | 184 Error draw(SkCanvas*) const override; |
| 187 SkISize size() const override; | 185 SkISize size() const override; |
| 188 Name name() const override; | 186 Name name() const override; |
| 189 bool veto(SinkFlags) const override; | 187 bool veto(SinkFlags) const override; |
| 190 private: | 188 private: |
| 191 Path fPath; | 189 Path fPath; |
| 192 const int fDivisor; | |
| 193 }; | 190 }; |
| 194 | 191 |
| 195 class SKPSrc : public Src { | 192 class SKPSrc : public Src { |
| 196 public: | 193 public: |
| 197 explicit SKPSrc(Path path); | 194 explicit SKPSrc(Path path); |
| 198 | 195 |
| 199 Error draw(SkCanvas*) const override; | 196 Error draw(SkCanvas*) const override; |
| 200 SkISize size() const override; | 197 SkISize size() const override; |
| 201 Name name() const override; | 198 Name name() const override; |
| 202 private: | 199 private: |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 | 359 |
| 363 class ViaTwice : public Via { | 360 class ViaTwice : public Via { |
| 364 public: | 361 public: |
| 365 explicit ViaTwice(Sink* sink) : Via(sink) {} | 362 explicit ViaTwice(Sink* sink) : Via(sink) {} |
| 366 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; | 363 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; |
| 367 }; | 364 }; |
| 368 | 365 |
| 369 } // namespace DM | 366 } // namespace DM |
| 370 | 367 |
| 371 #endif//DMSrcSink_DEFINED | 368 #endif//DMSrcSink_DEFINED |
| OLD | NEW |