Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(322)

Side by Side Diff: src/effects/SkArithmeticMode_gpu.cpp

Issue 1266633003: Added registerChild; transforms, textures, glKey automatically handled. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: refactored to onGetGLProcessorKey; removed emitSamplers specialized template; fixed nits Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/effects/SkArithmeticMode_gpu.h ('k') | src/effects/SkBlurMaskFilter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/effects/SkArithmeticMode_gpu.h ('k') | src/effects/SkBlurMaskFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698