130c4cae7d3a26252e7e45adf6e5722b34adf6848robertphillips/* 2130fb3f7aac19e40eddfc8fa85a9b39e7c99a7e8Ethan Nicholas * Copyright 2018 Google Inc. 330c4cae7d3a26252e7e45adf6e5722b34adf6848robertphillips * 430c4cae7d3a26252e7e45adf6e5722b34adf6848robertphillips * Use of this source code is governed by a BSD-style license that can be 530c4cae7d3a26252e7e45adf6e5722b34adf6848robertphillips * found in the LICENSE file. 630c4cae7d3a26252e7e45adf6e5722b34adf6848robertphillips */ 730c4cae7d3a26252e7e45adf6e5722b34adf6848robertphillips 8130fb3f7aac19e40eddfc8fa85a9b39e7c99a7e8Ethan Nicholas/************************************************************************************************** 9130fb3f7aac19e40eddfc8fa85a9b39e7c99a7e8Ethan Nicholas *** This file was autogenerated from GrCircleBlurFragmentProcessor.fp; do not modify. 10130fb3f7aac19e40eddfc8fa85a9b39e7c99a7e8Ethan Nicholas **************************************************************************************************/ 1130c4cae7d3a26252e7e45adf6e5722b34adf6848robertphillips#ifndef GrCircleBlurFragmentProcessor_DEFINED 1230c4cae7d3a26252e7e45adf6e5722b34adf6848robertphillips#define GrCircleBlurFragmentProcessor_DEFINED 1330c4cae7d3a26252e7e45adf6e5722b34adf6848robertphillips#include "SkTypes.h" 1430c4cae7d3a26252e7e45adf6e5722b34adf6848robertphillips#if SK_SUPPORT_GPU 1530c4cae7d3a26252e7e45adf6e5722b34adf6848robertphillips#include "GrFragmentProcessor.h" 16ceb4d48ef4839aab9d99d0200dcfe403ccd0cdf3Ethan Nicholas#include "GrCoordTransform.h" 1730c4cae7d3a26252e7e45adf6e5722b34adf6848robertphillipsclass GrCircleBlurFragmentProcessor : public GrFragmentProcessor { 1830c4cae7d3a26252e7e45adf6e5722b34adf6848robertphillipspublic: 19ceb4d48ef4839aab9d99d0200dcfe403ccd0cdf3Ethan Nicholas SkRect circleRect() const { return fCircleRect; } 20ceb4d48ef4839aab9d99d0200dcfe403ccd0cdf3Ethan Nicholas float textureRadius() const { return fTextureRadius; } 21ceb4d48ef4839aab9d99d0200dcfe403ccd0cdf3Ethan Nicholas float solidRadius() const { return fSolidRadius; } 22818ac5a00dfd570d2b291b7524a70ecd4ef55770Ethan Nicholas 231afd4cdb0800e2e395b465da24eb71e0e834dafaRobert Phillips static std::unique_ptr<GrFragmentProcessor> Make(GrProxyProvider*, const SkRect& circle, 241afd4cdb0800e2e395b465da24eb71e0e834dafaRobert Phillips float sigma); 25f57c0d67611186ba74179b53b421e64b63a579c7Ethan Nicholas GrCircleBlurFragmentProcessor(const GrCircleBlurFragmentProcessor& src); 26aff329b8e9b239bca1d93b13a914fbef45ccf7feBrian Salomon std::unique_ptr<GrFragmentProcessor> clone() const override; 27ceb4d48ef4839aab9d99d0200dcfe403ccd0cdf3Ethan Nicholas const char* name() const override { return "CircleBlurFragmentProcessor"; } 28b7e8c3b52a306357ecd08d00170062137ec641d4Ethan Nicholas 29818ac5a00dfd570d2b291b7524a70ecd4ef55770Ethan Nicholasprivate: 30b7e8c3b52a306357ecd08d00170062137ec641d4Ethan Nicholas GrCircleBlurFragmentProcessor(SkRect circleRect, float textureRadius, float solidRadius, 311afd4cdb0800e2e395b465da24eb71e0e834dafaRobert Phillips sk_sp<GrTextureProxy> blurProfileSampler) 32abff956455637b12eab374fd44b99e1338799113Ethan Nicholas : INHERITED(kGrCircleBlurFragmentProcessor_ClassID, 33abff956455637b12eab374fd44b99e1338799113Ethan Nicholas (OptimizationFlags)kCompatibleWithCoverageAsAlpha_OptimizationFlag) 34b7e8c3b52a306357ecd08d00170062137ec641d4Ethan Nicholas , fCircleRect(circleRect) 35b7e8c3b52a306357ecd08d00170062137ec641d4Ethan Nicholas , fTextureRadius(textureRadius) 36b7e8c3b52a306357ecd08d00170062137ec641d4Ethan Nicholas , fSolidRadius(solidRadius) 37b7e8c3b52a306357ecd08d00170062137ec641d4Ethan Nicholas , fBlurProfileSampler(std::move(blurProfileSampler)) { 38ceb4d48ef4839aab9d99d0200dcfe403ccd0cdf3Ethan Nicholas this->addTextureSampler(&fBlurProfileSampler); 39818ac5a00dfd570d2b291b7524a70ecd4ef55770Ethan Nicholas } 40ceb4d48ef4839aab9d99d0200dcfe403ccd0cdf3Ethan Nicholas GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; 41b7e8c3b52a306357ecd08d00170062137ec641d4Ethan Nicholas void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override; 42ceb4d48ef4839aab9d99d0200dcfe403ccd0cdf3Ethan Nicholas bool onIsEqual(const GrFragmentProcessor&) const override; 430c26a9dbd0b6546731df63c01411cb2aaa5ba236Brian Salomon GR_DECLARE_FRAGMENT_PROCESSOR_TEST 44ceb4d48ef4839aab9d99d0200dcfe403ccd0cdf3Ethan Nicholas SkRect fCircleRect; 45ceb4d48ef4839aab9d99d0200dcfe403ccd0cdf3Ethan Nicholas float fTextureRadius; 46ceb4d48ef4839aab9d99d0200dcfe403ccd0cdf3Ethan Nicholas float fSolidRadius; 47ceb4d48ef4839aab9d99d0200dcfe403ccd0cdf3Ethan Nicholas TextureSampler fBlurProfileSampler; 4830c4cae7d3a26252e7e45adf6e5722b34adf6848robertphillips typedef GrFragmentProcessor INHERITED; 4930c4cae7d3a26252e7e45adf6e5722b34adf6848robertphillips}; 5030c4cae7d3a26252e7e45adf6e5722b34adf6848robertphillips#endif 5130c4cae7d3a26252e7e45adf6e5722b34adf6848robertphillips#endif 52