Stop calling rand() in debug-only code for GLProgramsTest

R=egdaniel@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/584913002
This commit is contained in:
bsalomon 2014-09-19 07:47:08 -07:00 committed by Commit bot
parent f782639a7c
commit 43d361f7fa

View File

@ -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;