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

Commit aa83c739 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:...

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

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2103864



Change-Id: I929e9d2a791fed05517950174479f3c8e1971507
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 583ff5ca bc7e607d
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>();