| 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 return true; | 147 return true; |
| 148 } | 148 } |
| 149 | 149 |
| 150 bool canTweakAlphaForCoverage() const SK_OVERRIDE { | 150 bool canTweakAlphaForCoverage() const SK_OVERRIDE { |
| 151 return false; | 151 return false; |
| 152 } | 152 } |
| 153 | 153 |
| 154 void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo&
coveragePOI, | 154 void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo&
coveragePOI, |
| 155 GrXPFactory::InvariantOutput*) const SK_OVERRIDE; | 155 GrXPFactory::InvariantOutput*) const SK_OVERRIDE; |
| 156 | 156 |
| 157 bool willReadDst(const GrProcOptInfo& colorPOI, | 157 bool willReadDst() const SK_OVERRIDE { return true; } |
| 158 const GrProcOptInfo& coveragePOI) const SK_OVERRIDE { | |
| 159 return true; | |
| 160 } | |
| 161 | 158 |
| 162 private: | 159 private: |
| 163 GrArithmeticXPFactory(float k1, float k2, float k3, float k4, bool enforcePM
Color); | 160 GrArithmeticXPFactory(float k1, float k2, float k3, float k4, bool enforcePM
Color); |
| 164 | 161 |
| 165 bool onIsEqual(const GrXPFactory& xpfBase) const SK_OVERRIDE { | 162 bool onIsEqual(const GrXPFactory& xpfBase) const SK_OVERRIDE { |
| 166 const GrArithmeticXPFactory& xpf = xpfBase.cast<GrArithmeticXPFactory>()
; | 163 const GrArithmeticXPFactory& xpf = xpfBase.cast<GrArithmeticXPFactory>()
; |
| 167 if (fK1 != xpf.fK1 || | 164 if (fK1 != xpf.fK1 || |
| 168 fK2 != xpf.fK2 || | 165 fK2 != xpf.fK2 || |
| 169 fK3 != xpf.fK3 || | 166 fK3 != xpf.fK3 || |
| 170 fK4 != xpf.fK4 || | 167 fK4 != xpf.fK4 || |
| 171 fEnforcePMColor != xpf.fEnforcePMColor) { | 168 fEnforcePMColor != xpf.fEnforcePMColor) { |
| 172 return false; | 169 return false; |
| 173 } | 170 } |
| 174 return true; | 171 return true; |
| 175 } | 172 } |
| 176 | 173 |
| 177 GR_DECLARE_XP_FACTORY_TEST; | 174 GR_DECLARE_XP_FACTORY_TEST; |
| 178 | 175 |
| 179 float fK1, fK2, fK3, fK4; | 176 float fK1, fK2, fK3, fK4; |
| 180 bool fEnforcePMColor; | 177 bool fEnforcePMColor; |
| 181 | 178 |
| 182 typedef GrXPFactory INHERITED; | 179 typedef GrXPFactory INHERITED; |
| 183 }; | 180 }; |
| 184 | 181 |
| 185 #endif | 182 #endif |
| 186 #endif | 183 #endif |
| OLD | NEW |