diff options
author | Wiwit Rifa'i <wiwitrifai@google.com> | 2023-09-06 05:43:59 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-09-06 05:43:59 +0000 |
commit | e9f816fedc160f4acc1c0359b62ed0075e8ba20a (patch) | |
tree | a03e96f23359ec42ffe2f40432c98ff4b963859f | |
parent | 6f0e8b33e5dcc8a21559918ef45e6cf7aeae4a7c (diff) | |
parent | 55aba26701ec6ed5b63569305df2cdaa6c2e88f1 (diff) | |
download | zuma-e9f816fedc160f4acc1c0359b62ed0075e8ba20a.tar.gz |
libhwc2.1: don't construct string if debug log is disabled am: afbc2293eb am: 55aba26701
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/google/graphics/zuma/+/24581795
Change-Id: Idfc9c282005100d70e2f5bfb5cf4fe6463ef8b0d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | libhwc2.1/libresource/ExynosResourceManagerModule.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/libhwc2.1/libresource/ExynosResourceManagerModule.cpp b/libhwc2.1/libresource/ExynosResourceManagerModule.cpp index afb5efd..c2befbd 100644 --- a/libhwc2.1/libresource/ExynosResourceManagerModule.cpp +++ b/libhwc2.1/libresource/ExynosResourceManagerModule.cpp @@ -574,13 +574,15 @@ int32_t ExynosResourceManagerModule::otfMppReordering(ExynosDisplay *display, std::sort(otfMPPs.begin(), otfMPPs.end(), orderPolicy); - String8 after; - for (uint32_t i = 0; i < otfMPPs.size(); i++) { - ExynosMPPModule *mpp = (ExynosMPPModule *)otfMPPs[i]; - after.appendFormat("%s) ->", mpp->mName.string()); - } + if (hwcCheckDebugMessages(eDebugLoadBalancing)) { + String8 after; + for (uint32_t i = 0; i < otfMPPs.size(); i++) { + ExynosMPPModule *mpp = (ExynosMPPModule *)otfMPPs[i]; + after.appendFormat("(%s) -> ", mpp->mName.string()); + } - HDEBUGLOGD(eDebugLoadBalancing, "%s %p, %s", __func__, src.bufferHandle, after.string()); + ALOGD("%s %p, %s", __func__, src.bufferHandle, after.string()); + } return 0; } |