| 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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 if (!rt.get()) { | 247 if (!rt.get()) { |
| 248 SkDebugf("Could not allocate render target"); | 248 SkDebugf("Could not allocate render target"); |
| 249 return false; | 249 return false; |
| 250 } | 250 } |
| 251 | 251 |
| 252 GrPipelineBuilder pipelineBuilder; | 252 GrPipelineBuilder pipelineBuilder; |
| 253 pipelineBuilder.setRenderTarget(rt.get()); | 253 pipelineBuilder.setRenderTarget(rt.get()); |
| 254 pipelineBuilder.setClip(clip); | 254 pipelineBuilder.setClip(clip); |
| 255 | 255 |
| 256 // if path rendering we have to setup a couple of things like the draw t
ype | 256 // if path rendering we have to setup a couple of things like the draw t
ype |
| 257 bool usePathRendering = gpu->glCaps().pathRenderingSupport() && random.n
extBool(); | 257 bool usePathRendering = gpu->glCaps().shaderCaps()->pathRenderingSupport
() && |
| 258 random.nextBool(); |
| 258 | 259 |
| 259 // twiddle drawstate knobs randomly | 260 // twiddle drawstate knobs randomly |
| 260 bool hasGeometryProcessor = !usePathRendering; | 261 bool hasGeometryProcessor = !usePathRendering; |
| 261 SkAutoTUnref<const GrGeometryProcessor> gp; | 262 SkAutoTUnref<const GrGeometryProcessor> gp; |
| 262 SkAutoTUnref<const GrPathProcessor> pathProc; | 263 SkAutoTUnref<const GrPathProcessor> pathProc; |
| 263 if (hasGeometryProcessor) { | 264 if (hasGeometryProcessor) { |
| 264 gp.reset(get_random_gp(fContext, gpu->glCaps(), &random, dummyTextur
es)); | 265 gp.reset(get_random_gp(fContext, gpu->glCaps(), &random, dummyTextur
es)); |
| 265 } else { | 266 } else { |
| 266 pathProc.reset(GrPathProcessor::Create(GrColor_WHITE)); | 267 pathProc.reset(GrPathProcessor::Create(GrColor_WHITE)); |
| 267 } | 268 } |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 } | 361 } |
| 361 #endif | 362 #endif |
| 362 GrTestTarget target; | 363 GrTestTarget target; |
| 363 context->getTestTarget(&target); | 364 context->getTestTarget(&target); |
| 364 REPORTER_ASSERT(reporter, target.target()->programUnitTest(maxStages
)); | 365 REPORTER_ASSERT(reporter, target.target()->programUnitTest(maxStages
)); |
| 365 } | 366 } |
| 366 } | 367 } |
| 367 } | 368 } |
| 368 | 369 |
| 369 #endif | 370 #endif |
| OLD | NEW |