diff options
author | 2024-08-12 17:49:34 +0000 | |
---|---|---|
committer | 2024-08-12 17:49:34 +0000 | |
commit | c36f1c10185f0d4c3cb7c5053fd1f2f30829e92e (patch) | |
tree | 6aeb7403eae9ae8a2631f9cb6edeb7d6321a10d7 | |
parent | 2f30faffa56e04ca71c7bf53c43fc48379bfb518 (diff) | |
parent | 01b8126cbba5c4d8311949a4de9e6eb8ded31fa1 (diff) |
Merge "surfaceflinger: Remove unnecessary std::move" into main
4 files changed, 9 insertions, 9 deletions
diff --git a/services/surfaceflinger/DisplayHardware/HidlComposerHal.cpp b/services/surfaceflinger/DisplayHardware/HidlComposerHal.cpp index 12ab2c284a..be95913b89 100644 --- a/services/surfaceflinger/DisplayHardware/HidlComposerHal.cpp +++ b/services/surfaceflinger/DisplayHardware/HidlComposerHal.cpp @@ -209,7 +209,7 @@ sp<GraphicBuffer> allocateClearSlotBuffer() { if (!buffer || buffer->initCheck() != ::android::OK) { return nullptr; } - return std::move(buffer); + return buffer; } } // anonymous namespace diff --git a/services/surfaceflinger/Tracing/TransactionProtoParser.cpp b/services/surfaceflinger/Tracing/TransactionProtoParser.cpp index 2dc89b55ba..3752d5e0a5 100644 --- a/services/surfaceflinger/Tracing/TransactionProtoParser.cpp +++ b/services/surfaceflinger/Tracing/TransactionProtoParser.cpp @@ -62,12 +62,12 @@ perfetto::protos::TransactionState TransactionProtoParser::toProto(const Transac proto.mutable_layer_changes()->Reserve(static_cast<int32_t>(t.states.size())); 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())); 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( diff --git a/services/surfaceflinger/Tracing/TransactionTracing.cpp b/services/surfaceflinger/Tracing/TransactionTracing.cpp index 696f3489bf..bc9f8094f2 100644 --- a/services/surfaceflinger/Tracing/TransactionTracing.cpp +++ b/services/surfaceflinger/Tracing/TransactionTracing.cpp @@ -244,7 +244,7 @@ void TransactionTracing::addEntry(const std::vector<CommittedUpdates>& committed static_cast<int32_t>(update.createdLayers.size())); 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( @@ -276,7 +276,7 @@ void TransactionTracing::addEntry(const std::vector<CommittedUpdates>& committed static_cast<int32_t>(update.displayInfos.size())); for (auto& [layerStack, displayInfo] : update.displayInfos) { entryProto.mutable_displays()->Add( - std::move(mProtoParser.toProto(displayInfo, layerStack.id))); + mProtoParser.toProto(displayInfo, layerStack.id)); } } diff --git a/services/surfaceflinger/tests/unittests/TransactionTracingTest.cpp b/services/surfaceflinger/tests/unittests/TransactionTracingTest.cpp index fb4ef70450..7bf167498b 100644 --- a/services/surfaceflinger/tests/unittests/TransactionTracingTest.cpp +++ b/services/surfaceflinger/tests/unittests/TransactionTracingTest.cpp @@ -131,14 +131,14 @@ protected: // add layers and add some layer transaction { frontend::Update update; - update.layerCreationArgs.emplace_back(std::move( + update.layerCreationArgs.emplace_back( getLayerCreationArgs(mParentLayerId, /*parentId=*/UNASSIGNED_LAYER_ID, /*layerIdToMirror=*/UNASSIGNED_LAYER_ID, /*flags=*/123, - /*addToRoot=*/true))); - update.layerCreationArgs.emplace_back(std::move( + /*addToRoot=*/true)); + update.layerCreationArgs.emplace_back( getLayerCreationArgs(mChildLayerId, mParentLayerId, /*layerIdToMirror=*/UNASSIGNED_LAYER_ID, /*flags=*/456, - /*addToRoot=*/true))); + /*addToRoot=*/true)); TransactionState transaction; transaction.id = 50; ResolvedComposerState layerState; |