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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 bool canTweakAlphaForCoverage() const SK_OVERRIDE { | 89 bool canTweakAlphaForCoverage() const SK_OVERRIDE { |
90 return false; | 90 return false; |
91 } | 91 } |
92 | 92 |
93 void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo&
coveragePOI, | 93 void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo&
coveragePOI, |
94 GrXPFactory::InvariantOutput*) const SK_OVERRIDE; | 94 GrXPFactory::InvariantOutput*) const SK_OVERRIDE; |
95 | 95 |
96 private: | 96 private: |
97 GrArithmeticXPFactory(float k1, float k2, float k3, float k4, bool enforcePM
Color); | 97 GrArithmeticXPFactory(float k1, float k2, float k3, float k4, bool enforcePM
Color); |
98 | 98 |
99 GrXferProcessor* onCreateXferProcessor(const GrDrawTargetCaps& caps, | 99 GrXferProcessor* onCreateXferProcessor(const GrProcOptInfo& colorPOI, |
100 const GrProcOptInfo& colorPOI, | |
101 const GrProcOptInfo& coveragePOI, | 100 const GrProcOptInfo& coveragePOI, |
102 const GrDeviceCoordTexture* dstCopy)
const SK_OVERRIDE; | 101 const GrDeviceCoordTexture* dstCopy)
const SK_OVERRIDE; |
103 | 102 |
104 bool willReadDstColor(const GrDrawTargetCaps& caps, | 103 bool willReadDstColor(const GrProcOptInfo& colorPOI, |
105 const GrProcOptInfo& colorPOI, | |
106 const GrProcOptInfo& coveragePOI) const SK_OVERRIDE { | 104 const GrProcOptInfo& coveragePOI) const SK_OVERRIDE { |
107 return true; | 105 return true; |
108 } | 106 } |
109 | 107 |
110 bool onIsEqual(const GrXPFactory& xpfBase) const SK_OVERRIDE { | 108 bool onIsEqual(const GrXPFactory& xpfBase) const SK_OVERRIDE { |
111 const GrArithmeticXPFactory& xpf = xpfBase.cast<GrArithmeticXPFactory>()
; | 109 const GrArithmeticXPFactory& xpf = xpfBase.cast<GrArithmeticXPFactory>()
; |
112 if (fK1 != xpf.fK1 || | 110 if (fK1 != xpf.fK1 || |
113 fK2 != xpf.fK2 || | 111 fK2 != xpf.fK2 || |
114 fK3 != xpf.fK3 || | 112 fK3 != xpf.fK3 || |
115 fK4 != xpf.fK4 || | 113 fK4 != xpf.fK4 || |
116 fEnforcePMColor != xpf.fEnforcePMColor) { | 114 fEnforcePMColor != xpf.fEnforcePMColor) { |
117 return false; | 115 return false; |
118 } | 116 } |
119 return true; | 117 return true; |
120 } | 118 } |
121 | 119 |
122 GR_DECLARE_XP_FACTORY_TEST; | 120 GR_DECLARE_XP_FACTORY_TEST; |
123 | 121 |
124 float fK1, fK2, fK3, fK4; | 122 float fK1, fK2, fK3, fK4; |
125 bool fEnforcePMColor; | 123 bool fEnforcePMColor; |
126 | 124 |
127 typedef GrXPFactory INHERITED; | 125 typedef GrXPFactory INHERITED; |
128 }; | 126 }; |
129 | 127 |
130 #endif | 128 #endif |
131 #endif | 129 #endif |
OLD | NEW |