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

Unified Diff: tests/GLProgramsTest.cpp

Issue 584913002: Stop calling rand() in debug-only code for GLProgramsTest (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/GLProgramsTest.cpp
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp
index a7482120b4f453d20e3ee117bdfbd01bed1de76b..7fc084fb1ff0bde390c7dc6b15197a039b15c56e 100644
--- a/tests/GLProgramsTest.cpp
+++ b/tests/GLProgramsTest.cpp
@@ -128,9 +128,11 @@ bool GrGLProgramDesc::setRandom(SkRandom* random,
header->fCoverageAttributeIndex = (header->fCoverageInput == kAttribute_ColorInput) ?
currAttribIndex++ :
-1;
-
+ bool useGS = random->nextBool();
#if GR_GL_EXPERIMENTAL_GS
- header->fExperimentalGS = gpu->caps()->geometryShaderSupport() && random->nextBool();
+ header->fExperimentalGS = gpu->caps()->geometryShaderSupport() && useGS;
+#else
+ (void) useGS;
#endif
header->fLocalCoordAttributeIndex = useLocalCoords ? currAttribIndex++ : -1;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698