diff options
author | Romain Guy <romainguy@google.com> | 2012-07-31 21:16:07 -0700 |
---|---|---|
committer | Romain Guy <romainguy@google.com> | 2012-08-01 19:18:35 -0700 |
commit | 211efea7376371ee755edd2ad03e83ef6eea464e (patch) | |
tree | b79530b9f807f24571ce0e9ca143747e8c418725 /libs/hwui/SkiaShader.cpp | |
parent | 42e1e0d482d774cf18a55773e434f02edb9e4462 (diff) | |
download | frameworks_base-211efea7376371ee755edd2ad03e83ef6eea464e.zip frameworks_base-211efea7376371ee755edd2ad03e83ef6eea464e.tar.gz frameworks_base-211efea7376371ee755edd2ad03e83ef6eea464e.tar.bz2 |
Add dithering to gradients
Change-Id: Ic1208855bde3a254eca2fd7cef43e0f1318ce419
Diffstat (limited to 'libs/hwui/SkiaShader.cpp')
-rw-r--r-- | libs/hwui/SkiaShader.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/hwui/SkiaShader.cpp b/libs/hwui/SkiaShader.cpp index 71e1739..8916efd 100644 --- a/libs/hwui/SkiaShader.cpp +++ b/libs/hwui/SkiaShader.cpp @@ -250,6 +250,8 @@ void SkiaLinearGradientShader::setupProgram(Program* program, const mat4& modelV bindUniformColor(program->getUniform("endColor"), mColors[1]); } + Caches::getInstance().dither.setupProgram(program, textureUnit); + mat4 screenSpace; computeScreenSpaceMatrix(screenSpace, modelView); glUniformMatrix4fv(program->getUniform("screenSpace"), 1, GL_FALSE, &screenSpace.data[0]); @@ -375,6 +377,8 @@ void SkiaSweepGradientShader::setupProgram(Program* program, const mat4& modelVi bindUniformColor(program->getUniform("endColor"), mColors[1]); } + Caches::getInstance().dither.setupProgram(program, textureUnit); + mat4 screenSpace; computeScreenSpaceMatrix(screenSpace, modelView); glUniformMatrix4fv(program->getUniform("screenSpace"), 1, GL_FALSE, &screenSpace.data[0]); |