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

Unified Diff: tests/GLProgramsTest.cpp

Issue 375823005: Remove gpu shader optimatization for solid white or trans black colors (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Change ignore function name Created 6 years, 5 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/GrGpuGL_program.cpp ('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 899b42fb4f12401c41d40c00d37fe6f52fa93727..9da1ecc53c0a798fdb9762c1b7376bdc7c088e2d 100644
--- a/tests/GLProgramsTest.cpp
+++ b/tests/GLProgramsTest.cpp
@@ -73,8 +73,9 @@ bool 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 = static_cast<GrGLProgramDesc::ColorInput>(
- random->nextULessThan(kColorInputCnt));
+ uint32_t colorRand = random->nextULessThan(2);
+ header->fColorInput = (0 == colorRand) ? GrGLProgramDesc::kAttribute_ColorInput :
+ GrGLProgramDesc::kUniform_ColorInput;
} while (GrDrawState::kMaxVertexAttribCnt <= currAttribIndex &&
kAttribute_ColorInput == header->fColorInput);
« no previous file with comments | « src/gpu/gl/GrGpuGL_program.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698