summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger/RenderEngine/Description.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'services/surfaceflinger/RenderEngine/Description.cpp')
-rw-r--r--services/surfaceflinger/RenderEngine/Description.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/services/surfaceflinger/RenderEngine/Description.cpp b/services/surfaceflinger/RenderEngine/Description.cpp
index 0dab872..14607ca 100644
--- a/services/surfaceflinger/RenderEngine/Description.cpp
+++ b/services/surfaceflinger/RenderEngine/Description.cpp
@@ -33,6 +33,8 @@ Description::Description() :
mOpaque = true;
mTextureEnabled = false;
mColorMatrixEnabled = false;
+ mMaskTextureEnabled = false;
+ mMaskAlphaThreshold = 0.0f;
memset(mColor, 0, sizeof(mColor));
}
@@ -92,5 +94,14 @@ const mat4& Description::getColorMatrix() const {
return mColorMatrix;
}
+void Description::setMasking(const Texture& maskTexture, float alphaThreshold) {
+ mMaskTexture = maskTexture;
+ mMaskTextureEnabled = true;
+ mMaskAlphaThreshold = alphaThreshold;
+}
+
+void Description::disableMasking() {
+ mMaskTextureEnabled = false;
+}
} /* namespace android */