Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/core/SkLinearBitmapPipeline_sample.h

Issue 2053823002: Make SkBlitter hierarchy explicit about what needs to be implemented. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/core/SkBlitter_Sprite.cpp ('k') | src/core/SkRegion_path.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/core/SkBlitter_Sprite.cpp ('k') | src/core/SkRegion_path.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698