OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 SkArithmeticMode_gpu_DEFINED | 8 #ifndef SkArithmeticMode_gpu_DEFINED |
9 #define SkArithmeticMode_gpu_DEFINED | 9 #define SkArithmeticMode_gpu_DEFINED |
10 | 10 |
(...skipping 29 matching lines...) Expand all Loading... |
40 | 40 |
41 const char* name() const override { return "Arithmetic"; } | 41 const char* name() const override { return "Arithmetic"; } |
42 | 42 |
43 float k1() const { return fK1; } | 43 float k1() const { return fK1; } |
44 float k2() const { return fK2; } | 44 float k2() const { return fK2; } |
45 float k3() const { return fK3; } | 45 float k3() const { return fK3; } |
46 float k4() const { return fK4; } | 46 float k4() const { return fK4; } |
47 bool enforcePMColor() const { return fEnforcePMColor; } | 47 bool enforcePMColor() const { return fEnforcePMColor; } |
48 | 48 |
49 private: | 49 private: |
50 GrGLSLFragmentProcessor* onCreateGLInstance() const override; | 50 GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; |
51 | 51 |
52 void onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) c
onst override; | 52 void onGetGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b)
const override; |
53 | 53 |
54 bool onIsEqual(const GrFragmentProcessor&) const override; | 54 bool onIsEqual(const GrFragmentProcessor&) const override; |
55 | 55 |
56 void onComputeInvariantOutput(GrInvariantOutput* inout) const override; | 56 void onComputeInvariantOutput(GrInvariantOutput* inout) const override; |
57 | 57 |
58 GrArithmeticFP(float k1, float k2, float k3, float k4, bool enforcePMColor, | 58 GrArithmeticFP(float k1, float k2, float k3, float k4, bool enforcePMColor, |
59 const GrFragmentProcessor* dst); | 59 const GrFragmentProcessor* dst); |
60 | 60 |
61 float fK1, fK2, fK3, fK4; | 61 float fK1, fK2, fK3, fK4; |
62 bool fEnforcePMColor; | 62 bool fEnforcePMColor; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 GR_DECLARE_XP_FACTORY_TEST; | 113 GR_DECLARE_XP_FACTORY_TEST; |
114 | 114 |
115 float fK1, fK2, fK3, fK4; | 115 float fK1, fK2, fK3, fK4; |
116 bool fEnforcePMColor; | 116 bool fEnforcePMColor; |
117 | 117 |
118 typedef GrXPFactory INHERITED; | 118 typedef GrXPFactory INHERITED; |
119 }; | 119 }; |
120 | 120 |
121 #endif | 121 #endif |
122 #endif | 122 #endif |
OLD | NEW |