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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 105 |
106 SkASSERT(background); | 106 SkASSERT(background); |
107 | 107 |
108 fBackgroundTransform.reset(kLocal_GrCoordSet, background, | 108 fBackgroundTransform.reset(kLocal_GrCoordSet, background, |
109 GrTextureParams::kNone_FilterMode); | 109 GrTextureParams::kNone_FilterMode); |
110 this->addCoordTransform(&fBackgroundTransform); | 110 this->addCoordTransform(&fBackgroundTransform); |
111 fBackgroundAccess.reset(background); | 111 fBackgroundAccess.reset(background); |
112 this->addTextureAccess(&fBackgroundAccess); | 112 this->addTextureAccess(&fBackgroundAccess); |
113 } | 113 } |
114 | 114 |
115 void GrArithmeticFP::getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBui
lder* b) const { | 115 void GrArithmeticFP::onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyB
uilder* b) const { |
116 GLArithmeticFP::GenKey(*this, caps, b); | 116 GLArithmeticFP::GenKey(*this, caps, b); |
117 } | 117 } |
118 | 118 |
119 GrGLFragmentProcessor* GrArithmeticFP::createGLInstance() const { | 119 GrGLFragmentProcessor* GrArithmeticFP::createGLInstance() const { |
120 return SkNEW_ARGS(GLArithmeticFP, (*this)); | 120 return SkNEW_ARGS(GLArithmeticFP, (*this)); |
121 } | 121 } |
122 | 122 |
123 bool GrArithmeticFP::onIsEqual(const GrFragmentProcessor& fpBase) const { | 123 bool GrArithmeticFP::onIsEqual(const GrFragmentProcessor& fpBase) const { |
124 const GrArithmeticFP& fp = fpBase.cast<GrArithmeticFP>(); | 124 const GrArithmeticFP& fp = fpBase.cast<GrArithmeticFP>(); |
125 return fK1 == fp.fK1 && | 125 return fK1 == fp.fK1 && |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 float k1 = d->fRandom->nextF(); | 302 float k1 = d->fRandom->nextF(); |
303 float k2 = d->fRandom->nextF(); | 303 float k2 = d->fRandom->nextF(); |
304 float k3 = d->fRandom->nextF(); | 304 float k3 = d->fRandom->nextF(); |
305 float k4 = d->fRandom->nextF(); | 305 float k4 = d->fRandom->nextF(); |
306 bool enforcePMColor = d->fRandom->nextBool(); | 306 bool enforcePMColor = d->fRandom->nextBool(); |
307 | 307 |
308 return GrArithmeticXPFactory::Create(k1, k2, k3, k4, enforcePMColor); | 308 return GrArithmeticXPFactory::Create(k1, k2, k3, k4, enforcePMColor); |
309 } | 309 } |
310 | 310 |
311 #endif | 311 #endif |
OLD | NEW |