diff options
author | Florin Malita <fmalita@chromium.org> | 2017-08-07 14:38:22 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-08-08 15:27:36 +0000 |
commit | 8a0044f1bd415bbef7167aa95ce897e2d7349dcc (patch) | |
tree | 004c7f878bf564a863bf029451cb6fc695e3ca42 /src/gpu/gl | |
parent | c6c10b45188f0921c9451644b61b072e3a36ee12 (diff) |
Tiling support for GrGradientEffect kTwo_ColorType/kThree_ColorType
(re-land of https://skia-review.googlesource.com/c/30780)
Currently only the hard-stop specializations support tiling.
Consolidate the tiling code and expand to kTwo_ColorType,
kThree_ColorType also.
BUG=6925
Change-Id: I017b4accba30e87367e139333e96246cb362b6a4
Reviewed-on: https://skia-review.googlesource.com/31422
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'src/gpu/gl')
-rw-r--r-- | src/gpu/gl/GrGLCaps.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp index 6ca9d632ee..04559c3dbd 100644 --- a/src/gpu/gl/GrGLCaps.cpp +++ b/src/gpu/gl/GrGLCaps.cpp @@ -892,10 +892,14 @@ void GrGLCaps::initGLSL(const GrGLContextInfo& ctxInfo) { shaderCaps->fVertexIDSupport = ctxInfo.glslGeneration() >= k330_GrGLSLGeneration; } - // The Tegra3 compiler will sometimes never return if we have min(abs(x), 1.0), so we must do - // the abs first in a separate expression. if (kTegra3_GrGLRenderer == ctxInfo.renderer()) { + // The Tegra3 compiler will sometimes never return if we have min(abs(x), 1.0), + // so we must do the abs first in a separate expression. shaderCaps->fCanUseMinAndAbsTogether = false; + + // Tegra3 fract() seems to trigger undefined behavior for negative values, so we + // must avoid this condition. + shaderCaps->fCanUseFractForNegativeValues = false; } // On Intel GPU there is an issue where it reads the second argument to atan "- %s.x" as an int |