diff options
| author | 2023-08-18 16:37:49 +0000 | |
|---|---|---|
| committer | 2023-08-18 16:37:49 +0000 | |
| commit | cdbed9933e9b64e07a70d249477155993ec2efdc (patch) | |
| tree | 04d7d5cfbf37e7c7b55f7e21524cd82a9921d120 /libs/gui/BufferQueueProducer.cpp | |
| parent | d08df42298ee136bad678bfb8c4a1e098505aea9 (diff) | |
| parent | 1bcbf26f6c31294962930216798720c389af2561 (diff) | |
Merge "Use String8/16 c_str [graphics]" into udc-dev-plus-aosp am: 1bcbf26f6c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/24470494
Change-Id: Iaa006d3afad8f2b0c4c238bea574e09ef5f8650b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'libs/gui/BufferQueueProducer.cpp')
| -rw-r--r-- | libs/gui/BufferQueueProducer.cpp | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/libs/gui/BufferQueueProducer.cpp b/libs/gui/BufferQueueProducer.cpp index b872541fec..10f5899b68 100644 --- a/libs/gui/BufferQueueProducer.cpp +++ b/libs/gui/BufferQueueProducer.cpp @@ -47,23 +47,23 @@ namespace android { // Macros for include BufferQueueCore information in log messages #define BQ_LOGV(x, ...) \ - ALOGV("[%s](id:%" PRIx64 ",api:%d,p:%d,c:%" PRIu64 ") " x, mConsumerName.string(), \ + ALOGV("[%s](id:%" PRIx64 ",api:%d,p:%d,c:%" PRIu64 ") " x, mConsumerName.c_str(), \ mCore->mUniqueId, mCore->mConnectedApi, mCore->mConnectedPid, (mCore->mUniqueId) >> 32, \ ##__VA_ARGS__) #define BQ_LOGD(x, ...) \ - ALOGD("[%s](id:%" PRIx64 ",api:%d,p:%d,c:%" PRIu64 ") " x, mConsumerName.string(), \ + ALOGD("[%s](id:%" PRIx64 ",api:%d,p:%d,c:%" PRIu64 ") " x, mConsumerName.c_str(), \ mCore->mUniqueId, mCore->mConnectedApi, mCore->mConnectedPid, (mCore->mUniqueId) >> 32, \ ##__VA_ARGS__) #define BQ_LOGI(x, ...) \ - ALOGI("[%s](id:%" PRIx64 ",api:%d,p:%d,c:%" PRIu64 ") " x, mConsumerName.string(), \ + ALOGI("[%s](id:%" PRIx64 ",api:%d,p:%d,c:%" PRIu64 ") " x, mConsumerName.c_str(), \ mCore->mUniqueId, mCore->mConnectedApi, mCore->mConnectedPid, (mCore->mUniqueId) >> 32, \ ##__VA_ARGS__) #define BQ_LOGW(x, ...) \ - ALOGW("[%s](id:%" PRIx64 ",api:%d,p:%d,c:%" PRIu64 ") " x, mConsumerName.string(), \ + ALOGW("[%s](id:%" PRIx64 ",api:%d,p:%d,c:%" PRIu64 ") " x, mConsumerName.c_str(), \ mCore->mUniqueId, mCore->mConnectedApi, mCore->mConnectedPid, (mCore->mUniqueId) >> 32, \ ##__VA_ARGS__) #define BQ_LOGE(x, ...) \ - ALOGE("[%s](id:%" PRIx64 ",api:%d,p:%d,c:%" PRIu64 ") " x, mConsumerName.string(), \ + ALOGE("[%s](id:%" PRIx64 ",api:%d,p:%d,c:%" PRIu64 ") " x, mConsumerName.c_str(), \ mCore->mUniqueId, mCore->mConnectedApi, mCore->mConnectedPid, (mCore->mUniqueId) >> 32, \ ##__VA_ARGS__) @@ -573,9 +573,9 @@ status_t BufferQueueProducer::dequeueBuffer(int* outSlot, sp<android::Fence>* ou if (returnFlags & BUFFER_NEEDS_REALLOCATION) { BQ_LOGV("dequeueBuffer: allocating a new buffer for slot %d", *outSlot); - sp<GraphicBuffer> graphicBuffer = new GraphicBuffer( - width, height, format, BQ_LAYER_COUNT, usage, - {mConsumerName.string(), mConsumerName.size()}); + sp<GraphicBuffer> graphicBuffer = + new GraphicBuffer(width, height, format, BQ_LAYER_COUNT, usage, + {mConsumerName.c_str(), mConsumerName.size()}); status_t error = graphicBuffer->initCheck(); @@ -1046,8 +1046,7 @@ status_t BufferQueueProducer::queueBuffer(int slot, output->numPendingBuffers = static_cast<uint32_t>(mCore->mQueue.size()); output->nextFrameNumber = mCore->mFrameCounter + 1; - ATRACE_INT(mCore->mConsumerName.string(), - static_cast<int32_t>(mCore->mQueue.size())); + ATRACE_INT(mCore->mConsumerName.c_str(), static_cast<int32_t>(mCore->mQueue.size())); #ifndef NO_BINDER mCore->mOccupancyTracker.registerOccupancyChange(mCore->mQueue.size()); #endif @@ -1487,7 +1486,7 @@ void BufferQueueProducer::allocateBuffers(uint32_t width, uint32_t height, allocFormat = format != 0 ? format : mCore->mDefaultBufferFormat; allocUsage = usage | mCore->mConsumerUsageBits; - allocName.assign(mCore->mConsumerName.string(), mCore->mConsumerName.size()); + allocName.assign(mCore->mConsumerName.c_str(), mCore->mConsumerName.size()); mCore->mIsAllocating = true; } // Autolock scope @@ -1589,7 +1588,7 @@ status_t BufferQueueProducer::setGenerationNumber(uint32_t generationNumber) { String8 BufferQueueProducer::getConsumerName() const { ATRACE_CALL(); std::lock_guard<std::mutex> lock(mCore->mMutex); - BQ_LOGV("getConsumerName: %s", mConsumerName.string()); + BQ_LOGV("getConsumerName: %s", mConsumerName.c_str()); return mConsumerName; } |