| 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 #ifndef SkSampler_DEFINED | 7 #ifndef SkSampler_DEFINED |
| 8 #define SkSampler_DEFINED | 8 #define SkSampler_DEFINED |
| 9 | 9 |
| 10 #include "SkCodec.h" |
| 10 #include "SkTypes.h" | 11 #include "SkTypes.h" |
| 11 | 12 |
| 12 class SkSampler : public SkNoncopyable { | 13 class SkSampler : public SkNoncopyable { |
| 13 public: | 14 public: |
| 14 /** | 15 /** |
| 15 * Update the sampler to sample every sampleX'th pixel. Returns the | 16 * Update the sampler to sample every sampleX'th pixel. Returns the |
| 16 * width after sampling. | 17 * width after sampling. |
| 17 */ | 18 */ |
| 18 int setSampleX(int sampleX) { | 19 int setSampleX(int sampleX) { |
| 19 return this->onSetSampleX(sampleX); | 20 return this->onSetSampleX(sampleX); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 virtual void fill(const SkImageInfo& info, void* dst, size_t rowBytes, | 54 virtual void fill(const SkImageInfo& info, void* dst, size_t rowBytes, |
| 54 uint32_t colorOrIndex, SkCodec::ZeroInitialized zeroInit) {} | 55 uint32_t colorOrIndex, SkCodec::ZeroInitialized zeroInit) {} |
| 55 | 56 |
| 56 virtual ~SkSampler() {} | 57 virtual ~SkSampler() {} |
| 57 private: | 58 private: |
| 58 | 59 |
| 59 virtual int onSetSampleX(int) = 0; | 60 virtual int onSetSampleX(int) = 0; |
| 60 }; | 61 }; |
| 61 | 62 |
| 62 #endif // SkSampler_DEFINED | 63 #endif // SkSampler_DEFINED |
| OLD | NEW |