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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 } else { | 310 } else { |
311 primProc = pathProc.get(); | 311 primProc = pathProc.get(); |
312 } | 312 } |
313 if (!this->setupDstReadIfNecessary(&ds, primProc, &dstCopy, NULL)) { | 313 if (!this->setupDstReadIfNecessary(&ds, primProc, &dstCopy, NULL)) { |
314 SkDebugf("Couldn't setup dst read texture"); | 314 SkDebugf("Couldn't setup dst read texture"); |
315 return false; | 315 return false; |
316 } | 316 } |
317 | 317 |
318 // create optimized draw state, setup readDst texture if required, and b
uild a descriptor | 318 // create optimized draw state, setup readDst texture if required, and b
uild a descriptor |
319 // and program. ODS creation can fail, so we have to check | 319 // and program. ODS creation can fail, so we have to check |
320 GrOptDrawState ods(ds, gp, pathProc, *gpu->caps(), scissor, &dstCopy, dr
awType); | 320 GrOptDrawState ods(ds, primProc, *gpu->caps(), scissor, &dstCopy, drawTy
pe); |
321 if (ods.mustSkip()) { | 321 if (ods.mustSkip()) { |
322 continue; | 322 continue; |
323 } | 323 } |
324 ods.finalize(gpu); | 324 ods.finalize(gpu); |
325 SkAutoTUnref<GrGLProgram> program(GrGLProgramBuilder::CreateProgram(ods,
gpu)); | 325 SkAutoTUnref<GrGLProgram> program(GrGLProgramBuilder::CreateProgram(ods,
gpu)); |
326 if (NULL == program.get()) { | 326 if (NULL == program.get()) { |
327 SkDebugf("Failed to create program!"); | 327 SkDebugf("Failed to create program!"); |
328 return false; | 328 return false; |
329 } | 329 } |
330 | 330 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 } | 363 } |
364 #endif | 364 #endif |
365 GrTestTarget target; | 365 GrTestTarget target; |
366 context->getTestTarget(&target); | 366 context->getTestTarget(&target); |
367 REPORTER_ASSERT(reporter, target.target()->programUnitTest(maxStages
)); | 367 REPORTER_ASSERT(reporter, target.target()->programUnitTest(maxStages
)); |
368 } | 368 } |
369 } | 369 } |
370 } | 370 } |
371 | 371 |
372 #endif | 372 #endif |
OLD | NEW |