Loading libs/graphicsenv/GraphicsEnv.cpp +15 −11 Original line number Original line Diff line number Diff line Loading @@ -37,6 +37,7 @@ #include <memory> #include <memory> #include <string> #include <string> #include <thread> // TODO(b/37049319) Get this from a header once one exists // TODO(b/37049319) Get this from a header once one exists extern "C" { extern "C" { Loading Loading @@ -163,6 +164,7 @@ void GraphicsEnv::setDriverPathAndSphalLibraries(const std::string path, void GraphicsEnv::hintActivityLaunch() { void GraphicsEnv::hintActivityLaunch() { ATRACE_CALL(); ATRACE_CALL(); std::thread trySendGpuStatsThread([this]() { // If there's already graphics driver preloaded in the process, just send // If there's already graphics driver preloaded in the process, just send // the stats info to GpuStats directly through async binder. // the stats info to GpuStats directly through async binder. std::lock_guard<std::mutex> lock(mStatsLock); std::lock_guard<std::mutex> lock(mStatsLock); Loading @@ -174,6 +176,8 @@ void GraphicsEnv::hintActivityLaunch() { mGpuStats.vkDriverToSend = false; mGpuStats.vkDriverToSend = false; sendGpuStatsLocked(GraphicsEnv::Api::API_VK, true, mGpuStats.vkDriverLoadingTime); sendGpuStatsLocked(GraphicsEnv::Api::API_VK, true, mGpuStats.vkDriverLoadingTime); } } }); trySendGpuStatsThread.detach(); } } void GraphicsEnv::setGpuStats(const std::string& driverPackageName, void GraphicsEnv::setGpuStats(const std::string& driverPackageName, Loading Loading
libs/graphicsenv/GraphicsEnv.cpp +15 −11 Original line number Original line Diff line number Diff line Loading @@ -37,6 +37,7 @@ #include <memory> #include <memory> #include <string> #include <string> #include <thread> // TODO(b/37049319) Get this from a header once one exists // TODO(b/37049319) Get this from a header once one exists extern "C" { extern "C" { Loading Loading @@ -163,6 +164,7 @@ void GraphicsEnv::setDriverPathAndSphalLibraries(const std::string path, void GraphicsEnv::hintActivityLaunch() { void GraphicsEnv::hintActivityLaunch() { ATRACE_CALL(); ATRACE_CALL(); std::thread trySendGpuStatsThread([this]() { // If there's already graphics driver preloaded in the process, just send // If there's already graphics driver preloaded in the process, just send // the stats info to GpuStats directly through async binder. // the stats info to GpuStats directly through async binder. std::lock_guard<std::mutex> lock(mStatsLock); std::lock_guard<std::mutex> lock(mStatsLock); Loading @@ -174,6 +176,8 @@ void GraphicsEnv::hintActivityLaunch() { mGpuStats.vkDriverToSend = false; mGpuStats.vkDriverToSend = false; sendGpuStatsLocked(GraphicsEnv::Api::API_VK, true, mGpuStats.vkDriverLoadingTime); sendGpuStatsLocked(GraphicsEnv::Api::API_VK, true, mGpuStats.vkDriverLoadingTime); } } }); trySendGpuStatsThread.detach(); } } void GraphicsEnv::setGpuStats(const std::string& driverPackageName, void GraphicsEnv::setGpuStats(const std::string& driverPackageName, Loading