1 /* 2 * Copyright 2018 Google Inc. 3 * 4 * Use of this source code is governed by a BSD-style license that can be 5 * found in the LICENSE file. 6 */ 7 8 /************************************************************************************************** 9 *** This file was autogenerated from GrAARectEffect.fp; do not modify. 10 **************************************************************************************************/ 11 #ifndef GrAARectEffect_DEFINED 12 #define GrAARectEffect_DEFINED 13 #include "SkTypes.h" 14 #include "GrFragmentProcessor.h" 15 #include "GrCoordTransform.h" 16 class GrAARectEffect : public GrFragmentProcessor { 17 public: edgeType()18 const GrClipEdgeType& edgeType() const { return fEdgeType; } rect()19 const SkRect& rect() const { return fRect; } Make(GrClipEdgeType edgeType,SkRect rect)20 static std::unique_ptr<GrFragmentProcessor> Make(GrClipEdgeType edgeType, SkRect rect) { 21 return std::unique_ptr<GrFragmentProcessor>(new GrAARectEffect(edgeType, rect)); 22 } 23 GrAARectEffect(const GrAARectEffect& src); 24 std::unique_ptr<GrFragmentProcessor> clone() const override; name()25 const char* name() const override { return "AARectEffect"; } 26 27 private: GrAARectEffect(GrClipEdgeType edgeType,SkRect rect)28 GrAARectEffect(GrClipEdgeType edgeType, SkRect rect) 29 : INHERITED(kGrAARectEffect_ClassID, 30 (OptimizationFlags)kCompatibleWithCoverageAsAlpha_OptimizationFlag) 31 , fEdgeType(edgeType) 32 , fRect(rect) {} 33 GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; 34 void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override; 35 bool onIsEqual(const GrFragmentProcessor&) const override; 36 GR_DECLARE_FRAGMENT_PROCESSOR_TEST 37 GrClipEdgeType fEdgeType; 38 SkRect fRect; 39 typedef GrFragmentProcessor INHERITED; 40 }; 41 #endif 42