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

Commit 603c4071 authored by Vova Sharaienko's avatar Vova Sharaienko Committed by Automerger Merge Worker
Browse files

Merge "Fix gpuservice_unittest mem leaks" am: 79eaacdc am: 3616862f am: 8b2478af

parents 0f0680a2 8b2478af
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ cc_test {
    header_libs: ["bpf_headers"],
    shared_libs: [
        "libbase",
        "libbinder",
        "libbpf_bcc",
        "libcutils",
        "libgfxstats",
+5 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
#define LOG_TAG "gpuservice_unittest"

#include <unistd.h>
#include <binder/ProcessState.h>
#include <cutils/properties.h>
#include <gmock/gmock.h>
#include <gpustats/GpuStats.h>
@@ -79,6 +80,10 @@ public:
    void SetUp() override {
        mCpuVulkanVersion = property_get_int32("ro.cpuvulkan.version", 0);
        mGlesVersion = property_get_int32("ro.opengles.version", 0);

        // start the thread pool
        sp<ProcessState> ps(ProcessState::self());
        ps->startThreadPool();
    }

    std::unique_ptr<GpuStats> mGpuStats = std::make_unique<GpuStats>();