Skip to content

Commit 9393e39

Browse files
rprichardGerrit Code Review
authored andcommitted
Merge changes I359350a2,I4c0f5adb,Ie673d1f1 into main
* changes: libcompositionengine: avoid vector<const T> librenderengine: avoid vector<const T> libdumputils: avoid set<const T>
2 parents a42f727 + 658fdc7 commit 9393e39

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

libs/dumputils/dump_utils.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* limitations under the License.
1515
*/
1616
#include <set>
17+
#include <utility>
1718

1819
#include <android-base/file.h>
1920
#include <android-base/parseint.h>
@@ -115,7 +116,7 @@ static const std::vector<std::string> aidl_interfaces_to_dump {
115116

116117
/* list of extra hal interfaces to dump containing process during native dumps */
117118
// This is filled when dumpstate is called.
118-
static std::set<const std::string> extra_hal_interfaces_to_dump;
119+
static std::set<std::string> extra_hal_interfaces_to_dump;
119120

120121
static void read_extra_hals_to_dump_from_property() {
121122
// extra hals to dump are already filled
@@ -129,7 +130,7 @@ static void read_extra_hals_to_dump_from_property() {
129130
if (trimmed_token.length() == 0) {
130131
continue;
131132
}
132-
extra_hal_interfaces_to_dump.insert(trimmed_token);
133+
extra_hal_interfaces_to_dump.insert(std::move(trimmed_token));
133134
}
134135
}
135136

libs/renderengine/skia/Cache.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -718,8 +718,7 @@ void Cache::primeShaderCache(SkiaRenderEngine* renderengine, bool shouldPrimeUlt
718718
const auto externalTexture =
719719
std::make_shared<impl::ExternalTexture>(externalBuffer, *renderengine,
720720
impl::ExternalTexture::Usage::READABLE);
721-
std::vector<const std::shared_ptr<ExternalTexture>> textures =
722-
{srcTexture, externalTexture};
721+
std::vector<std::shared_ptr<ExternalTexture>> textures = {srcTexture, externalTexture};
723722

724723
// Another external texture with a different pixel format triggers useIsOpaqueWorkaround.
725724
// It doesn't have to be f16, but it can't be the usual 8888.

services/surfaceflinger/CompositionEngine/include/compositionengine/impl/planner/Predictor.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,15 @@ class LayerStack {
9292
}
9393

9494
private:
95-
std::vector<const LayerState> copyLayers(const std::vector<const LayerState*>& layers) {
96-
std::vector<const LayerState> copiedLayers;
95+
std::vector<LayerState> copyLayers(const std::vector<const LayerState*>& layers) {
96+
std::vector<LayerState> copiedLayers;
9797
copiedLayers.reserve(layers.size());
9898
std::transform(layers.cbegin(), layers.cend(), std::back_inserter(copiedLayers),
9999
[](const LayerState* layerState) { return *layerState; });
100100
return copiedLayers;
101101
}
102102

103-
std::vector<const LayerState> mLayers;
103+
std::vector<LayerState> mLayers;
104104

105105
// TODO(b/180976743): Tune kMaxDifferingFields
106106
constexpr static int kMaxDifferingFields = 6;

0 commit comments

Comments
 (0)