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

Unified Diff: tests/GLProgramsTest.cpp

Issue 23875048: Use explicitly-sized enums in GrGLProgramDesc::KeyHeader (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fix build error with tests Created 7 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 | « src/gpu/gl/GrGLProgramDesc.h ('k') | 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 10380f7924292adf8bfdbe8e85f398b492478ddb..fe17f889457922309e1fa4d01b1804537931f9de 100644
--- a/tests/GLProgramsTest.cpp
+++ b/tests/GLProgramsTest.cpp
@@ -44,7 +44,8 @@ void GrGLProgramDesc::setRandom(SkRandom* random,
// if the effects have used up all off the available attributes,
// don't try to use color or coverage attributes as input
do {
- header->fColorInput = random->nextULessThan(kColorInputCnt);
+ header->fColorInput = static_cast<GrGLProgramDesc::ColorInput>(
+ random->nextULessThan(kColorInputCnt));
} while (GrDrawState::kMaxVertexAttribCnt <= currAttribIndex &&
kAttribute_ColorInput == header->fColorInput);
header->fColorAttributeIndex = (header->fColorInput == kAttribute_ColorInput) ?
@@ -52,14 +53,16 @@ void GrGLProgramDesc::setRandom(SkRandom* random,
-1;
do {
- header->fCoverageInput = random->nextULessThan(kColorInputCnt);
+ header->fCoverageInput = static_cast<GrGLProgramDesc::ColorInput>(
+ random->nextULessThan(kColorInputCnt));
} while (GrDrawState::kMaxVertexAttribCnt <= currAttribIndex &&
kAttribute_ColorInput == header->fCoverageInput);
header->fCoverageAttributeIndex = (header->fCoverageInput == kAttribute_ColorInput) ?
currAttribIndex++ :
-1;
- header->fColorFilterXfermode = random->nextULessThan(SkXfermode::kLastCoeffMode + 1);
+ header->fColorFilterXfermode = static_cast<SkXfermode::Mode>(
+ random->nextULessThan(SkXfermode::kLastCoeffMode + 1));
#if GR_GL_EXPERIMENTAL_GS
header->fExperimentalGS = gpu->caps()->geometryShaderSupport() && random->nextBool();
« no previous file with comments | « src/gpu/gl/GrGLProgramDesc.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698