summaryrefslogtreecommitdiffstats
path: root/libs/hwui/Dither.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/Dither.cpp')
-rwxr-xr-xlibs/hwui/Dither.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/hwui/Dither.cpp b/libs/hwui/Dither.cpp
index 5817977..e80b325 100755
--- a/libs/hwui/Dither.cpp
+++ b/libs/hwui/Dither.cpp
@@ -76,8 +76,10 @@ void Dither::setupProgram(Program* program, GLuint* textureUnit) {
bindDitherTexture();
+ float ditherSize = 1.0f / DITHER_KERNEL_SIZE;
glUniform1i(program->getUniform("ditherSampler"), textureSlot);
- glUniform1f(program->getUniform("ditherSize"), 1.0f / DITHER_KERNEL_SIZE);
+ glUniform1f(program->getUniform("ditherSize"), ditherSize);
+ glUniform1f(program->getUniform("ditherSizeSquared"), ditherSize * ditherSize);
}
}; // namespace uirenderer