diff options
author | Tomasz Wasilczyk <twasilczyk@google.com> | 2023-09-16 00:32:51 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-09-16 00:32:51 +0000 |
commit | dbdb2e7b86f18cdb04ea7af09a53f605d202016c (patch) | |
tree | f5476b6083f0058bc78e0fe125410d462dd9e0b2 | |
parent | e9f816fedc160f4acc1c0359b62ed0075e8ba20a (diff) | |
parent | 684102a39b1531d9e558cc8d57882f703a703d5d (diff) | |
download | zuma-dbdb2e7b86f18cdb04ea7af09a53f605d202016c.tar.gz |
Use String8/16 c_str am: 684102a39b
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/google/graphics/zuma/+/24774930
Change-Id: I20c7dbd00e1c7ab8d70c1b9a31119378d43b249f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
3 files changed, 31 insertions, 32 deletions
diff --git a/libhwc2.1/libdisplayinterface/ExynosDisplayDrmInterfaceModule.cpp b/libhwc2.1/libdisplayinterface/ExynosDisplayDrmInterfaceModule.cpp index 83fc581..987cd90 100644 --- a/libhwc2.1/libdisplayinterface/ExynosDisplayDrmInterfaceModule.cpp +++ b/libhwc2.1/libdisplayinterface/ExynosDisplayDrmInterfaceModule.cpp @@ -61,11 +61,11 @@ int32_t ExynosPrimaryDisplayDrmInterfaceModule::sendHistogramChannelIoctl(Histog histogramRequest.hist_id = channelId; if (control == HistogramChannelIoctl_t::REQUEST) { - ATRACE_NAME(String8::format("requestIoctl #%u", channelId).string()); + ATRACE_NAME(String8::format("requestIoctl #%u", channelId).c_str()); return mDrmDevice->CallVendorIoctl(DRM_IOCTL_EXYNOS_HISTOGRAM_CHANNEL_REQUEST, (void *)&histogramRequest); } else if (control == HistogramChannelIoctl_t::CANCEL) { - ATRACE_NAME(String8::format("cancelIoctl #%u", channelId).string()); + ATRACE_NAME(String8::format("cancelIoctl #%u", channelId).c_str()); return mDrmDevice->CallVendorIoctl(DRM_IOCTL_EXYNOS_HISTOGRAM_CHANNEL_CANCEL, (void *)&histogramRequest); } else { diff --git a/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp b/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp index fc2ac33..3f3439f 100644 --- a/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp +++ b/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp @@ -22,14 +22,14 @@ #include "ExynosHWCHelper.h" -#define OP_MANAGER_LOGD(msg, ...) \ - ALOGD("[%s] OperationRateManager::%s:" msg, mDisplay->mDisplayName.string(), __func__, \ +#define OP_MANAGER_LOGD(msg, ...) \ + ALOGD("[%s] OperationRateManager::%s:" msg, mDisplay->mDisplayName.c_str(), __func__, \ ##__VA_ARGS__) -#define OP_MANAGER_LOGI(msg, ...) \ - ALOGI("[%s] OperationRateManager::%s:" msg, mDisplay->mDisplayName.string(), __func__, \ +#define OP_MANAGER_LOGI(msg, ...) \ + ALOGI("[%s] OperationRateManager::%s:" msg, mDisplay->mDisplayName.c_str(), __func__, \ ##__VA_ARGS__) -#define OP_MANAGER_LOGE(msg, ...) \ - ALOGE("[%s] OperationRateManager::%s:" msg, mDisplay->mDisplayName.string(), __func__, \ +#define OP_MANAGER_LOGE(msg, ...) \ + ALOGE("[%s] OperationRateManager::%s:" msg, mDisplay->mDisplayName.c_str(), __func__, \ ##__VA_ARGS__) using namespace zuma; @@ -271,5 +271,5 @@ void ExynosPrimaryDisplayModule::checkPreblendingRequirement() { for (size_t i = 0; i < mLayers.size(); ++i) { count += checkPreblending(i, mLayers[i]); } - DISPLAY_LOGD(eDebugTDM, "disp(%d),cnt=%d%s", mDisplayId, count, log.string()); + DISPLAY_LOGD(eDebugTDM, "disp(%d),cnt=%d%s", mDisplayId, count, log.c_str()); } diff --git a/libhwc2.1/libresource/ExynosResourceManagerModule.cpp b/libhwc2.1/libresource/ExynosResourceManagerModule.cpp index c2befbd..46c17fb 100644 --- a/libhwc2.1/libresource/ExynosResourceManagerModule.cpp +++ b/libhwc2.1/libresource/ExynosResourceManagerModule.cpp @@ -59,7 +59,7 @@ bool ExynosResourceManagerModule::checkTDMResource(ExynosDisplay *display, Exyno const uint32_t blkId = currentMPP->getHWBlockId(); const uint32_t axiId = currentMPP->getAXIPortId(); HDEBUGLOGD(eDebugTDM, "%s : %p trying to assign to %s, compare with layers", __func__, - mppSrc->mSrcImg.bufferHandle, currentMPP->mName.string()); + mppSrc->mSrcImg.bufferHandle, currentMPP->mName.c_str()); ExynosLayer *layer = (mppSrc->mSourceType == MPP_SOURCE_LAYER) ? (ExynosLayer *)mppSrc : nullptr; for (auto compLayer : display->mLayers) { @@ -72,7 +72,7 @@ bool ExynosResourceManagerModule::checkTDMResource(ExynosDisplay *display, Exyno if (display->mExynosCompositionInfo.mHasCompositionLayer) { HDEBUGLOGD(eDebugTDM, "%s : %p trying to assign to %s, compare with ExynosComposition Target buffer", - __func__, mppSrc->mSrcImg.bufferHandle, currentMPP->mName.string()); + __func__, mppSrc->mSrcImg.bufferHandle, currentMPP->mName.c_str()); ExynosMPP *otfMPP = display->mExynosCompositionInfo.mOtfMPP; if (otfMPP) getAmounts(display, blkId, axiId, otfMPP, mppSrc, &display->mExynosCompositionInfo, @@ -82,7 +82,7 @@ bool ExynosResourceManagerModule::checkTDMResource(ExynosDisplay *display, Exyno if (display->mClientCompositionInfo.mHasCompositionLayer) { HDEBUGLOGD(eDebugTDM, "%s : %p trying to assign to %s, compare with ClientComposition Target buffer", - __func__, mppSrc->mSrcImg.bufferHandle, currentMPP->mName.string()); + __func__, mppSrc->mSrcImg.bufferHandle, currentMPP->mName.c_str()); ExynosMPP *otfMPP = display->mClientCompositionInfo.mOtfMPP; if (otfMPP) getAmounts(display, blkId, axiId, otfMPP, mppSrc, &display->mClientCompositionInfo, @@ -101,18 +101,18 @@ bool ExynosResourceManagerModule::checkTDMResource(ExynosDisplay *display, Exyno display->mDisplayTDMInfo[TDMInfoIdx].getAvailableAmount(attr->first).totalAmount; HDEBUGLOGD(eDebugTDM, "%s, layer[%p] -> %s attr[%s],ls=%d,accumulated:%d,current:%d,total: %d", - __func__, mppSrc->mSrcImg.bufferHandle, currentMPP->mName.string(), - attr->second.name.string(), loadSharing, accumulatedAmount[attr->first], + __func__, mppSrc->mSrcImg.bufferHandle, currentMPP->mName.c_str(), + attr->second.name.c_str(), loadSharing, accumulatedAmount[attr->first], currentAmount, totalAmount); if (accumulatedAmount[attr->first] + currentAmount > totalAmount) { HDEBUGLOGD(eDebugTDM, "%s, %s could not assigned by attr[%s]", __func__, - currentMPP->mName.string(), attr->second.name.string()); + currentMPP->mName.c_str(), attr->second.name.c_str()); return false; } } HDEBUGLOGD(eDebugTDM, "%s : %p trying to assign to %s successfully", __func__, - mppSrc->mSrcImg.bufferHandle, currentMPP->mName.string()); + mppSrc->mSrcImg.bufferHandle, currentMPP->mName.c_str()); return true; } @@ -136,7 +136,7 @@ bool ExynosResourceManagerModule::isHWResourceAvailable(ExynosDisplay *display, if (overlappedLayers.size()) { HDEBUGLOGD(eDebugTDM, "%s : %p trying to assign to %s, check its overlapped layers(%zu) status", - __func__, mppSrc->mSrcImg.bufferHandle, currentMPP->mName.string(), + __func__, mppSrc->mSrcImg.bufferHandle, currentMPP->mName.c_str(), overlappedLayers.size()); for (auto &overlappedLayer : overlappedLayers) { @@ -172,16 +172,15 @@ void ExynosResourceManagerModule::setupHWResource(const tdm_attr_t &tdmAttrId, c tdmAttrId); if (addedDisplay == nullptr) { HDEBUGLOGD(eDebugTDM, "(%s=>%s) : %s amount is updated to %d", - resourceIdx.toString8().string(), iter->first.toString8().string(), - name.string(), amount); + resourceIdx.toString8().c_str(), iter->first.toString8().c_str(), + name.c_str(), amount); } else { - HDEBUGLOGD(eDebugTDM, - "(%s=>%s) : hwResource.totalAmount=%d %s amount is updated to %d", - resourceIdx.toString8().string(), iter->first.toString8().string(), - hwResource.totalAmount, name.string(), amount); + HDEBUGLOGD(eDebugTDM, "(%s=>%s) : hwResource.totalAmount=%d %s amount is updated to %d", + resourceIdx.toString8().c_str(), iter->first.toString8().c_str(), + hwResource.totalAmount, name.c_str(), amount); } } else { - ALOGW("(%s): cannot find resource for %s", resourceIdx.toString8().string(), name.string()); + ALOGW("(%s): cannot find resource for %s", resourceIdx.toString8().c_str(), name.c_str()); } } @@ -231,7 +230,7 @@ uint32_t ExynosResourceManagerModule::setDisplaysTDMInfo() .getAvailableAmount(attr->first) .totalAmount; HDEBUGLOGD(eDebugTDM, "%s : [%s] display:%d,block:%d, amount : %d(%s)", - __func__, attr->second.name.string(), display->mType, + __func__, attr->second.name.c_str(), display->mType, blockId->first, amount, display->isEnabled() ? "used" : "not used"); } else { @@ -242,7 +241,7 @@ uint32_t ExynosResourceManagerModule::setDisplaysTDMInfo() .totalAmount; HDEBUGLOGD(eDebugTDM, "%s : [%s] display:%d,block:%d,axi:%d, amount:%d(%s)", - __func__, attr->second.name.string(), display->mType, + __func__, attr->second.name.c_str(), display->mType, blockId->first, axi->first, amount, display->isEnabled() ? "used" : "not used"); } @@ -558,7 +557,7 @@ int32_t ExynosResourceManagerModule::otfMppReordering(ExynosDisplay *display, } HDEBUGLOGD(eDebugLoadBalancing, "%s: %s is assigned (AFBC:%d, WCG:%d), is %s", __func__, - mpp->mName.string(), isAFBC, isWCG, + mpp->mName.c_str(), isAFBC, isWCG, (mppSrc->mSourceType == MPP_SOURCE_LAYER) ? "Layer" : "Client Target"); usedBlockCount[bId]++; usedAXIPortCount[aId]++; @@ -578,10 +577,10 @@ int32_t ExynosResourceManagerModule::otfMppReordering(ExynosDisplay *display, String8 after; for (uint32_t i = 0; i < otfMPPs.size(); i++) { ExynosMPPModule *mpp = (ExynosMPPModule *)otfMPPs[i]; - after.appendFormat("(%s) -> ", mpp->mName.string()); + after.appendFormat("(%s) -> ", mpp->mName.c_str()); } - ALOGD("%s %p, %s", __func__, src.bufferHandle, after.string()); + ALOGD("%s %p, %s", __func__, src.bufferHandle, after.c_str()); } return 0; @@ -617,12 +616,12 @@ uint32_t ExynosResourceManagerModule::getAmounts(ExynosDisplay *display, if (currentBlockId == blockId && isOverlapped(display, curSrc, compSrc)) { String8 log; if (hwcCheckDebugMessages(eDebugTDM)) { - log.appendFormat("%s", compOtfMPP->mName.string()); + log.appendFormat("%s", compOtfMPP->mName.c_str()); } for (auto attr = HWAttrs.begin(); attr != HWAttrs.end(); attr++) { uint32_t compareAmount = compSrc->getHWResourceAmount(attr->first); if (hwcCheckDebugMessages(eDebugTDM)) { - log.appendFormat(", attr %s DPUF-%d(+ %d)", attr->second.name.string(), + log.appendFormat(", attr %s DPUF-%d(+ %d)", attr->second.name.c_str(), DPUFAmounts[attr->first], compareAmount); } DPUFAmounts[attr->first] += compareAmount; @@ -633,7 +632,7 @@ uint32_t ExynosResourceManagerModule::getAmounts(ExynosDisplay *display, AXIAmounts[attr->first] += compareAmount; } } - HDEBUGLOGD(eDebugTDM, "%s %s", __func__, log.string()); + HDEBUGLOGD(eDebugTDM, "%s %s", __func__, log.c_str()); } return 0; |