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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 return false; | 237 return false; |
238 } | 238 } |
239 | 239 |
240 GrPipelineBuilder pipelineBuilder; | 240 GrPipelineBuilder pipelineBuilder; |
241 pipelineBuilder.setRenderTarget(rt.get()); | 241 pipelineBuilder.setRenderTarget(rt.get()); |
242 pipelineBuilder.setClip(clip); | 242 pipelineBuilder.setClip(clip); |
243 | 243 |
244 SkAutoTUnref<GrBatch> batch(GrRandomBatch(&random, context)); | 244 SkAutoTUnref<GrBatch> batch(GrRandomBatch(&random, context)); |
245 SkASSERT(batch); | 245 SkASSERT(batch); |
246 | 246 |
247 GrShaderDataManager shaderDataManager; | 247 GrProcessorDataManager procDataManager; |
248 GrProcessorTestData ptd(&random, context, &shaderDataManager, fGpu->caps
(), dummyTextures); | 248 GrProcessorTestData ptd(&random, context, &procDataManager, fGpu->caps()
, dummyTextures); |
249 set_random_color_coverage_stages(&pipelineBuilder, &ptd, maxStages); | 249 set_random_color_coverage_stages(&pipelineBuilder, &ptd, maxStages); |
250 set_random_xpf(&pipelineBuilder, &ptd); | 250 set_random_xpf(&pipelineBuilder, &ptd); |
251 set_random_state(&pipelineBuilder, &random); | 251 set_random_state(&pipelineBuilder, &random); |
252 set_random_stencil(&pipelineBuilder, &random); | 252 set_random_stencil(&pipelineBuilder, &random); |
253 | 253 |
254 this->drawBatch(&pipelineBuilder, batch); | 254 this->drawBatch(&pipelineBuilder, batch); |
255 } | 255 } |
256 | 256 |
257 // Flush everything, test passes if flush is successful(ie, no asserts are h
it, no crashes) | 257 // Flush everything, test passes if flush is successful(ie, no asserts are h
it, no crashes) |
258 this->flush(); | 258 this->flush(); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 } | 299 } |
300 #endif | 300 #endif |
301 GrTestTarget target; | 301 GrTestTarget target; |
302 context->getTestTarget(&target); | 302 context->getTestTarget(&target); |
303 REPORTER_ASSERT(reporter, target.target()->programUnitTest(context,
maxStages)); | 303 REPORTER_ASSERT(reporter, target.target()->programUnitTest(context,
maxStages)); |
304 } | 304 } |
305 } | 305 } |
306 } | 306 } |
307 | 307 |
308 #endif | 308 #endif |
OLD | NEW |