| 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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 return false; | 309 return false; |
| 310 } | 310 } |
| 311 | 311 |
| 312 // create optimized draw state, setup readDst texture if required, and b
uild a descriptor | 312 // create optimized draw state, setup readDst texture if required, and b
uild a descriptor |
| 313 // and program. ODS creation can fail, so we have to check | 313 // and program. ODS creation can fail, so we have to check |
| 314 GrPipeline pipeline(pipelineBuilder, colorPOI, coveragePOI, | 314 GrPipeline pipeline(pipelineBuilder, colorPOI, coveragePOI, |
| 315 *gpu->caps(), scissor, &dstCopy); | 315 *gpu->caps(), scissor, &dstCopy); |
| 316 if (pipeline.mustSkip()) { | 316 if (pipeline.mustSkip()) { |
| 317 continue; | 317 continue; |
| 318 } | 318 } |
| 319 |
| 320 GrXferBarrierType barrierType; |
| 321 if (pipeline.getXferProcessor()->willNeedXferBarrier(rt, *gpu->caps(), &
barrierType)) { |
| 322 gpu->setXferBarrier(barrierType); |
| 323 } |
| 324 |
| 319 GrBatchTracker bt; | 325 GrBatchTracker bt; |
| 320 primProc->initBatchTracker(&bt, pipeline.getInitBatchTracker()); | 326 primProc->initBatchTracker(&bt, pipeline.getInitBatchTracker()); |
| 321 | 327 |
| 322 GrProgramDesc desc; | 328 GrProgramDesc desc; |
| 323 gpu->buildProgramDesc(&desc, *primProc, pipeline, bt); | 329 gpu->buildProgramDesc(&desc, *primProc, pipeline, bt); |
| 324 | 330 |
| 325 GrGpu::DrawArgs args(primProc, &pipeline, &desc, &bt); | 331 GrGpu::DrawArgs args(primProc, &pipeline, &desc, &bt); |
| 326 SkAutoTUnref<GrGLProgram> program(GrGLProgramBuilder::CreateProgram(args
, gpu)); | 332 SkAutoTUnref<GrGLProgram> program(GrGLProgramBuilder::CreateProgram(args
, gpu)); |
| 327 | 333 |
| 328 if (NULL == program.get()) { | 334 if (NULL == program.get()) { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 } | 379 } |
| 374 #endif | 380 #endif |
| 375 GrTestTarget target; | 381 GrTestTarget target; |
| 376 context->getTestTarget(&target); | 382 context->getTestTarget(&target); |
| 377 REPORTER_ASSERT(reporter, target.target()->programUnitTest(maxStages
)); | 383 REPORTER_ASSERT(reporter, target.target()->programUnitTest(maxStages
)); |
| 378 } | 384 } |
| 379 } | 385 } |
| 380 } | 386 } |
| 381 | 387 |
| 382 #endif | 388 #endif |
| OLD | NEW |