summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/LayerProtoHelper.cpp
diff options
context:
space:
mode:
author Xin Li <delphij@google.com> 2024-06-20 20:42:50 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-06-20 20:42:50 +0000
commit3dd03323aa8825a0c7bf4dcc1ed6d6c3b88a3d7f (patch)
treee05639565a22611c334a83a35a998f3fba3e1f1a /services/surfaceflinger/LayerProtoHelper.cpp
parent447d0a33acc9827809d1049023b05e4cac05fc70 (diff)
parentbb1814a0b94e8efb3fa3843c3d6a6533a382cac3 (diff)
Merge "Merge 24Q3 (ab/11976889) to aosp-main-future" into aosp-main-future
Diffstat (limited to 'services/surfaceflinger/LayerProtoHelper.cpp')
-rw-r--r--services/surfaceflinger/LayerProtoHelper.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/services/surfaceflinger/LayerProtoHelper.cpp b/services/surfaceflinger/LayerProtoHelper.cpp
index aa6026ef79..496033b749 100644
--- a/services/surfaceflinger/LayerProtoHelper.cpp
+++ b/services/surfaceflinger/LayerProtoHelper.cpp
@@ -334,7 +334,7 @@ void LayerProtoFromSnapshotGenerator::writeHierarchyToProto(
variant);
frontend::LayerSnapshot* childSnapshot = getSnapshot(path, layer);
if (variant == Variant::Attached || variant == Variant::Detached ||
- variant == Variant::Mirror) {
+ frontend::LayerHierarchy::isMirror(variant)) {
mChildToParent[childSnapshot->uniqueSequence] = snapshot->uniqueSequence;
layerProto->add_children(childSnapshot->uniqueSequence);
} else if (variant == Variant::Relative) {
@@ -382,7 +382,8 @@ void LayerProtoHelper::writeSnapshotToProto(perfetto::protos::LayerProto* layerI
layerInfo->set_corner_radius(
(snapshot.roundedCorner.radius.x + snapshot.roundedCorner.radius.y) / 2.0);
layerInfo->set_background_blur_radius(snapshot.backgroundBlurRadius);
- layerInfo->set_is_trusted_overlay(snapshot.isTrustedOverlay);
+ layerInfo->set_is_trusted_overlay(snapshot.trustedOverlay == gui::TrustedOverlay::ENABLED);
+ // TODO(b/339701674) update protos
LayerProtoHelper::writeToProtoDeprecated(transform, layerInfo->mutable_transform());
LayerProtoHelper::writePositionToProto(transform.tx(), transform.ty(),
[&]() { return layerInfo->mutable_position(); });
@@ -465,7 +466,7 @@ LayerProtoHelper::writeDisplayInfoToProto(const frontend::DisplayInfos& displayI
displays.Reserve(displayInfos.size());
for (const auto& [layerStack, displayInfo] : displayInfos) {
auto displayProto = displays.Add();
- displayProto->set_id(displayInfo.info.displayId);
+ displayProto->set_id(displayInfo.info.displayId.val());
displayProto->set_layer_stack(layerStack.id);
displayProto->mutable_size()->set_w(displayInfo.info.logicalWidth);
displayProto->mutable_size()->set_h(displayInfo.info.logicalHeight);