summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWiwit Rifa'i <wiwitrifai@google.com>2023-09-06 04:54:39 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-09-06 04:54:39 +0000
commit55aba26701ec6ed5b63569305df2cdaa6c2e88f1 (patch)
treea03e96f23359ec42ffe2f40432c98ff4b963859f
parent48c94a6ec63788b3d656aa633b853c40e88bd94e (diff)
parentafbc2293eb633e0dbfac32d8e4ef712fc6aa94b8 (diff)
downloadzuma-55aba26701ec6ed5b63569305df2cdaa6c2e88f1.tar.gz
libhwc2.1: don't construct string if debug log is disabled am: afbc2293eb
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/google/graphics/zuma/+/24581795 Change-Id: I72202d0be25344fec75e1aff3496d4d0027de3df Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--libhwc2.1/libresource/ExynosResourceManagerModule.cpp14
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;
}