Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: tests/GLProgramsTest.cpp

Issue 1116713002: Pull out shader-specific caps into GrShaderCaps and GrGLSLCaps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Clean up some comments Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/gl/builders/GrGLProgramBuilder.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/gpu/gl/builders/GrGLProgramBuilder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698