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

Side by Side Diff: tests/GLProgramsTest.cpp

Issue 715903002: Push creation of default GP to the caller (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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
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 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 GrDrawState* ds = this->drawState(); 431 GrDrawState* ds = this->drawState();
432 ds->setRenderTarget(rt.get()); 432 ds->setRenderTarget(rt.get());
433 433
434 // if path rendering we have to setup a couple of things like the draw t ype 434 // if path rendering we have to setup a couple of things like the draw t ype
435 bool usePathRendering = gpu->glCaps().pathRenderingSupport() && random.n extBool(); 435 bool usePathRendering = gpu->glCaps().pathRenderingSupport() && random.n extBool();
436 436
437 GrGpu::DrawType drawType = usePathRendering ? GrGpu::kDrawPath_DrawType : 437 GrGpu::DrawType drawType = usePathRendering ? GrGpu::kDrawPath_DrawType :
438 GrGpu::kDrawPoints_DrawTyp e; 438 GrGpu::kDrawPoints_DrawTyp e;
439 439
440 // twiddle drawstate knobs randomly 440 // twiddle drawstate knobs randomly
441 bool hasGeometryProcessor = usePathRendering ? false : random.nextBool() ; 441 bool hasGeometryProcessor = !usePathRendering;
442 if (hasGeometryProcessor) { 442 if (hasGeometryProcessor) {
443 set_random_gp(fContext, gpu->glCaps(), ds, &random, dummyTextures); 443 set_random_gp(fContext, gpu->glCaps(), ds, &random, dummyTextures);
444 } 444 }
445 set_random_color_coverage_stages(gpu, 445 set_random_color_coverage_stages(gpu,
446 ds, 446 ds,
447 maxStages - hasGeometryProcessor, 447 maxStages - hasGeometryProcessor,
448 usePathRendering, 448 usePathRendering,
449 &random, 449 &random,
450 dummyTextures); 450 dummyTextures);
451 set_random_color(ds, &random); 451 set_random_color(ds, &random);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 } 516 }
517 #endif 517 #endif
518 GrTestTarget target; 518 GrTestTarget target;
519 context->getTestTarget(&target); 519 context->getTestTarget(&target);
520 REPORTER_ASSERT(reporter, target.target()->programUnitTest(maxStages )); 520 REPORTER_ASSERT(reporter, target.target()->programUnitTest(maxStages ));
521 } 521 }
522 } 522 }
523 } 523 }
524 524
525 #endif 525 #endif
OLDNEW
« src/gpu/GrDefaultGeoProcFactory.h ('K') | « src/gpu/effects/GrDashingEffect.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698