summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/Layer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'services/surfaceflinger/Layer.cpp')
-rw-r--r--services/surfaceflinger/Layer.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index b072213102..c520f54c36 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -555,8 +555,10 @@ void Layer::setGeometry(const sp<const DisplayDevice>& displayDevice, uint32_t z
sp<Layer> parent = mDrawingParent.promote();
if (parent.get()) {
auto& parentState = parent->getDrawingState();
- type = parentState.type;
- appId = parentState.appId;
+ if (parentState.type >= 0 || parentState.appId >= 0) {
+ type = parentState.type;
+ appId = parentState.appId;
+ }
}
getBE().compositionInfo.hwc.type = type;
@@ -1378,7 +1380,7 @@ bool Layer::setOverrideScalingMode(int32_t scalingMode) {
return true;
}
-void Layer::setInfo(uint32_t type, uint32_t appId) {
+void Layer::setInfo(int32_t type, int32_t appId) {
mCurrentState.appId = appId;
mCurrentState.type = type;
mCurrentState.modified = true;
@@ -1983,6 +1985,8 @@ void Layer::writeToProto(LayerProto* layerInfo, LayerVector::StateSet stateSet)
layerInfo->set_queued_frames(getQueuedFrameCount());
layerInfo->set_refresh_pending(isBufferLatched());
+ layerInfo->set_window_type(state.type);
+ layerInfo->set_app_id(state.appId);
}
void Layer::writeToProto(LayerProto* layerInfo, int32_t hwcId) {