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

Commit 9393e39c authored by Ryan Prichard's avatar Ryan Prichard Committed by Gerrit Code Review
Browse files

Merge changes I359350a2,I4c0f5adb,Ie673d1f1 into main

* changes:
  libcompositionengine: avoid vector<const T>
  librenderengine: avoid vector<const T>
  libdumputils: avoid set<const T>
parents a42f727d 658fdc7d
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@
 * limitations under the License.
 */
#include <set>
#include <utility>

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

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

static void read_extra_hals_to_dump_from_property() {
    // extra hals to dump are already filled
@@ -129,7 +130,7 @@ static void read_extra_hals_to_dump_from_property() {
        if (trimmed_token.length() == 0) {
            continue;
        }
        extra_hal_interfaces_to_dump.insert(trimmed_token);
        extra_hal_interfaces_to_dump.insert(std::move(trimmed_token));
    }
}

+1 −2
Original line number Diff line number Diff line
@@ -718,8 +718,7 @@ void Cache::primeShaderCache(SkiaRenderEngine* renderengine, bool shouldPrimeUlt
        const auto externalTexture =
                std::make_shared<impl::ExternalTexture>(externalBuffer, *renderengine,
                                                        impl::ExternalTexture::Usage::READABLE);
        std::vector<const std::shared_ptr<ExternalTexture>> textures =
            {srcTexture, externalTexture};
        std::vector<std::shared_ptr<ExternalTexture>> textures = {srcTexture, externalTexture};

        // Another external texture with a different pixel format triggers useIsOpaqueWorkaround.
        // It doesn't have to be f16, but it can't be the usual 8888.
+3 −3
Original line number Diff line number Diff line
@@ -92,15 +92,15 @@ public:
    }

private:
    std::vector<const LayerState> copyLayers(const std::vector<const LayerState*>& layers) {
        std::vector<const LayerState> copiedLayers;
    std::vector<LayerState> copyLayers(const std::vector<const LayerState*>& layers) {
        std::vector<LayerState> copiedLayers;
        copiedLayers.reserve(layers.size());
        std::transform(layers.cbegin(), layers.cend(), std::back_inserter(copiedLayers),
                       [](const LayerState* layerState) { return *layerState; });
        return copiedLayers;
    }

    std::vector<const LayerState> mLayers;
    std::vector<LayerState> mLayers;

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