From e77c7669bee30b7c0099172cf0c38cef92412040 Mon Sep 17 00:00:00 2001 From: Dan Stoza Date: Fri, 13 May 2016 11:37:28 -0700 Subject: BufferQueue/SF: Add OccupancyTracker Adds an OccupancyTracker to BufferQueue. This module keeps track of how many buffers are in the queue over time, which, in combination with various aggregation of these statistics, allows SurfaceFlinger to report what fraction of the time a given layer was double- or triple-buffered. Change-Id: Ida6e967dc5483c00a633e9fe03998e420dd88502 --- libs/gui/BufferQueueConsumer.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libs/gui/BufferQueueConsumer.cpp') diff --git a/libs/gui/BufferQueueConsumer.cpp b/libs/gui/BufferQueueConsumer.cpp index cbc88932ac..e8860d12fe 100644 --- a/libs/gui/BufferQueueConsumer.cpp +++ b/libs/gui/BufferQueueConsumer.cpp @@ -260,6 +260,7 @@ status_t BufferQueueConsumer::acquireBuffer(BufferItem* outBuffer, mCore->mDequeueCondition.broadcast(); ATRACE_INT(mCore->mConsumerName.string(), mCore->mQueue.size()); + mCore->mOccupancyTracker.registerOccupancyChange(mCore->mQueue.size()); VALIDATE_CONSISTENCY(); } @@ -717,6 +718,13 @@ sp BufferQueueConsumer::getSidebandStream() const { return mCore->mSidebandStream; } +status_t BufferQueueConsumer::getOccupancyHistory(bool forceFlush, + std::vector* outHistory) { + Mutex::Autolock lock(mCore->mMutex); + *outHistory = mCore->mOccupancyTracker.getSegmentHistory(forceFlush); + return NO_ERROR; +} + void BufferQueueConsumer::dump(String8& result, const char* prefix) const { const IPCThreadState* ipc = IPCThreadState::self(); const pid_t pid = ipc->getCallingPid(); -- cgit v1.2.3-59-g8ed1b From bc2df65a3f3f4b8abaaaa2a4e576a3a42c2d30f3 Mon Sep 17 00:00:00 2001 From: Eino-Ville Talvala Date: Thu, 21 Jul 2016 17:06:58 -0700 Subject: BufferQueue consumers: Add discardFreeBuffer method This method releases all free buffers owned by the buffer queue, in order to save memory (at the cost of potential future reallocation of buffers). Bug: 28695173 Change-Id: I458d10373e639e3144faf673af2ba01aca36e65a --- include/gui/BufferQueueConsumer.h | 3 ++ include/gui/BufferQueueCore.h | 5 +++ include/gui/ConsumerBase.h | 3 ++ include/gui/IGraphicBufferConsumer.h | 5 +++ libs/gui/BufferQueueConsumer.cpp | 6 +++ libs/gui/BufferQueueCore.cpp | 10 +++++ libs/gui/ConsumerBase.cpp | 9 +++++ libs/gui/IGraphicBufferConsumer.cpp | 22 +++++++++++ libs/gui/tests/BufferQueue_test.cpp | 77 ++++++++++++++++++++++++++++++++++++ 9 files changed, 140 insertions(+) (limited to 'libs/gui/BufferQueueConsumer.cpp') diff --git a/include/gui/BufferQueueConsumer.h b/include/gui/BufferQueueConsumer.h index a9fce1ab5d..8ec0546c7e 100644 --- a/include/gui/BufferQueueConsumer.h +++ b/include/gui/BufferQueueConsumer.h @@ -140,6 +140,9 @@ public: virtual status_t getOccupancyHistory(bool forceFlush, std::vector* outHistory) override; + // See IGraphicBufferConsumer::discardFreeBuffers + virtual status_t discardFreeBuffers() override; + // dump our state in a String virtual void dump(String8& result, const char* prefix) const; diff --git a/include/gui/BufferQueueCore.h b/include/gui/BufferQueueCore.h index 98add9e71f..82bc121af3 100644 --- a/include/gui/BufferQueueCore.h +++ b/include/gui/BufferQueueCore.h @@ -125,6 +125,11 @@ private: // all slots, even if they're currently dequeued, queued, or acquired. void freeAllBuffersLocked(); + // discardFreeBuffersLocked releases all currently-free buffers held by the + // queue, in order to reduce the memory consumption of the queue to the + // minimum possible without discarding data. + void discardFreeBuffersLocked(); + // If delta is positive, makes more slots available. If negative, takes // away slots. Returns false if the request can't be met. bool adjustAvailableSlotsLocked(int delta); diff --git a/include/gui/ConsumerBase.h b/include/gui/ConsumerBase.h index d1f4cdd7d0..0490c3cc5b 100644 --- a/include/gui/ConsumerBase.h +++ b/include/gui/ConsumerBase.h @@ -89,6 +89,9 @@ public: status_t getOccupancyHistory(bool forceFlush, std::vector* outHistory); + // See IGraphicBufferConsumer::discardFreeBuffers + status_t discardFreeBuffers(); + private: ConsumerBase(const ConsumerBase&); void operator=(const ConsumerBase&); diff --git a/include/gui/IGraphicBufferConsumer.h b/include/gui/IGraphicBufferConsumer.h index 4915478837..3b10d78b58 100644 --- a/include/gui/IGraphicBufferConsumer.h +++ b/include/gui/IGraphicBufferConsumer.h @@ -272,6 +272,11 @@ public: virtual status_t getOccupancyHistory(bool forceFlush, std::vector* outHistory) = 0; + // discardFreeBuffers releases all currently-free buffers held by the queue, + // in order to reduce the memory consumption of the queue to the minimum + // possible without discarding data. + virtual status_t discardFreeBuffers() = 0; + // dump state into a string virtual void dump(String8& result, const char* prefix) const = 0; diff --git a/libs/gui/BufferQueueConsumer.cpp b/libs/gui/BufferQueueConsumer.cpp index e8860d12fe..ca2a374e16 100644 --- a/libs/gui/BufferQueueConsumer.cpp +++ b/libs/gui/BufferQueueConsumer.cpp @@ -725,6 +725,12 @@ status_t BufferQueueConsumer::getOccupancyHistory(bool forceFlush, return NO_ERROR; } +status_t BufferQueueConsumer::discardFreeBuffers() { + Mutex::Autolock lock(mCore->mMutex); + mCore->discardFreeBuffersLocked(); + return NO_ERROR; +} + void BufferQueueConsumer::dump(String8& result, const char* prefix) const { const IPCThreadState* ipc = IPCThreadState::self(); const pid_t pid = ipc->getCallingPid(); diff --git a/libs/gui/BufferQueueCore.cpp b/libs/gui/BufferQueueCore.cpp index 569b8f9d06..9cb9c62401 100644 --- a/libs/gui/BufferQueueCore.cpp +++ b/libs/gui/BufferQueueCore.cpp @@ -244,6 +244,16 @@ void BufferQueueCore::freeAllBuffersLocked() { VALIDATE_CONSISTENCY(); } +void BufferQueueCore::discardFreeBuffersLocked() { + for (int s : mFreeBuffers) { + mFreeSlots.insert(s); + clearBufferSlotLocked(s); + } + mFreeBuffers.clear(); + + VALIDATE_CONSISTENCY(); +} + bool BufferQueueCore::adjustAvailableSlotsLocked(int delta) { if (delta >= 0) { // If we're going to fail, do so before modifying anything diff --git a/libs/gui/ConsumerBase.cpp b/libs/gui/ConsumerBase.cpp index 84965ef6da..a1bdf4a4a1 100644 --- a/libs/gui/ConsumerBase.cpp +++ b/libs/gui/ConsumerBase.cpp @@ -245,6 +245,15 @@ status_t ConsumerBase::getOccupancyHistory(bool forceFlush, return mConsumer->getOccupancyHistory(forceFlush, outHistory); } +status_t ConsumerBase::discardFreeBuffers() { + Mutex::Autolock _l(mMutex); + if (mAbandoned) { + CB_LOGE("discardFreeBuffers: ConsumerBase is abandoned!"); + return NO_INIT; + } + return mConsumer->discardFreeBuffers(); +} + void ConsumerBase::dump(String8& result) const { dump(result, ""); } diff --git a/libs/gui/IGraphicBufferConsumer.cpp b/libs/gui/IGraphicBufferConsumer.cpp index 7c4379f41e..c8eff00e3f 100644 --- a/libs/gui/IGraphicBufferConsumer.cpp +++ b/libs/gui/IGraphicBufferConsumer.cpp @@ -52,6 +52,7 @@ enum { SET_TRANSFORM_HINT, GET_SIDEBAND_STREAM, GET_OCCUPANCY_HISTORY, + DISCARD_FREE_BUFFERS, DUMP, }; @@ -286,6 +287,21 @@ public: return result; } + virtual status_t discardFreeBuffers() { + Parcel data, reply; + data.writeInterfaceToken(IGraphicBufferConsumer::getInterfaceDescriptor()); + status_t error = remote()->transact(DISCARD_FREE_BUFFERS, data, &reply); + if (error != NO_ERROR) { + return error; + } + int32_t result = NO_ERROR; + error = reply.readInt32(&result); + if (error != NO_ERROR) { + return error; + } + return result; + } + virtual void dump(String8& result, const char* prefix) const { Parcel data, reply; data.writeInterfaceToken(IGraphicBufferConsumer::getInterfaceDescriptor()); @@ -454,6 +470,12 @@ status_t BnGraphicBufferConsumer::onTransact( } return NO_ERROR; } + case DISCARD_FREE_BUFFERS: { + CHECK_INTERFACE(IGraphicBufferConsumer, data, reply); + status_t result = discardFreeBuffers(); + status_t error = reply->writeInt32(result); + return error; + } case DUMP: { CHECK_INTERFACE(IGraphicBufferConsumer, data, reply); String8 result = data.readString8(); diff --git a/libs/gui/tests/BufferQueue_test.cpp b/libs/gui/tests/BufferQueue_test.cpp index 210ce8c18e..8a9eeeec21 100644 --- a/libs/gui/tests/BufferQueue_test.cpp +++ b/libs/gui/tests/BufferQueue_test.cpp @@ -990,4 +990,81 @@ TEST_F(BufferQueueTest, TestOccupancyHistory) { ASSERT_EQ(true, thirdSegment.usedThirdBuffer); } +TEST_F(BufferQueueTest, TestDiscardFreeBuffers) { + createBufferQueue(); + sp dc(new DummyConsumer); + ASSERT_EQ(OK, mConsumer->consumerConnect(dc, false)); + IGraphicBufferProducer::QueueBufferOutput output; + ASSERT_EQ(OK, mProducer->connect(new DummyProducerListener, + NATIVE_WINDOW_API_CPU, false, &output)); + + int slot = BufferQueue::INVALID_BUFFER_SLOT; + sp fence = Fence::NO_FENCE; + sp buffer = nullptr; + IGraphicBufferProducer::QueueBufferInput input(0ull, true, + HAL_DATASPACE_UNKNOWN, Rect::INVALID_RECT, + NATIVE_WINDOW_SCALING_MODE_FREEZE, 0, Fence::NO_FENCE); + BufferItem item{}; + + // Preallocate, dequeue, request, and cancel 4 buffers so we don't get + // BUFFER_NEEDS_REALLOCATION below + int slots[4] = {}; + mProducer->setMaxDequeuedBufferCount(4); + for (size_t i = 0; i < 4; ++i) { + status_t result = mProducer->dequeueBuffer(&slots[i], &fence, + 0, 0, 0, 0); + ASSERT_EQ(IGraphicBufferProducer::BUFFER_NEEDS_REALLOCATION, result); + ASSERT_EQ(OK, mProducer->requestBuffer(slots[i], &buffer)); + } + for (size_t i = 0; i < 4; ++i) { + ASSERT_EQ(OK, mProducer->cancelBuffer(slots[i], Fence::NO_FENCE)); + } + + // Get buffers in all states: dequeued, filled, acquired, free + + // Fill 3 buffers + ASSERT_EQ(OK, mProducer->dequeueBuffer(&slot, &fence, 0, 0, 0, 0)); + ASSERT_EQ(OK, mProducer->queueBuffer(slot, input, &output)); + ASSERT_EQ(OK, mProducer->dequeueBuffer(&slot, &fence, 0, 0, 0, 0)); + ASSERT_EQ(OK, mProducer->queueBuffer(slot, input, &output)); + ASSERT_EQ(OK, mProducer->dequeueBuffer(&slot, &fence, 0, 0, 0, 0)); + ASSERT_EQ(OK, mProducer->queueBuffer(slot, input, &output)); + // Dequeue 1 buffer + ASSERT_EQ(OK, mProducer->dequeueBuffer(&slot, &fence, 0, 0, 0, 0)); + + // Acquire and free 1 buffer + ASSERT_EQ(OK, mConsumer->acquireBuffer(&item, 0)); + ASSERT_EQ(OK, mConsumer->releaseBuffer(item.mSlot, item.mFrameNumber, + EGL_NO_DISPLAY, EGL_NO_SYNC_KHR, Fence::NO_FENCE)); + // Acquire 1 buffer, leaving 1 filled buffer in queue + ASSERT_EQ(OK, mConsumer->acquireBuffer(&item, 0)); + + // Now discard the free buffers + ASSERT_EQ(OK, mConsumer->discardFreeBuffers()); + + // Check no free buffers in dump + String8 dumpString; + mConsumer->dump(dumpString, nullptr); + + // Parse the dump to ensure that all buffer slots that are FREE also + // have a null GraphicBuffer + // Fragile - assumes the following format for the dump for a buffer entry: + // ":%p\][^:]*state=FREE" where %p is the buffer pointer in hex. + ssize_t idx = dumpString.find("state=FREE"); + while (idx != -1) { + ssize_t bufferPtrIdx = idx - 1; + while (bufferPtrIdx > 0) { + if (dumpString[bufferPtrIdx] == ':') { + bufferPtrIdx++; + break; + } + bufferPtrIdx--; + } + ASSERT_GT(bufferPtrIdx, 0) << "Can't parse queue dump to validate"; + ssize_t nullPtrIdx = dumpString.find("0x0]", bufferPtrIdx); + ASSERT_EQ(bufferPtrIdx, nullPtrIdx) << "Free buffer not discarded"; + idx = dumpString.find("FREE", idx + 1); + } +} + } // namespace android -- cgit v1.2.3-59-g8ed1b From 6e7e2b44efa6427cc106b20cea76d9a80dadcac9 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 27 Sep 2016 14:08:19 -0700 Subject: Fix logging implicit sign conversions The warnings were being hidden by the use of -isystem to include frameworks/native/include. Bug: 31752268 Test: m -j Change-Id: I2ce11db524ee9d8f846fdf3ed6fb882d5ef57956 (cherry picked from commit 152c3b749a8ec634afc66dddef7d33130472aeb1) --- libs/gui/BufferQueueConsumer.cpp | 6 ++++-- libs/gui/BufferQueueProducer.cpp | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'libs/gui/BufferQueueConsumer.cpp') diff --git a/libs/gui/BufferQueueConsumer.cpp b/libs/gui/BufferQueueConsumer.cpp index ca2a374e16..fc53dbdc95 100644 --- a/libs/gui/BufferQueueConsumer.cpp +++ b/libs/gui/BufferQueueConsumer.cpp @@ -259,7 +259,8 @@ status_t BufferQueueConsumer::acquireBuffer(BufferItem* outBuffer, // decrease. mCore->mDequeueCondition.broadcast(); - ATRACE_INT(mCore->mConsumerName.string(), mCore->mQueue.size()); + ATRACE_INT(mCore->mConsumerName.string(), + static_cast(mCore->mQueue.size())); mCore->mOccupancyTracker.registerOccupancyChange(mCore->mQueue.size()); VALIDATE_CONSISTENCY(); @@ -740,7 +741,8 @@ void BufferQueueConsumer::dump(String8& result, const char* prefix) const { "android.permission.DUMP"), pid, uid)) { result.appendFormat("Permission Denial: can't dump BufferQueueConsumer " "from pid=%d, uid=%d\n", pid, uid); - android_errorWriteWithInfoLog(0x534e4554, "27046057", uid, NULL, 0); + android_errorWriteWithInfoLog(0x534e4554, "27046057", + static_cast(uid), NULL, 0); } else { mCore->dump(result, prefix); } diff --git a/libs/gui/BufferQueueProducer.cpp b/libs/gui/BufferQueueProducer.cpp index 48b1db8f59..da60784591 100644 --- a/libs/gui/BufferQueueProducer.cpp +++ b/libs/gui/BufferQueueProducer.cpp @@ -905,7 +905,8 @@ status_t BufferQueueProducer::queueBuffer(int slot, static_cast(mCore->mQueue.size()), mCore->mFrameCounter + 1); - ATRACE_INT(mCore->mConsumerName.string(), mCore->mQueue.size()); + ATRACE_INT(mCore->mConsumerName.string(), + static_cast(mCore->mQueue.size())); mCore->mOccupancyTracker.registerOccupancyChange(mCore->mQueue.size()); // Take a ticket for the callback functions -- cgit v1.2.3-59-g8ed1b From dc782511dcaf46c7fa7488391cc27f0d0be354b0 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 26 Sep 2016 18:10:16 -0700 Subject: Rename dump methods to dumpState The dump methods shadow the IBinder dump method. The warnings were being hidden by the use of -isystem to include frameworks/native/include. Bug: 31752268 Test: m -j Change-Id: Iafc64da43032d5d9d84b64640e70d93fd7051bcf (cherry picked from commit 3d1d280fa3cbc30700f728a4b13e5308315433d3) --- include/gui/BufferQueueConsumer.h | 2 +- include/gui/BufferQueueCore.h | 2 +- include/gui/ConsumerBase.h | 6 +++--- include/gui/IGraphicBufferConsumer.h | 2 +- libs/gui/BufferQueueConsumer.cpp | 4 ++-- libs/gui/BufferQueueCore.cpp | 2 +- libs/gui/ConsumerBase.cpp | 8 ++++---- libs/gui/IGraphicBufferConsumer.cpp | 4 ++-- libs/gui/tests/BufferQueue_test.cpp | 2 +- services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp | 2 +- services/surfaceflinger/Layer.cpp | 2 +- 11 files changed, 18 insertions(+), 18 deletions(-) (limited to 'libs/gui/BufferQueueConsumer.cpp') diff --git a/include/gui/BufferQueueConsumer.h b/include/gui/BufferQueueConsumer.h index 8ec0546c7e..e2bafec4a9 100644 --- a/include/gui/BufferQueueConsumer.h +++ b/include/gui/BufferQueueConsumer.h @@ -144,7 +144,7 @@ public: virtual status_t discardFreeBuffers() override; // dump our state in a String - virtual void dump(String8& result, const char* prefix) const; + virtual void dumpState(String8& result, const char* prefix) const; // Functions required for backwards compatibility. // These will be modified/renamed in IGraphicBufferConsumer and will be diff --git a/include/gui/BufferQueueCore.h b/include/gui/BufferQueueCore.h index 3792441038..d35b22a9b9 100644 --- a/include/gui/BufferQueueCore.h +++ b/include/gui/BufferQueueCore.h @@ -86,7 +86,7 @@ public: private: // Dump our state in a string - void dump(String8& result, const char* prefix) const; + void dumpState(String8& result, const char* prefix) const; // getMinUndequeuedBufferCountLocked returns the minimum number of buffers // that must remain in a state other than DEQUEUED. The async parameter diff --git a/include/gui/ConsumerBase.h b/include/gui/ConsumerBase.h index de61662fe0..9f8b638a3a 100644 --- a/include/gui/ConsumerBase.h +++ b/include/gui/ConsumerBase.h @@ -63,11 +63,11 @@ public: // log messages. void setName(const String8& name); - // dump writes the current state to a string. Child classes should add + // dumpState writes the current state to a string. Child classes should add // their state to the dump by overriding the dumpLocked method, which is // called by these methods after locking the mutex. - void dump(String8& result) const; - void dump(String8& result, const char* prefix) const; + void dumpState(String8& result) const; + void dumpState(String8& result, const char* prefix) const; // setFrameAvailableListener sets the listener object that will be notified // when a new frame becomes available. diff --git a/include/gui/IGraphicBufferConsumer.h b/include/gui/IGraphicBufferConsumer.h index 08ca39dd3e..dcddca46e8 100644 --- a/include/gui/IGraphicBufferConsumer.h +++ b/include/gui/IGraphicBufferConsumer.h @@ -278,7 +278,7 @@ public: virtual status_t discardFreeBuffers() = 0; // dump state into a string - virtual void dump(String8& result, const char* prefix) const = 0; + virtual void dumpState(String8& result, const char* prefix) const = 0; public: DECLARE_META_INTERFACE(GraphicBufferConsumer) diff --git a/libs/gui/BufferQueueConsumer.cpp b/libs/gui/BufferQueueConsumer.cpp index fc53dbdc95..7fbf312727 100644 --- a/libs/gui/BufferQueueConsumer.cpp +++ b/libs/gui/BufferQueueConsumer.cpp @@ -732,7 +732,7 @@ status_t BufferQueueConsumer::discardFreeBuffers() { return NO_ERROR; } -void BufferQueueConsumer::dump(String8& result, const char* prefix) const { +void BufferQueueConsumer::dumpState(String8& result, const char* prefix) const { const IPCThreadState* ipc = IPCThreadState::self(); const pid_t pid = ipc->getCallingPid(); const uid_t uid = ipc->getCallingUid(); @@ -744,7 +744,7 @@ void BufferQueueConsumer::dump(String8& result, const char* prefix) const { android_errorWriteWithInfoLog(0x534e4554, "27046057", static_cast(uid), NULL, 0); } else { - mCore->dump(result, prefix); + mCore->dumpState(result, prefix); } } diff --git a/libs/gui/BufferQueueCore.cpp b/libs/gui/BufferQueueCore.cpp index 336783092e..dccc4a93d5 100644 --- a/libs/gui/BufferQueueCore.cpp +++ b/libs/gui/BufferQueueCore.cpp @@ -130,7 +130,7 @@ BufferQueueCore::BufferQueueCore(const sp& allocator) : BufferQueueCore::~BufferQueueCore() {} -void BufferQueueCore::dump(String8& result, const char* prefix) const { +void BufferQueueCore::dumpState(String8& result, const char* prefix) const { Mutex::Autolock lock(mMutex); String8 fifo; diff --git a/libs/gui/ConsumerBase.cpp b/libs/gui/ConsumerBase.cpp index a1bdf4a4a1..805a10d1b6 100644 --- a/libs/gui/ConsumerBase.cpp +++ b/libs/gui/ConsumerBase.cpp @@ -254,11 +254,11 @@ status_t ConsumerBase::discardFreeBuffers() { return mConsumer->discardFreeBuffers(); } -void ConsumerBase::dump(String8& result) const { - dump(result, ""); +void ConsumerBase::dumpState(String8& result) const { + dumpState(result, ""); } -void ConsumerBase::dump(String8& result, const char* prefix) const { +void ConsumerBase::dumpState(String8& result, const char* prefix) const { Mutex::Autolock _l(mMutex); dumpLocked(result, prefix); } @@ -267,7 +267,7 @@ void ConsumerBase::dumpLocked(String8& result, const char* prefix) const { result.appendFormat("%smAbandoned=%d\n", prefix, int(mAbandoned)); if (!mAbandoned) { - mConsumer->dump(result, prefix); + mConsumer->dumpState(result, prefix); } } diff --git a/libs/gui/IGraphicBufferConsumer.cpp b/libs/gui/IGraphicBufferConsumer.cpp index e39ff6e74e..240146455e 100644 --- a/libs/gui/IGraphicBufferConsumer.cpp +++ b/libs/gui/IGraphicBufferConsumer.cpp @@ -302,7 +302,7 @@ public: return result; } - virtual void dump(String8& result, const char* prefix) const { + virtual void dumpState(String8& result, const char* prefix) const { Parcel data, reply; data.writeInterfaceToken(IGraphicBufferConsumer::getInterfaceDescriptor()); data.writeString8(result); @@ -480,7 +480,7 @@ status_t BnGraphicBufferConsumer::onTransact( CHECK_INTERFACE(IGraphicBufferConsumer, data, reply); String8 result = data.readString8(); String8 prefix = data.readString8(); - static_cast(this)->dump(result, prefix); + static_cast(this)->dumpState(result, prefix); reply->writeString8(result); return NO_ERROR; } diff --git a/libs/gui/tests/BufferQueue_test.cpp b/libs/gui/tests/BufferQueue_test.cpp index 8a9eeeec21..65df7dc991 100644 --- a/libs/gui/tests/BufferQueue_test.cpp +++ b/libs/gui/tests/BufferQueue_test.cpp @@ -1044,7 +1044,7 @@ TEST_F(BufferQueueTest, TestDiscardFreeBuffers) { // Check no free buffers in dump String8 dumpString; - mConsumer->dump(dumpString, nullptr); + mConsumer->dumpState(dumpString, nullptr); // Parse the dump to ensure that all buffer slots that are FREE also // have a null GraphicBuffer diff --git a/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp b/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp index 7368d775ad..18c7945577 100644 --- a/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp +++ b/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp @@ -240,7 +240,7 @@ status_t FramebufferSurface::compositionComplete() #endif void FramebufferSurface::dumpAsString(String8& result) const { - ConsumerBase::dump(result); + ConsumerBase::dumpState(result); } void FramebufferSurface::dumpLocked(String8& result, const char* prefix) const diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index 6649d5a331..d13b6dbe19 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -2235,7 +2235,7 @@ void Layer::dump(String8& result, Colorizer& colorizer) const mQueuedFrames, mRefreshPending); if (mSurfaceFlingerConsumer != 0) { - mSurfaceFlingerConsumer->dump(result, " "); + mSurfaceFlingerConsumer->dumpState(result, " "); } } -- cgit v1.2.3-59-g8ed1b