Loading include/gui/BufferQueue.h +1 −1 Original line number Diff line number Diff line Loading @@ -229,7 +229,7 @@ public: // dump our state in a String virtual void dump(String8& result) const; virtual void dump(String8& result, const char* prefix, char* buffer, size_t SIZE) const; virtual void dump(String8& result, const char* prefix) const; // public facing structure for BufferSlot struct BufferItem { Loading include/gui/ConsumerBase.h +2 −3 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ public: // 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, char* buffer, size_t SIZE) const; void dump(String8& result, const char* prefix) const; // setFrameAvailableListener sets the listener object that will be notified // when a new frame becomes available. Loading Loading @@ -143,8 +143,7 @@ protected: // should call ConsumerBase::dumpLocked. // // This method must be called with mMutex locked. virtual void dumpLocked(String8& result, const char* prefix, char* buffer, size_t size) const; virtual void dumpLocked(String8& result, const char* prefix) const; // acquireBufferLocked fetches the next buffer from the BufferQueue and // updates the buffer slot for the buffer returned. Loading include/gui/GLConsumer.h +1 −2 Original line number Diff line number Diff line Loading @@ -233,8 +233,7 @@ protected: // dumpLocked overrides the ConsumerBase method to dump GLConsumer- // specific info in addition to the ConsumerBase behavior. virtual void dumpLocked(String8& result, const char* prefix, char* buffer, size_t size) const; virtual void dumpLocked(String8& result, const char* prefix) const; // acquireBufferLocked overrides the ConsumerBase method to update the // mEglSlots array in addition to the ConsumerBase behavior. Loading libs/gui/BufferQueue.cpp +8 −17 Original line number Diff line number Diff line Loading @@ -707,36 +707,29 @@ status_t BufferQueue::disconnect(int api) { return err; } void BufferQueue::dump(String8& result) const { char buffer[1024]; BufferQueue::dump(result, "", buffer, 1024); void BufferQueue::dump(String8& result) const { BufferQueue::dump(result, ""); } void BufferQueue::dump(String8& result, const char* prefix, char* buffer, size_t SIZE) const { void BufferQueue::dump(String8& result, const char* prefix) const { Mutex::Autolock _l(mMutex); String8 fifo; int fifoSize = 0; Fifo::const_iterator i(mQueue.begin()); while (i != mQueue.end()) { snprintf(buffer, SIZE, "%02d ", *i++); fifo.appendFormat("%02d ", *i++); fifoSize++; fifo.append(buffer); } int maxBufferCount = getMaxBufferCountLocked(); snprintf(buffer, SIZE, result.appendFormat( "%s-BufferQueue maxBufferCount=%d, mSynchronousMode=%d, default-size=[%dx%d], " "default-format=%d, transform-hint=%02x, FIFO(%d)={%s}\n", prefix, maxBufferCount, mSynchronousMode, mDefaultWidth, mDefaultHeight, mDefaultBufferFormat, mTransformHint, fifoSize, fifo.string()); result.append(buffer); struct { const char * operator()(int state) const { Loading @@ -752,7 +745,7 @@ void BufferQueue::dump(String8& result, const char* prefix, for (int i=0 ; i<maxBufferCount ; i++) { const BufferSlot& slot(mSlots[i]); snprintf(buffer, SIZE, result.appendFormat( "%s%s[%02d] " "state=%-8s, crop=[%d,%d,%d,%d], " "xform=0x%02x, time=%#llx, scale=%s", Loading @@ -762,15 +755,13 @@ void BufferQueue::dump(String8& result, const char* prefix, slot.mCrop.bottom, slot.mTransform, slot.mTimestamp, scalingModeName(slot.mScalingMode) ); result.append(buffer); const sp<GraphicBuffer>& buf(slot.mGraphicBuffer); if (buf != NULL) { snprintf(buffer, SIZE, result.appendFormat( ", %p [%4ux%4u:%4u,%3X]", buf->handle, buf->width, buf->height, buf->stride, buf->format); result.append(buffer); } result.append("\n"); } Loading libs/gui/ConsumerBase.cpp +6 −10 Original line number Diff line number Diff line Loading @@ -165,23 +165,19 @@ void ConsumerBase::setFrameAvailableListener( } void ConsumerBase::dump(String8& result) const { char buffer[1024]; dump(result, "", buffer, 1024); dump(result, ""); } void ConsumerBase::dump(String8& result, const char* prefix, char* buffer, size_t size) const { void ConsumerBase::dump(String8& result, const char* prefix) const { Mutex::Autolock _l(mMutex); dumpLocked(result, prefix, buffer, size); dumpLocked(result, prefix); } void ConsumerBase::dumpLocked(String8& result, const char* prefix, char* buffer, size_t SIZE) const { snprintf(buffer, SIZE, "%smAbandoned=%d\n", prefix, int(mAbandoned)); result.append(buffer); void ConsumerBase::dumpLocked(String8& result, const char* prefix) const { result.appendFormat("%smAbandoned=%d\n", prefix, int(mAbandoned)); if (!mAbandoned) { mBufferQueue->dump(result, prefix, buffer, SIZE); mBufferQueue->dump(result, prefix); } } Loading Loading
include/gui/BufferQueue.h +1 −1 Original line number Diff line number Diff line Loading @@ -229,7 +229,7 @@ public: // dump our state in a String virtual void dump(String8& result) const; virtual void dump(String8& result, const char* prefix, char* buffer, size_t SIZE) const; virtual void dump(String8& result, const char* prefix) const; // public facing structure for BufferSlot struct BufferItem { Loading
include/gui/ConsumerBase.h +2 −3 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ public: // 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, char* buffer, size_t SIZE) const; void dump(String8& result, const char* prefix) const; // setFrameAvailableListener sets the listener object that will be notified // when a new frame becomes available. Loading Loading @@ -143,8 +143,7 @@ protected: // should call ConsumerBase::dumpLocked. // // This method must be called with mMutex locked. virtual void dumpLocked(String8& result, const char* prefix, char* buffer, size_t size) const; virtual void dumpLocked(String8& result, const char* prefix) const; // acquireBufferLocked fetches the next buffer from the BufferQueue and // updates the buffer slot for the buffer returned. Loading
include/gui/GLConsumer.h +1 −2 Original line number Diff line number Diff line Loading @@ -233,8 +233,7 @@ protected: // dumpLocked overrides the ConsumerBase method to dump GLConsumer- // specific info in addition to the ConsumerBase behavior. virtual void dumpLocked(String8& result, const char* prefix, char* buffer, size_t size) const; virtual void dumpLocked(String8& result, const char* prefix) const; // acquireBufferLocked overrides the ConsumerBase method to update the // mEglSlots array in addition to the ConsumerBase behavior. Loading
libs/gui/BufferQueue.cpp +8 −17 Original line number Diff line number Diff line Loading @@ -707,36 +707,29 @@ status_t BufferQueue::disconnect(int api) { return err; } void BufferQueue::dump(String8& result) const { char buffer[1024]; BufferQueue::dump(result, "", buffer, 1024); void BufferQueue::dump(String8& result) const { BufferQueue::dump(result, ""); } void BufferQueue::dump(String8& result, const char* prefix, char* buffer, size_t SIZE) const { void BufferQueue::dump(String8& result, const char* prefix) const { Mutex::Autolock _l(mMutex); String8 fifo; int fifoSize = 0; Fifo::const_iterator i(mQueue.begin()); while (i != mQueue.end()) { snprintf(buffer, SIZE, "%02d ", *i++); fifo.appendFormat("%02d ", *i++); fifoSize++; fifo.append(buffer); } int maxBufferCount = getMaxBufferCountLocked(); snprintf(buffer, SIZE, result.appendFormat( "%s-BufferQueue maxBufferCount=%d, mSynchronousMode=%d, default-size=[%dx%d], " "default-format=%d, transform-hint=%02x, FIFO(%d)={%s}\n", prefix, maxBufferCount, mSynchronousMode, mDefaultWidth, mDefaultHeight, mDefaultBufferFormat, mTransformHint, fifoSize, fifo.string()); result.append(buffer); struct { const char * operator()(int state) const { Loading @@ -752,7 +745,7 @@ void BufferQueue::dump(String8& result, const char* prefix, for (int i=0 ; i<maxBufferCount ; i++) { const BufferSlot& slot(mSlots[i]); snprintf(buffer, SIZE, result.appendFormat( "%s%s[%02d] " "state=%-8s, crop=[%d,%d,%d,%d], " "xform=0x%02x, time=%#llx, scale=%s", Loading @@ -762,15 +755,13 @@ void BufferQueue::dump(String8& result, const char* prefix, slot.mCrop.bottom, slot.mTransform, slot.mTimestamp, scalingModeName(slot.mScalingMode) ); result.append(buffer); const sp<GraphicBuffer>& buf(slot.mGraphicBuffer); if (buf != NULL) { snprintf(buffer, SIZE, result.appendFormat( ", %p [%4ux%4u:%4u,%3X]", buf->handle, buf->width, buf->height, buf->stride, buf->format); result.append(buffer); } result.append("\n"); } Loading
libs/gui/ConsumerBase.cpp +6 −10 Original line number Diff line number Diff line Loading @@ -165,23 +165,19 @@ void ConsumerBase::setFrameAvailableListener( } void ConsumerBase::dump(String8& result) const { char buffer[1024]; dump(result, "", buffer, 1024); dump(result, ""); } void ConsumerBase::dump(String8& result, const char* prefix, char* buffer, size_t size) const { void ConsumerBase::dump(String8& result, const char* prefix) const { Mutex::Autolock _l(mMutex); dumpLocked(result, prefix, buffer, size); dumpLocked(result, prefix); } void ConsumerBase::dumpLocked(String8& result, const char* prefix, char* buffer, size_t SIZE) const { snprintf(buffer, SIZE, "%smAbandoned=%d\n", prefix, int(mAbandoned)); result.append(buffer); void ConsumerBase::dumpLocked(String8& result, const char* prefix) const { result.appendFormat("%smAbandoned=%d\n", prefix, int(mAbandoned)); if (!mAbandoned) { mBufferQueue->dump(result, prefix, buffer, SIZE); mBufferQueue->dump(result, prefix); } } Loading