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.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/services/surfaceflinger/LayerDim.cpp b/services/surfaceflinger/LayerDim.cpp
index 14aa328..5afd291 100644
--- a/services/surfaceflinger/LayerDim.cpp
+++ b/services/surfaceflinger/LayerDim.cpp
@@ -40,7 +40,7 @@ LayerDim::~LayerDim() {
}
void LayerDim::onDraw(const sp<const DisplayDevice>& hw,
- const Region& /* clip */, bool useIdentityTransform) const
+ const Region& /* clip */, bool useIdentityTransform)
{
const State& s(getDrawingState());
if (s.alpha>0) {
@@ -58,6 +58,15 @@ bool LayerDim::isVisible() const {
return !(s.flags & layer_state_t::eLayerHidden) && s.alpha;
}
+void LayerDim::setPerFrameData(const sp<const DisplayDevice>& hw,
+ HWComposer::HWCLayerInterface& layer) {
+ HWComposer& hwc = mFlinger->getHwComposer();
+
+ Layer::setPerFrameData(hw, layer);
+ if (hwc.hasDimComposition()) {
+ layer.setDim();
+ }
+}
// ---------------------------------------------------------------------------