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

Commit c36f1c10 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "surfaceflinger: Remove unnecessary std::move" into main

parents 2f30faff 01b8126c
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -209,7 +209,7 @@ sp<GraphicBuffer> allocateClearSlotBuffer() {
    if (!buffer || buffer->initCheck() != ::android::OK) {
    if (!buffer || buffer->initCheck() != ::android::OK) {
        return nullptr;
        return nullptr;
    }
    }
    return std::move(buffer);
    return buffer;
}
}


} // anonymous namespace
} // anonymous namespace
+2 −2
Original line number Original line Diff line number Diff line
@@ -62,12 +62,12 @@ perfetto::protos::TransactionState TransactionProtoParser::toProto(const Transac


    proto.mutable_layer_changes()->Reserve(static_cast<int32_t>(t.states.size()));
    proto.mutable_layer_changes()->Reserve(static_cast<int32_t>(t.states.size()));
    for (auto& layerState : t.states) {
    for (auto& layerState : t.states) {
        proto.mutable_layer_changes()->Add(std::move(toProto(layerState)));
        proto.mutable_layer_changes()->Add(toProto(layerState));
    }
    }


    proto.mutable_display_changes()->Reserve(static_cast<int32_t>(t.displays.size()));
    proto.mutable_display_changes()->Reserve(static_cast<int32_t>(t.displays.size()));
    for (auto& displayState : t.displays) {
    for (auto& displayState : t.displays) {
        proto.mutable_display_changes()->Add(std::move(toProto(displayState)));
        proto.mutable_display_changes()->Add(toProto(displayState));
    }
    }


    proto.mutable_merged_transaction_ids()->Reserve(
    proto.mutable_merged_transaction_ids()->Reserve(
+2 −2
Original line number Original line Diff line number Diff line
@@ -244,7 +244,7 @@ void TransactionTracing::addEntry(const std::vector<CommittedUpdates>& committed
                static_cast<int32_t>(update.createdLayers.size()));
                static_cast<int32_t>(update.createdLayers.size()));


        for (const auto& args : update.createdLayers) {
        for (const auto& args : update.createdLayers) {
            entryProto.mutable_added_layers()->Add(std::move(mProtoParser.toProto(args)));
            entryProto.mutable_added_layers()->Add(mProtoParser.toProto(args));
        }
        }


        entryProto.mutable_destroyed_layers()->Reserve(
        entryProto.mutable_destroyed_layers()->Reserve(
@@ -276,7 +276,7 @@ void TransactionTracing::addEntry(const std::vector<CommittedUpdates>& committed
                    static_cast<int32_t>(update.displayInfos.size()));
                    static_cast<int32_t>(update.displayInfos.size()));
            for (auto& [layerStack, displayInfo] : update.displayInfos) {
            for (auto& [layerStack, displayInfo] : update.displayInfos) {
                entryProto.mutable_displays()->Add(
                entryProto.mutable_displays()->Add(
                        std::move(mProtoParser.toProto(displayInfo, layerStack.id)));
                        mProtoParser.toProto(displayInfo, layerStack.id));
            }
            }
        }
        }


+4 −4
Original line number Original line Diff line number Diff line
@@ -131,14 +131,14 @@ protected:
        // add layers and add some layer transaction
        // add layers and add some layer transaction
        {
        {
            frontend::Update update;
            frontend::Update update;
            update.layerCreationArgs.emplace_back(std::move(
            update.layerCreationArgs.emplace_back(
                    getLayerCreationArgs(mParentLayerId, /*parentId=*/UNASSIGNED_LAYER_ID,
                    getLayerCreationArgs(mParentLayerId, /*parentId=*/UNASSIGNED_LAYER_ID,
                                         /*layerIdToMirror=*/UNASSIGNED_LAYER_ID, /*flags=*/123,
                                         /*layerIdToMirror=*/UNASSIGNED_LAYER_ID, /*flags=*/123,
                                         /*addToRoot=*/true)));
                                         /*addToRoot=*/true));
            update.layerCreationArgs.emplace_back(std::move(
            update.layerCreationArgs.emplace_back(
                    getLayerCreationArgs(mChildLayerId, mParentLayerId,
                    getLayerCreationArgs(mChildLayerId, mParentLayerId,
                                         /*layerIdToMirror=*/UNASSIGNED_LAYER_ID, /*flags=*/456,
                                         /*layerIdToMirror=*/UNASSIGNED_LAYER_ID, /*flags=*/456,
                                         /*addToRoot=*/true)));
                                         /*addToRoot=*/true));
            TransactionState transaction;
            TransactionState transaction;
            transaction.id = 50;
            transaction.id = 50;
            ResolvedComposerState layerState;
            ResolvedComposerState layerState;