aboutsummaryrefslogtreecommitdiffhomepage
path: root/README
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-10 06:30:18 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-10 06:30:18 +0000
commit824c346b6e0e114063c1a8ad4ba7c3a669ee2cff (patch)
tree746fca51437b25e3a6e851a42ec40ec3d5ac6ee0 /README
parentab9d30cb01d0c8401537dc115aba2842b0f4f27f (diff)
Express (GLSL expression, possibly known value) pairs as a class
Express (GLSL expression, possibly known value) pairs as a class instead of two variables Introduces GrGLSLExpr<N> to encapsulate the expression and possibly constant-folded value of the expression. This simplifies passing of the expressions to functions. Changes the shaders with following patterns: { // Stage 0: Linear Gradient vec4 colorTemp = mix(uGradientStartColor_Stage0, uGradientEndColor_Stage0, clamp(vMatrixCoord_Stage0.x, 0.0, 1 colorTemp.rgb *= colorTemp.a; - output_Stage0 = vec4((vColor) * (colorTemp)); + output_Stage0 = (vColor * colorTemp); + } Previously the vector cast was always added if constant folding was effective, regardless of the term dimensions. Now the vector upcast is not inserted in places where it is not needed, ie. when the binary operator term is of the target dimension. Also, some parentheses can be omitted. It is assumed that GrGLSLExpr<N>("string") constructors construct a simple expression or parenthesized expression. Otherwise the shader code remains identical. R=jvanverth@google.com, bsalomon@google.com, robertphillips@google.com Author: kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/25048002 git-svn-id: http://skia.googlecode.com/svn/trunk@11690 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions