| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 kFullImage_Mode, | 137 kFullImage_Mode, |
| 138 // Splits the image into multiple regions using a divisor and decodes th
e regions | 138 // Splits the image into multiple regions using a divisor and decodes th
e regions |
| 139 // separately. Also, this test adds a border of a few pixels to each of
the regions | 139 // separately. Also, this test adds a border of a few pixels to each of
the regions |
| 140 // that it is decoding. This tests the behavior when a client asks for
a region that | 140 // that it is decoding. This tests the behavior when a client asks for
a region that |
| 141 // does not fully fit in the image. | 141 // does not fully fit in the image. |
| 142 kDivisor_Mode, | 142 kDivisor_Mode, |
| 143 }; | 143 }; |
| 144 | 144 |
| 145 BRDSrc(Path, SkBitmapRegionDecoderInterface::Strategy, Mode, CodecSrc::DstCo
lorType, uint32_t); | 145 BRDSrc(Path, SkBitmapRegionDecoderInterface::Strategy, Mode, CodecSrc::DstCo
lorType, uint32_t); |
| 146 | 146 |
| 147 static float GetScale(uint32_t sampleSize) { return 1.0f / (float) sampleSiz
e; } | |
| 148 | |
| 149 Error draw(SkCanvas*) const override; | 147 Error draw(SkCanvas*) const override; |
| 150 SkISize size() const override; | 148 SkISize size() const override; |
| 151 Name name() const override; | 149 Name name() const override; |
| 152 bool veto(SinkFlags) const override; | 150 bool veto(SinkFlags) const override; |
| 153 private: | 151 private: |
| 154 Path fPath; | 152 Path fPath; |
| 155 SkBitmapRegionDecoderInterface::Strategy fStrategy; | 153 SkBitmapRegionDecoderInterface::Strategy fStrategy; |
| 156 Mode fMode; | 154 Mode fMode; |
| 157 CodecSrc::DstColorType fDstColorType; | 155 CodecSrc::DstColorType fDstColorType; |
| 158 uint32_t fSampleSize; | 156 uint32_t fSampleSize; |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 | 337 |
| 340 class ViaTwice : public Via { | 338 class ViaTwice : public Via { |
| 341 public: | 339 public: |
| 342 explicit ViaTwice(Sink* sink) : Via(sink) {} | 340 explicit ViaTwice(Sink* sink) : Via(sink) {} |
| 343 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; | 341 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; |
| 344 }; | 342 }; |
| 345 | 343 |
| 346 } // namespace DM | 344 } // namespace DM |
| 347 | 345 |
| 348 #endif//DMSrcSink_DEFINED | 346 #endif//DMSrcSink_DEFINED |
| OLD | NEW |