| 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 #include "SkArithmeticMode_gpu.h" | 8 #include "SkArithmeticMode_gpu.h" |
| 9 | 9 |
| 10 #if SK_SUPPORT_GPU | 10 #if SK_SUPPORT_GPU |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 }; | 206 }; |
| 207 | 207 |
| 208 /////////////////////////////////////////////////////////////////////////////// | 208 /////////////////////////////////////////////////////////////////////////////// |
| 209 | 209 |
| 210 GrArithmeticXP::GrArithmeticXP(float k1, float k2, float k3, float k4, bool enfo
rcePMColor) | 210 GrArithmeticXP::GrArithmeticXP(float k1, float k2, float k3, float k4, bool enfo
rcePMColor) |
| 211 : fK1(k1) | 211 : fK1(k1) |
| 212 , fK2(k2) | 212 , fK2(k2) |
| 213 , fK3(k3) | 213 , fK3(k3) |
| 214 , fK4(k4) | 214 , fK4(k4) |
| 215 , fEnforcePMColor(enforcePMColor) { | 215 , fEnforcePMColor(enforcePMColor) { |
| 216 this->initClassID<GrPorterDuffXferProcessor>(); | 216 this->initClassID<GrArithmeticXP>(); |
| 217 this->setWillReadDstColor(); | 217 this->setWillReadDstColor(); |
| 218 } | 218 } |
| 219 | 219 |
| 220 void GrArithmeticXP::getGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuild
er* b) const { | 220 void GrArithmeticXP::getGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuild
er* b) const { |
| 221 GLArithmeticXP::GenKey(*this, caps, b); | 221 GLArithmeticXP::GenKey(*this, caps, b); |
| 222 } | 222 } |
| 223 | 223 |
| 224 GrGLXferProcessor* GrArithmeticXP::createGLInstance() const { | 224 GrGLXferProcessor* GrArithmeticXP::createGLInstance() const { |
| 225 return SkNEW_ARGS(GLArithmeticXP, (*this)); | 225 return SkNEW_ARGS(GLArithmeticXP, (*this)); |
| 226 } | 226 } |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 float k1 = random->nextF(); | 261 float k1 = random->nextF(); |
| 262 float k2 = random->nextF(); | 262 float k2 = random->nextF(); |
| 263 float k3 = random->nextF(); | 263 float k3 = random->nextF(); |
| 264 float k4 = random->nextF(); | 264 float k4 = random->nextF(); |
| 265 bool enforcePMColor = random->nextBool(); | 265 bool enforcePMColor = random->nextBool(); |
| 266 | 266 |
| 267 return GrArithmeticXPFactory::Create(k1, k2, k3, k4, enforcePMColor); | 267 return GrArithmeticXPFactory::Create(k1, k2, k3, k4, enforcePMColor); |
| 268 } | 268 } |
| 269 | 269 |
| 270 #endif | 270 #endif |
| OLD | NEW |