summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger/LayerDim.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'services/surfaceflinger/LayerDim.cpp')
-rw-r--r--services/surfaceflinger/LayerDim.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/services/surfaceflinger/LayerDim.cpp b/services/surfaceflinger/LayerDim.cpp
index 25caa0a..36bafdb 100644
--- a/services/surfaceflinger/LayerDim.cpp
+++ b/services/surfaceflinger/LayerDim.cpp
@@ -33,13 +33,12 @@
namespace android {
// ---------------------------------------------------------------------------
-LayerDim::LayerDim(SurfaceFlinger* flinger, const sp<Client>& client)
- : LayerBaseClient(flinger, client)
-{
+LayerDim::LayerDim(SurfaceFlinger* flinger, const sp<Client>& client,
+ const String8& name, uint32_t w, uint32_t h, uint32_t flags)
+ : Layer(flinger, client, name, w, h, flags) {
}
-LayerDim::~LayerDim()
-{
+LayerDim::~LayerDim() {
}
void LayerDim::onDraw(const sp<const DisplayDevice>& hw, const Region& clip) const
@@ -71,6 +70,12 @@ void LayerDim::onDraw(const sp<const DisplayDevice>& hw, const Region& clip) con
}
}
+bool LayerDim::isVisible() const {
+ const Layer::State& s(drawingState());
+ return !(s.flags & layer_state_t::eLayerHidden) && s.alpha;
+}
+
+
// ---------------------------------------------------------------------------
}; // namespace android