Update SkGaussianColorFilter to support an input FP.
Change-Id: Idf0c2fa4a0affb8c661d5610167bd8990781920b Bug: skia:10217 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298982 Commit-Queue: John Stiles <johnstiles@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
This commit is contained in:
parent
a1121331a4
commit
4320664ebe
@ -46,8 +46,9 @@ public:
|
||||
SkGaussianColorFilter() : INHERITED() {}
|
||||
|
||||
#if SK_SUPPORT_GPU
|
||||
std::unique_ptr<GrFragmentProcessor> asFragmentProcessor(GrRecordingContext*,
|
||||
const GrColorInfo&) const override;
|
||||
bool colorFilterAcceptsInputFP() const override { return true; }
|
||||
GrFPResult asFragmentProcessor(std::unique_ptr<GrFragmentProcessor> inputFP,
|
||||
GrRecordingContext*, const GrColorInfo&) const override;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
@ -83,10 +84,11 @@ sk_sp<SkFlattenable> SkGaussianColorFilter::CreateProc(SkReadBuffer&) {
|
||||
|
||||
#if SK_SUPPORT_GPU
|
||||
|
||||
std::unique_ptr<GrFragmentProcessor> SkGaussianColorFilter::asFragmentProcessor(
|
||||
GrRecordingContext*, const GrColorInfo&) const {
|
||||
return GrBlurredEdgeFragmentProcessor::Make(
|
||||
/*inputFP=*/nullptr, GrBlurredEdgeFragmentProcessor::Mode::kGaussian);
|
||||
GrFPResult SkGaussianColorFilter::asFragmentProcessor(std::unique_ptr<GrFragmentProcessor> inputFP,
|
||||
GrRecordingContext*,
|
||||
const GrColorInfo&) const {
|
||||
return GrFPSuccess(GrBlurredEdgeFragmentProcessor::Make(
|
||||
std::move(inputFP), GrBlurredEdgeFragmentProcessor::Mode::kGaussian));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user