Loading services/gpuservice/tests/unittests/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ cc_test { header_libs: ["bpf_headers"], shared_libs: [ "libbase", "libbinder", "libbpf_bcc", "libcutils", "libgfxstats", Loading services/gpuservice/tests/unittests/GpuStatsTest.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -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> Loading Loading @@ -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>(); Loading Loading
services/gpuservice/tests/unittests/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ cc_test { header_libs: ["bpf_headers"], shared_libs: [ "libbase", "libbinder", "libbpf_bcc", "libcutils", "libgfxstats", Loading
services/gpuservice/tests/unittests/GpuStatsTest.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -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> Loading Loading @@ -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>(); Loading