improve dumpsys SurfaceFlinger output

we now output the handle and size of all buffers of each layer.

Change-Id: I8d011ee4ae9199f4198bd07bed770ec3bcf02986
This commit is contained in:
Mathias Agopian 2011-08-08 16:02:13 -07:00
parent a13bd05567
commit ad795baecc
2 changed files with 9 additions and 4 deletions

View File

@ -965,10 +965,15 @@ void SurfaceTexture::dump(String8& result, const char* prefix,
for (int i=0 ; i<mBufferCount ; i++) { for (int i=0 ; i<mBufferCount ; i++) {
const BufferSlot& slot(mSlots[i]); const BufferSlot& slot(mSlots[i]);
const sp<GraphicBuffer>& buf(slot.mGraphicBuffer);
snprintf(buffer, SIZE, snprintf(buffer, SIZE,
"%s%s[%02d] state=%-8s, crop=[%d,%d,%d,%d], transform=0x%02x, " "%s%s[%02d] "
"timestamp=%lld\n", "%p [%4ux%4u:%4u,%3X] "
prefix, (i==mCurrentTexture)?">":" ", i, stateName(slot.mBufferState), "state=%-8s, crop=[%d,%d,%d,%d], "
"transform=0x%02x, timestamp=%lld\n",
prefix, (i==mCurrentTexture)?">":" ", i,
buf->handle, buf->width, buf->height, buf->stride, buf->format,
stateName(slot.mBufferState),
slot.mCrop.left, slot.mCrop.top, slot.mCrop.right, slot.mCrop.bottom, slot.mCrop.left, slot.mCrop.top, slot.mCrop.right, slot.mCrop.bottom,
slot.mTransform, slot.mTimestamp slot.mTransform, slot.mTimestamp
); );

View File

@ -533,7 +533,7 @@ void Layer::dump(String8& result, char* buffer, size_t SIZE) const
} }
snprintf(buffer, SIZE, snprintf(buffer, SIZE,
" " " "
"format=%2d, activeBuffer=[%3ux%3u:%3u,%3u]," "format=%2d, activeBuffer=[%4ux%4u:%4u,%3X],"
" freezeLock=%p, queued-frames=%d\n", " freezeLock=%p, queued-frames=%d\n",
mFormat, w0, h0, s0,f0, mFormat, w0, h0, s0,f0,
getFreezeLock().get(), mQueuedFrames); getFreezeLock().get(), mQueuedFrames);