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

Commit a39d8fe1 authored by Vishnu Nair's avatar Vishnu Nair Committed by Android (Google) Code Review
Browse files

Merge "Remove legacy layer states!" into main

parents b9463bf2 dc83d4b7
Loading
Loading
Loading
Loading
+16 −1896

File changed.

Preview size limit exceeded, changes collapsed.

+5 −491

File changed.

Preview size limit exceeded, changes collapsed.

+2 −9
Original line number Diff line number Diff line
@@ -178,7 +178,7 @@ void LayerProtoHelper::writeToProto(
}

void LayerProtoHelper::writeToProto(
        const WindowInfo& inputInfo, const wp<Layer>& touchableRegionBounds,
        const WindowInfo& inputInfo,
        std::function<perfetto::protos::InputWindowInfoProto*()> getInputWindowInfoProto) {
    if (inputInfo.token == nullptr) {
        return;
@@ -208,13 +208,6 @@ void LayerProtoHelper::writeToProto(
    proto->set_global_scale_factor(inputInfo.globalScaleFactor);
    LayerProtoHelper::writeToProtoDeprecated(inputInfo.transform, proto->mutable_transform());
    proto->set_replace_touchable_region_with_crop(inputInfo.replaceTouchableRegionWithCrop);
    auto cropLayer = touchableRegionBounds.promote();
    if (cropLayer != nullptr) {
        proto->set_crop_layer_id(cropLayer->sequence);
        LayerProtoHelper::writeToProto(cropLayer->getScreenBounds(
                                               false /* reduceTransparentRegion */),
                                       [&]() { return proto->mutable_touchable_region_crop(); });
    }
}

void LayerProtoHelper::writeToProto(const mat4 matrix,
@@ -482,7 +475,7 @@ void LayerProtoHelper::writeSnapshotToProto(perfetto::protos::LayerProto* layerI
    layerInfo->set_owner_uid(requestedState.ownerUid.val());

    if ((traceFlags & LayerTracing::TRACE_INPUT) && snapshot.hasInputInfo()) {
        LayerProtoHelper::writeToProto(snapshot.inputInfo, {},
        LayerProtoHelper::writeToProto(snapshot.inputInfo,
                                       [&]() { return layerInfo->mutable_input_window_info(); });
    }

+1 −1
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ public:
            const renderengine::ExternalTexture& buffer,
            std::function<perfetto::protos::ActiveBufferProto*()> getActiveBufferProto);
    static void writeToProto(
            const gui::WindowInfo& inputInfo, const wp<Layer>& touchableRegionBounds,
            const gui::WindowInfo& inputInfo,
            std::function<perfetto::protos::InputWindowInfoProto*()> getInputWindowInfoProto);
    static void writeToProto(const mat4 matrix,
                             perfetto::protos::ColorTransformProto* colorTransformProto);
+0 −10
Original line number Diff line number Diff line
@@ -45,16 +45,6 @@ int LayerVector::do_compare(const void* lhs, const void* rhs) const
    const auto& lState = l->getDrawingState();
    const auto& rState = r->getDrawingState();

    const auto ls = lState.layerStack;
    const auto rs = rState.layerStack;
    if (ls != rs)
        return (ls > rs) ? 1 : -1;

    int32_t lz = lState.z;
    int32_t rz = rState.z;
    if (lz != rz)
        return (lz > rz) ? 1 : -1;

    if (l->sequence == r->sequence)
        return 0;

Loading