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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 return false; | 296 return false; |
297 } | 297 } |
298 | 298 |
299 // create optimized draw state, setup readDst texture if required, and b
uild a descriptor | 299 // create optimized draw state, setup readDst texture if required, and b
uild a descriptor |
300 // and program. ODS creation can fail, so we have to check | 300 // and program. ODS creation can fail, so we have to check |
301 GrPipeline pipeline(pipelineBuilder, colorPOI, coveragePOI, | 301 GrPipeline pipeline(pipelineBuilder, colorPOI, coveragePOI, |
302 *gpu->caps(), scissor, &dstCopy); | 302 *gpu->caps(), scissor, &dstCopy); |
303 if (pipeline.mustSkip()) { | 303 if (pipeline.mustSkip()) { |
304 continue; | 304 continue; |
305 } | 305 } |
| 306 |
| 307 GrXferBarrierType barrierType; |
| 308 if (pipeline.getXferProcessor()->willNeedXferBarrier(rt, *gpu->caps(), &
barrierType)) { |
| 309 gpu->xferBarrier(barrierType); |
| 310 } |
| 311 |
306 GrBatchTracker bt; | 312 GrBatchTracker bt; |
307 primProc->initBatchTracker(&bt, pipeline.getInitBatchTracker()); | 313 primProc->initBatchTracker(&bt, pipeline.getInitBatchTracker()); |
308 | 314 |
309 GrProgramDesc desc; | 315 GrProgramDesc desc; |
310 gpu->buildProgramDesc(&desc, *primProc, pipeline, bt); | 316 gpu->buildProgramDesc(&desc, *primProc, pipeline, bt); |
311 | 317 |
312 GrGpu::DrawArgs args(primProc, &pipeline, &desc, &bt); | 318 GrGpu::DrawArgs args(primProc, &pipeline, &desc, &bt); |
313 SkAutoTUnref<GrGLProgram> program(GrGLProgramBuilder::CreateProgram(args
, gpu)); | 319 SkAutoTUnref<GrGLProgram> program(GrGLProgramBuilder::CreateProgram(args
, gpu)); |
314 | 320 |
315 if (NULL == program.get()) { | 321 if (NULL == program.get()) { |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 } | 366 } |
361 #endif | 367 #endif |
362 GrTestTarget target; | 368 GrTestTarget target; |
363 context->getTestTarget(&target); | 369 context->getTestTarget(&target); |
364 REPORTER_ASSERT(reporter, target.target()->programUnitTest(maxStages
)); | 370 REPORTER_ASSERT(reporter, target.target()->programUnitTest(maxStages
)); |
365 } | 371 } |
366 } | 372 } |
367 } | 373 } |
368 | 374 |
369 #endif | 375 #endif |
OLD | NEW |