Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7941ecfe authored by Kean Mariotti's avatar Kean Mariotti
Browse files

Revert^2 Revert layer proto format back to proto2

Perfetto doesn't support proto3, hence reverted to proto2.

This reverts commit dcc0bab7

Bug: b/284424784
Test: atest libsurfaceflinger_unittest && atest transactiontrace_testsuite
Change-Id: I107a56f57f547056c44877e776d169dd21db618a
parent 4ba343c8
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -2325,15 +2325,11 @@ void Layer::writeToProtoCommonState(perfetto::protos::LayerProto* layerInfo,
    auto parent = useDrawing ? mDrawingParent.promote() : mCurrentParent.promote();
    if (parent != nullptr) {
        layerInfo->set_parent(parent->sequence);
    } else {
        layerInfo->set_parent(-1);
    }

    auto zOrderRelativeOf = state.zOrderRelativeOf.promote();
    if (zOrderRelativeOf != nullptr) {
        layerInfo->set_z_order_relative_of(zOrderRelativeOf->sequence);
    } else {
        layerInfo->set_z_order_relative_of(-1);
    }

    layerInfo->set_is_relative_of(state.isRelativeOf);
+2 −2
Original line number Diff line number Diff line
@@ -193,13 +193,13 @@ void LayerProtoParser::updateChildrenAndRelative(const perfetto::protos::LayerPr
        }
    }

    if (layerProto.parent() != -1) {
    if (layerProto.has_parent()) {
        if (layerMap.count(layerProto.parent()) > 0) {
            currLayer->parent = layerMap[layerProto.parent()];
        }
    }

    if (layerProto.z_order_relative_of() != -1) {
    if (layerProto.has_z_order_relative_of()) {
        if (layerMap.count(layerProto.z_order_relative_of()) > 0) {
            currLayer->zOrderRelativeOf = layerMap[layerProto.z_order_relative_of()];
        }