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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 context->textureProvider(), &random, this->caps())); | 231 context->textureProvider(), &random, this->caps())); |
232 if (!rt.get()) { | 232 if (!rt.get()) { |
233 SkDebugf("Could not allocate render target"); | 233 SkDebugf("Could not allocate render target"); |
234 return false; | 234 return false; |
235 } | 235 } |
236 | 236 |
237 GrPipelineBuilder pipelineBuilder; | 237 GrPipelineBuilder pipelineBuilder; |
238 pipelineBuilder.setRenderTarget(rt.get()); | 238 pipelineBuilder.setRenderTarget(rt.get()); |
239 pipelineBuilder.setClip(clip); | 239 pipelineBuilder.setClip(clip); |
240 | 240 |
241 SkAutoTUnref<GrBatch> batch(GrRandomBatch(&random, context)); | 241 SkAutoTUnref<GrDrawBatch> batch(GrRandomDrawBatch(&random, context)); |
242 SkASSERT(batch); | 242 SkASSERT(batch); |
243 | 243 |
244 GrProcessorDataManager procDataManager; | 244 GrProcessorDataManager procDataManager; |
245 GrProcessorTestData ptd(&random, context, &procDataManager, fGpu->caps()
, dummyTextures); | 245 GrProcessorTestData ptd(&random, context, &procDataManager, fGpu->caps()
, dummyTextures); |
246 set_random_color_coverage_stages(&pipelineBuilder, &ptd, maxStages); | 246 set_random_color_coverage_stages(&pipelineBuilder, &ptd, maxStages); |
247 set_random_xpf(&pipelineBuilder, &ptd); | 247 set_random_xpf(&pipelineBuilder, &ptd); |
248 set_random_state(&pipelineBuilder, &random); | 248 set_random_state(&pipelineBuilder, &random); |
249 set_random_stencil(&pipelineBuilder, &random); | 249 set_random_stencil(&pipelineBuilder, &random); |
250 | 250 |
251 this->drawBatch(pipelineBuilder, batch); | 251 this->drawBatch(pipelineBuilder, batch); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |