diff options
| author | 2019-02-13 00:17:06 +0000 | |
|---|---|---|
| committer | 2019-02-13 00:17:06 +0000 | |
| commit | 1b85addbaa2aee2c90d5036a7a16d0258b4613bc (patch) | |
| tree | 8b27143b92c378d8b7902343b850bda2fe581040 | |
| parent | 8bd24e969e831a5c86458d33f10eb8981c850842 (diff) | |
| parent | 210bb7ea89562242ee6b0e0b5a0258d26d3264c0 (diff) | |
Merge "Use const reference in setGpuStats() API"
| -rw-r--r-- | libs/graphicsenv/GraphicsEnv.cpp | 6 | ||||
| -rw-r--r-- | libs/graphicsenv/IGpuService.cpp | 6 | ||||
| -rw-r--r-- | libs/graphicsenv/include/graphicsenv/GraphicsEnv.h | 4 | ||||
| -rw-r--r-- | libs/graphicsenv/include/graphicsenv/IGpuService.h | 6 | ||||
| -rw-r--r-- | services/gpuservice/GpuService.cpp | 6 | ||||
| -rw-r--r-- | services/gpuservice/GpuService.h | 4 |
6 files changed, 16 insertions, 16 deletions
diff --git a/libs/graphicsenv/GraphicsEnv.cpp b/libs/graphicsenv/GraphicsEnv.cpp index 3b42f8093b..75fe2d31df 100644 --- a/libs/graphicsenv/GraphicsEnv.cpp +++ b/libs/graphicsenv/GraphicsEnv.cpp @@ -156,9 +156,9 @@ void GraphicsEnv::setDriverPath(const std::string path) { mDriverPath = path; } -void GraphicsEnv::setGpuStats(const std::string driverPackageName, - const std::string driverVersionName, const uint64_t driverVersionCode, - const std::string appPackageName) { +void GraphicsEnv::setGpuStats(const std::string& driverPackageName, + const std::string& driverVersionName, + const uint64_t driverVersionCode, const std::string& appPackageName) { ATRACE_CALL(); ALOGV("setGpuStats:\n" diff --git a/libs/graphicsenv/IGpuService.cpp b/libs/graphicsenv/IGpuService.cpp index 98a63952c7..762a27b799 100644 --- a/libs/graphicsenv/IGpuService.cpp +++ b/libs/graphicsenv/IGpuService.cpp @@ -27,9 +27,9 @@ class BpGpuService : public BpInterface<IGpuService> { public: explicit BpGpuService(const sp<IBinder>& impl) : BpInterface<IGpuService>(impl) {} - virtual void setGpuStats(const std::string driverPackageName, - const std::string driverVersionName, const uint64_t driverVersionCode, - const std::string appPackageName) { + virtual void setGpuStats(const std::string& driverPackageName, + const std::string& driverVersionName, const uint64_t driverVersionCode, + const std::string& appPackageName) { Parcel data, reply; data.writeInterfaceToken(IGpuService::getInterfaceDescriptor()); diff --git a/libs/graphicsenv/include/graphicsenv/GraphicsEnv.h b/libs/graphicsenv/include/graphicsenv/GraphicsEnv.h index 6e74e7c53d..c4482b7b63 100644 --- a/libs/graphicsenv/include/graphicsenv/GraphicsEnv.h +++ b/libs/graphicsenv/include/graphicsenv/GraphicsEnv.h @@ -47,8 +47,8 @@ public: // /data/app/com.example.driver/base.apk!/lib/arm64-v8a void setDriverPath(const std::string path); android_namespace_t* getDriverNamespace(); - void setGpuStats(const std::string driverPackageName, const std::string driverVersionName, - const uint64_t versionCode, const std::string appPackageName); + void setGpuStats(const std::string& driverPackageName, const std::string& driverVersionName, + const uint64_t versionCode, const std::string& appPackageName); void sendGpuStats(); bool shouldUseAngle(std::string appName); diff --git a/libs/graphicsenv/include/graphicsenv/IGpuService.h b/libs/graphicsenv/include/graphicsenv/IGpuService.h index c080c53f98..1e74d607d1 100644 --- a/libs/graphicsenv/include/graphicsenv/IGpuService.h +++ b/libs/graphicsenv/include/graphicsenv/IGpuService.h @@ -32,9 +32,9 @@ public: DECLARE_META_INTERFACE(GpuService); // set GPU stats from GraphicsEnvironment. - virtual void setGpuStats(const std::string driverPackageName, - const std::string driverVersionName, const uint64_t driverVersionCode, - const std::string appPackageName) = 0; + virtual void setGpuStats(const std::string& driverPackageName, + const std::string& driverVersionName, const uint64_t driverVersionCode, + const std::string& appPackageName) = 0; }; class BnGpuService : public BnInterface<IGpuService> { diff --git a/services/gpuservice/GpuService.cpp b/services/gpuservice/GpuService.cpp index 9906dea31c..68c185c119 100644 --- a/services/gpuservice/GpuService.cpp +++ b/services/gpuservice/GpuService.cpp @@ -37,9 +37,9 @@ const char* const GpuService::SERVICE_NAME = "gpu"; GpuService::GpuService() = default; -void GpuService::setGpuStats(const std::string driverPackageName, - const std::string driverVersionName, const uint64_t driverVersionCode, - const std::string appPackageName) { +void GpuService::setGpuStats(const std::string& driverPackageName, + const std::string& driverVersionName, const uint64_t driverVersionCode, + const std::string& appPackageName) { ATRACE_CALL(); std::lock_guard<std::mutex> lock(mStateLock); diff --git a/services/gpuservice/GpuService.h b/services/gpuservice/GpuService.h index edfd364bdd..5304fa1279 100644 --- a/services/gpuservice/GpuService.h +++ b/services/gpuservice/GpuService.h @@ -37,8 +37,8 @@ protected: private: // IGpuService interface - void setGpuStats(const std::string driverPackageName, const std::string driverVersionName, - const uint64_t driverVersionCode, const std::string appPackageName); + void setGpuStats(const std::string& driverPackageName, const std::string& driverVersionName, + const uint64_t driverVersionCode, const std::string& appPackageName); // GpuStats access must be protected by mStateLock std::mutex mStateLock; |