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:
parent
f782639a7c
commit
43d361f7fa
@ -128,9 +128,11 @@ bool GrGLProgramDesc::setRandom(SkRandom* random,
|
|||||||
header->fCoverageAttributeIndex = (header->fCoverageInput == kAttribute_ColorInput) ?
|
header->fCoverageAttributeIndex = (header->fCoverageInput == kAttribute_ColorInput) ?
|
||||||
currAttribIndex++ :
|
currAttribIndex++ :
|
||||||
-1;
|
-1;
|
||||||
|
bool useGS = random->nextBool();
|
||||||
#if GR_GL_EXPERIMENTAL_GS
|
#if GR_GL_EXPERIMENTAL_GS
|
||||||
header->fExperimentalGS = gpu->caps()->geometryShaderSupport() && random->nextBool();
|
header->fExperimentalGS = gpu->caps()->geometryShaderSupport() && useGS;
|
||||||
|
#else
|
||||||
|
(void) useGS;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
header->fLocalCoordAttributeIndex = useLocalCoords ? currAttribIndex++ : -1;
|
header->fLocalCoordAttributeIndex = useLocalCoords ? currAttribIndex++ : -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user