summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger/RenderEngine/Program.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'services/surfaceflinger/RenderEngine/Program.cpp')
-rw-r--r--services/surfaceflinger/RenderEngine/Program.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/services/surfaceflinger/RenderEngine/Program.cpp b/services/surfaceflinger/RenderEngine/Program.cpp
index 0424e0c..936cb1b 100644
--- a/services/surfaceflinger/RenderEngine/Program.cpp
+++ b/services/surfaceflinger/RenderEngine/Program.cpp
@@ -64,6 +64,8 @@ Program::Program(const ProgramCache::Key& /*needs*/, const char* vertex, const c
mSamplerLoc = glGetUniformLocation(programId, "sampler");
mColorLoc = glGetUniformLocation(programId, "color");
mAlphaPlaneLoc = glGetUniformLocation(programId, "alphaPlane");
+ mSamplerMaskLoc = glGetUniformLocation(programId, "samplerMask");
+ mMaskAlphaThresholdLoc = glGetUniformLocation(programId, "maskAlphaThreshold");
// set-up the default values for our uniforms
glUseProgram(programId);
@@ -143,6 +145,12 @@ void Program::setUniforms(const Description& desc) {
}
// these uniforms are always present
glUniformMatrix4fv(mProjectionMatrixLoc, 1, GL_FALSE, desc.mProjectionMatrix.asArray());
+ if (mSamplerMaskLoc >= 0) {
+ glUniform1i(mSamplerMaskLoc, 1);
+ }
+ if (mMaskAlphaThresholdLoc >= 0) {
+ glUniform1f(mMaskAlphaThresholdLoc, desc.mMaskAlphaThreshold);
+ }
}
} /* namespace android */