| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 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 SkLinearBitmapPipeline_sampler_DEFINED | 8 #ifndef SkLinearBitmapPipeline_sampler_DEFINED |
| 9 #define SkLinearBitmapPipeline_sampler_DEFINED | 9 #define SkLinearBitmapPipeline_sampler_DEFINED |
| 10 | 10 |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 // We're moving through source space faster than dst (zoomed out), | 421 // We're moving through source space faster than dst (zoomed out), |
| 422 // so we'll never reuse a source pixel or be able to do contiguous loads. | 422 // so we'll never reuse a source pixel or be able to do contiguous loads. |
| 423 void spanFastRate(Span span) { | 423 void spanFastRate(Span span) { |
| 424 span_fallback(span, this); | 424 span_fallback(span, this); |
| 425 } | 425 } |
| 426 | 426 |
| 427 Next* const fNext; | 427 Next* const fNext; |
| 428 PixelAccessor<colorType, colorProfile> fStrategy; | 428 PixelAccessor<colorType, colorProfile> fStrategy; |
| 429 }; | 429 }; |
| 430 | 430 |
| 431 // -- BilerpSampler ------------------------------------------------------------
-------------------- |
| 431 // BilerpSampler - use a bilerp filter to create runs of destination pixels. | 432 // BilerpSampler - use a bilerp filter to create runs of destination pixels. |
| 432 template<SkColorType colorType, SkColorProfileType colorProfile, typename Next> | 433 template<SkColorType colorType, SkColorProfileType colorProfile, typename Next> |
| 433 class BilerpSampler : public SkLinearBitmapPipeline::SampleProcessorInterface { | 434 class BilerpSampler : public SkLinearBitmapPipeline::SampleProcessorInterface { |
| 434 public: | 435 public: |
| 435 template<typename... Args> | 436 template<typename... Args> |
| 436 BilerpSampler(SkLinearBitmapPipeline::BlendProcessorInterface* next, Args&&
... args) | 437 BilerpSampler(SkLinearBitmapPipeline::BlendProcessorInterface* next, Args&&
... args) |
| 437 : fNext{next}, fStrategy{std::forward<Args>(args)...} { } | 438 : fNext{next}, fStrategy{std::forward<Args>(args)...} { } |
| 438 | 439 |
| 439 BilerpSampler(SkLinearBitmapPipeline::BlendProcessorInterface* next, | 440 BilerpSampler(SkLinearBitmapPipeline::BlendProcessorInterface* next, |
| 440 const BilerpSampler& sampler) | 441 const BilerpSampler& sampler) |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 800 } | 801 } |
| 801 } | 802 } |
| 802 | 803 |
| 803 Next* const fNext; | 804 Next* const fNext; |
| 804 PixelAccessor<colorType, colorProfile> fStrategy; | 805 PixelAccessor<colorType, colorProfile> fStrategy; |
| 805 }; | 806 }; |
| 806 | 807 |
| 807 } // namespace | 808 } // namespace |
| 808 | 809 |
| 809 #endif // SkLinearBitmapPipeline_sampler_DEFINED | 810 #endif // SkLinearBitmapPipeline_sampler_DEFINED |
| OLD | NEW |