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

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

Issue 1388113002: Bye bye processor data manager (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove files Created 5 years, 2 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 private: 88 private:
89 GrGLProgramDataManager::UniformHandle fKUni; 89 GrGLProgramDataManager::UniformHandle fKUni;
90 bool fEnforcePMColor; 90 bool fEnforcePMColor;
91 91
92 typedef GrGLFragmentProcessor INHERITED; 92 typedef GrGLFragmentProcessor INHERITED;
93 }; 93 };
94 94
95 /////////////////////////////////////////////////////////////////////////////// 95 ///////////////////////////////////////////////////////////////////////////////
96 96
97 GrArithmeticFP::GrArithmeticFP(GrProcessorDataManager*, float k1, float k2, floa t k3, float k4, 97 GrArithmeticFP::GrArithmeticFP(float k1, float k2, float k3, float k4, bool enfo rcePMColor,
98 bool enforcePMColor, const GrFragmentProcessor* d st) 98 const GrFragmentProcessor* dst)
99 : fK1(k1), fK2(k2), fK3(k3), fK4(k4), fEnforcePMColor(enforcePMColor) { 99 : fK1(k1), fK2(k2), fK3(k3), fK4(k4), fEnforcePMColor(enforcePMColor) {
100 this->initClassID<GrArithmeticFP>(); 100 this->initClassID<GrArithmeticFP>();
101 101
102 SkASSERT(dst); 102 SkASSERT(dst);
103 SkDEBUGCODE(int dstIndex = )this->registerChildProcessor(dst); 103 SkDEBUGCODE(int dstIndex = )this->registerChildProcessor(dst);
104 SkASSERT(0 == dstIndex); 104 SkASSERT(0 == dstIndex);
105 } 105 }
106 106
107 void GrArithmeticFP::onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyB uilder* b) const { 107 void GrArithmeticFP::onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyB uilder* b) const {
108 GLArithmeticFP::GenKey(*this, caps, b); 108 GLArithmeticFP::GenKey(*this, caps, b);
(...skipping 20 matching lines...) Expand all
129 /////////////////////////////////////////////////////////////////////////////// 129 ///////////////////////////////////////////////////////////////////////////////
130 130
131 const GrFragmentProcessor* GrArithmeticFP::TestCreate(GrProcessorTestData* d) { 131 const GrFragmentProcessor* GrArithmeticFP::TestCreate(GrProcessorTestData* d) {
132 float k1 = d->fRandom->nextF(); 132 float k1 = d->fRandom->nextF();
133 float k2 = d->fRandom->nextF(); 133 float k2 = d->fRandom->nextF();
134 float k3 = d->fRandom->nextF(); 134 float k3 = d->fRandom->nextF();
135 float k4 = d->fRandom->nextF(); 135 float k4 = d->fRandom->nextF();
136 bool enforcePMColor = d->fRandom->nextBool(); 136 bool enforcePMColor = d->fRandom->nextBool();
137 137
138 SkAutoTUnref<const GrFragmentProcessor> dst(GrProcessorUnitTest::CreateChild FP(d)); 138 SkAutoTUnref<const GrFragmentProcessor> dst(GrProcessorUnitTest::CreateChild FP(d));
139 return new GrArithmeticFP(d->fProcDataManager, k1, k2, k3, k4, enforcePMColo r, dst); 139 return new GrArithmeticFP(k1, k2, k3, k4, enforcePMColor, dst);
140 } 140 }
141 141
142 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrArithmeticFP); 142 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrArithmeticFP);
143 143
144 /////////////////////////////////////////////////////////////////////////////// 144 ///////////////////////////////////////////////////////////////////////////////
145 // Xfer Processor 145 // Xfer Processor
146 /////////////////////////////////////////////////////////////////////////////// 146 ///////////////////////////////////////////////////////////////////////////////
147 147
148 class ArithmeticXP : public GrXferProcessor { 148 class ArithmeticXP : public GrXferProcessor {
149 public: 149 public:
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 float k1 = d->fRandom->nextF(); 291 float k1 = d->fRandom->nextF();
292 float k2 = d->fRandom->nextF(); 292 float k2 = d->fRandom->nextF();
293 float k3 = d->fRandom->nextF(); 293 float k3 = d->fRandom->nextF();
294 float k4 = d->fRandom->nextF(); 294 float k4 = d->fRandom->nextF();
295 bool enforcePMColor = d->fRandom->nextBool(); 295 bool enforcePMColor = d->fRandom->nextBool();
296 296
297 return GrArithmeticXPFactory::Create(k1, k2, k3, k4, enforcePMColor); 297 return GrArithmeticXPFactory::Create(k1, k2, k3, k4, enforcePMColor);
298 } 298 }
299 299
300 #endif 300 #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