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

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: added comment 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
« no previous file with comments | « src/gpu/effects/GrDashingEffect.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 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 GrDrawState* ds = this->drawState(); 432 GrDrawState* ds = this->drawState();
433 ds->setRenderTarget(rt.get()); 433 ds->setRenderTarget(rt.get());
434 434
435 // if path rendering we have to setup a couple of things like the draw t ype 435 // if path rendering we have to setup a couple of things like the draw t ype
436 bool usePathRendering = gpu->glCaps().pathRenderingSupport() && random.n extBool(); 436 bool usePathRendering = gpu->glCaps().pathRenderingSupport() && random.n extBool();
437 437
438 GrGpu::DrawType drawType = usePathRendering ? GrGpu::kDrawPath_DrawType : 438 GrGpu::DrawType drawType = usePathRendering ? GrGpu::kDrawPath_DrawType :
439 GrGpu::kDrawPoints_DrawTyp e; 439 GrGpu::kDrawPoints_DrawTyp e;
440 440
441 // twiddle drawstate knobs randomly 441 // twiddle drawstate knobs randomly
442 bool hasGeometryProcessor = usePathRendering ? false : random.nextBool() ; 442 bool hasGeometryProcessor = !usePathRendering;
443 if (hasGeometryProcessor) { 443 if (hasGeometryProcessor) {
444 set_random_gp(fContext, gpu->glCaps(), ds, &random, dummyTextures); 444 set_random_gp(fContext, gpu->glCaps(), ds, &random, dummyTextures);
445 } 445 }
446 set_random_color_coverage_stages(gpu, 446 set_random_color_coverage_stages(gpu,
447 ds, 447 ds,
448 maxStages - hasGeometryProcessor, 448 maxStages - hasGeometryProcessor,
449 usePathRendering, 449 usePathRendering,
450 &random, 450 &random,
451 dummyTextures); 451 dummyTextures);
452 set_random_color(ds, &random); 452 set_random_color(ds, &random);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 } 517 }
518 #endif 518 #endif
519 GrTestTarget target; 519 GrTestTarget target;
520 context->getTestTarget(&target); 520 context->getTestTarget(&target);
521 REPORTER_ASSERT(reporter, target.target()->programUnitTest(maxStages )); 521 REPORTER_ASSERT(reporter, target.target()->programUnitTest(maxStages ));
522 } 522 }
523 } 523 }
524 } 524 }
525 525
526 #endif 526 #endif
OLDNEW
« no previous file with comments | « src/gpu/effects/GrDashingEffect.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698