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 GrOverdrawFragmentProcessor.fp; do not modify. 10 **************************************************************************************************/ 11 #ifndef GrOverdrawFragmentProcessor_DEFINED 12 #define GrOverdrawFragmentProcessor_DEFINED 13 #include "SkTypes.h" 14 #if SK_SUPPORT_GPU 15 #include "GrFragmentProcessor.h" 16 #include "GrCoordTransform.h" 17 class GrOverdrawFragmentProcessor : public GrFragmentProcessor { 18 public: color0()19 SkPMColor color0() const { return fColor0; } color1()20 SkPMColor color1() const { return fColor1; } color2()21 SkPMColor color2() const { return fColor2; } color3()22 SkPMColor color3() const { return fColor3; } color4()23 SkPMColor color4() const { return fColor4; } color5()24 SkPMColor color5() const { return fColor5; } Make(SkPMColor color0,SkPMColor color1,SkPMColor color2,SkPMColor color3,SkPMColor color4,SkPMColor color5)25 static std::unique_ptr<GrFragmentProcessor> Make(SkPMColor color0, SkPMColor color1, 26 SkPMColor color2, SkPMColor color3, 27 SkPMColor color4, SkPMColor color5) { 28 return std::unique_ptr<GrFragmentProcessor>( 29 new GrOverdrawFragmentProcessor(color0, color1, color2, color3, color4, color5)); 30 } 31 GrOverdrawFragmentProcessor(const GrOverdrawFragmentProcessor& src); 32 std::unique_ptr<GrFragmentProcessor> clone() const override; name()33 const char* name() const override { return "OverdrawFragmentProcessor"; } 34 35 private: GrOverdrawFragmentProcessor(SkPMColor color0,SkPMColor color1,SkPMColor color2,SkPMColor color3,SkPMColor color4,SkPMColor color5)36 GrOverdrawFragmentProcessor(SkPMColor color0, SkPMColor color1, SkPMColor color2, 37 SkPMColor color3, SkPMColor color4, SkPMColor color5) 38 : INHERITED(kGrOverdrawFragmentProcessor_ClassID, kNone_OptimizationFlags) 39 , fColor0(color0) 40 , fColor1(color1) 41 , fColor2(color2) 42 , fColor3(color3) 43 , fColor4(color4) 44 , fColor5(color5) {} 45 GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; 46 void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override; 47 bool onIsEqual(const GrFragmentProcessor&) const override; 48 GR_DECLARE_FRAGMENT_PROCESSOR_TEST 49 SkPMColor fColor0; 50 SkPMColor fColor1; 51 SkPMColor fColor2; 52 SkPMColor fColor3; 53 SkPMColor fColor4; 54 SkPMColor fColor5; 55 typedef GrFragmentProcessor INHERITED; 56 }; 57 #endif 58 #endif 59