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

Side by Side Diff: tests/GLProgramsTest.cpp

Issue 1307223004: Remove GrStagedProcessor, remove the word Stage as it applies to FPs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix misresolve Created 5 years, 3 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/image/SkImage_Gpu.cpp ('k') | no next file » | 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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 // This is a GPU-backend specific test. It relies on static intializers to work 9 // This is a GPU-backend specific test. It relies on static intializers to work
10 10
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 int numProcs = d->fRandom->nextULessThan(maxStages + 1); 141 int numProcs = d->fRandom->nextULessThan(maxStages + 1);
142 int numColorProcs = d->fRandom->nextULessThan(numProcs + 1); 142 int numColorProcs = d->fRandom->nextULessThan(numProcs + 1);
143 143
144 for (int s = 0; s < numProcs;) { 144 for (int s = 0; s < numProcs;) {
145 SkAutoTUnref<const GrFragmentProcessor> fp( 145 SkAutoTUnref<const GrFragmentProcessor> fp(
146 GrProcessorTestFactory<GrFragmentProcessor>::CreateStage(d)); 146 GrProcessorTestFactory<GrFragmentProcessor>::CreateStage(d));
147 SkASSERT(fp); 147 SkASSERT(fp);
148 148
149 // finally add the stage to the correct pipeline in the drawstate 149 // finally add the stage to the correct pipeline in the drawstate
150 if (s < numColorProcs) { 150 if (s < numColorProcs) {
151 pipelineBuilder->addColorProcessor(fp); 151 pipelineBuilder->addColorFragmentProcessor(fp);
152 } else { 152 } else {
153 pipelineBuilder->addCoverageProcessor(fp); 153 pipelineBuilder->addCoverageFragmentProcessor(fp);
154 } 154 }
155 ++s; 155 ++s;
156 } 156 }
157 } 157 }
158 158
159 static void set_random_state(GrPipelineBuilder* pipelineBuilder, SkRandom* rando m) { 159 static void set_random_state(GrPipelineBuilder* pipelineBuilder, SkRandom* rando m) {
160 int state = 0; 160 int state = 0;
161 for (int i = 1; i <= GrPipelineBuilder::kLast_Flag; i <<= 1) { 161 for (int i = 1; i <= GrPipelineBuilder::kLast_Flag; i <<= 1) {
162 state |= random->nextBool() * i; 162 state |= random->nextBool() * i;
163 } 163 }
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 } 296 }
297 #endif 297 #endif
298 GrTestTarget target; 298 GrTestTarget target;
299 context->getTestTarget(&target); 299 context->getTestTarget(&target);
300 REPORTER_ASSERT(reporter, target.target()->programUnitTest(context, maxStages)); 300 REPORTER_ASSERT(reporter, target.target()->programUnitTest(context, maxStages));
301 } 301 }
302 } 302 }
303 } 303 }
304 304
305 #endif 305 #endif
OLDNEW
« no previous file with comments | « src/image/SkImage_Gpu.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698