OLD | NEW |
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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 pipelineBuilder->addColorProcessor(fp); | 179 pipelineBuilder->addColorProcessor(fp); |
180 } else { | 180 } else { |
181 pipelineBuilder->addCoverageProcessor(fp); | 181 pipelineBuilder->addCoverageProcessor(fp); |
182 } | 182 } |
183 ++s; | 183 ++s; |
184 } | 184 } |
185 } | 185 } |
186 | 186 |
187 static void set_random_state(GrPipelineBuilder* pipelineBuilder, SkRandom* rando
m) { | 187 static void set_random_state(GrPipelineBuilder* pipelineBuilder, SkRandom* rando
m) { |
188 int state = 0; | 188 int state = 0; |
189 for (int i = 1; i <= GrPipelineBuilder::kLast_StateBit; i <<= 1) { | 189 for (int i = 1; i <= GrPipelineBuilder::kLast_Flag; i <<= 1) { |
190 state |= random->nextBool() * i; | 190 state |= random->nextBool() * i; |
191 } | 191 } |
192 pipelineBuilder->enableState(state); | 192 pipelineBuilder->enableState(state); |
193 } | 193 } |
194 | 194 |
195 // right now, the only thing we seem to care about in drawState's stencil is 'do
esWrite()' | 195 // right now, the only thing we seem to care about in drawState's stencil is 'do
esWrite()' |
196 static void set_random_stencil(GrPipelineBuilder* pipelineBuilder, SkRandom* ran
dom) { | 196 static void set_random_stencil(GrPipelineBuilder* pipelineBuilder, SkRandom* ran
dom) { |
197 GR_STATIC_CONST_SAME_STENCIL(kDoesWriteStencil, | 197 GR_STATIC_CONST_SAME_STENCIL(kDoesWriteStencil, |
198 kReplace_StencilOp, | 198 kReplace_StencilOp, |
199 kReplace_StencilOp, | 199 kReplace_StencilOp, |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 } | 373 } |
374 #endif | 374 #endif |
375 GrTestTarget target; | 375 GrTestTarget target; |
376 context->getTestTarget(&target); | 376 context->getTestTarget(&target); |
377 REPORTER_ASSERT(reporter, target.target()->programUnitTest(maxStages
)); | 377 REPORTER_ASSERT(reporter, target.target()->programUnitTest(maxStages
)); |
378 } | 378 } |
379 } | 379 } |
380 } | 380 } |
381 | 381 |
382 #endif | 382 #endif |
OLD | NEW |