diff options
author | Mathias Agopian <mathias@google.com> | 2011-09-20 15:13:14 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2011-09-20 17:53:33 -0700 |
commit | 880ac7a86501e72428b52228cc4b5003e866f5a9 (patch) | |
tree | 53eb85f9a2a97f14968558d0a1e1f568b04f8bf9 /services/surfaceflinger/DisplayHardware | |
parent | 4d3e3c353306e63044d30724d5d8e8df4c146550 (diff) | |
download | frameworks_base-880ac7a86501e72428b52228cc4b5003e866f5a9.zip frameworks_base-880ac7a86501e72428b52228cc4b5003e866f5a9.tar.gz frameworks_base-880ac7a86501e72428b52228cc4b5003e866f5a9.tar.bz2 |
improve hwc dumpsys
we now log the buffer's format
Change-Id: I9d3ad8018e884240a153de3baefb6331cb014d0f
Diffstat (limited to 'services/surfaceflinger/DisplayHardware')
-rw-r--r-- | services/surfaceflinger/DisplayHardware/HWComposer.cpp | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.cpp b/services/surfaceflinger/DisplayHardware/HWComposer.cpp index c9567d5..daefd5e 100644 --- a/services/surfaceflinger/DisplayHardware/HWComposer.cpp +++ b/services/surfaceflinger/DisplayHardware/HWComposer.cpp @@ -143,18 +143,29 @@ void HWComposer::dump(String8& result, char* buffer, size_t SIZE, snprintf(buffer, SIZE, " numHwLayers=%u, flags=%08x\n", mList->numHwLayers, mList->flags); result.append(buffer); - + result.append( + " type | hints | flags | tr | blend | format | source rectangle | crop rectangle name \n" + "-----------+----------+----------+----+-------+----------+---------------------------+--------------------------------\n"); + // " ________ | ________ | ________ | __ | _____ | ________ | [_____,_____,_____,_____] | [_____,_____,_____,_____] for (size_t i=0 ; i<mList->numHwLayers ; i++) { const hwc_layer_t& l(mList->hwLayers[i]); - snprintf(buffer, SIZE, " %8s | %08x | %08x | %02x | %04x | [%5d,%5d,%5d,%5d] | [%5d,%5d,%5d,%5d] %s\n", + const sp<LayerBase> layer(visibleLayersSortedByZ[i]); + int32_t format = -1; + if (layer->getLayer() != NULL) { + const sp<GraphicBuffer>& buffer(layer->getLayer()->getActiveBuffer()); + if (buffer != NULL) { + format = buffer->getPixelFormat(); + } + } + snprintf(buffer, SIZE, + " %8s | %08x | %08x | %02x | %05x | %08x | [%5d,%5d,%5d,%5d] | [%5d,%5d,%5d,%5d] %s\n", l.compositionType ? "OVERLAY" : "FB", - l.hints, l.flags, l.transform, l.blending, + l.hints, l.flags, l.transform, l.blending, format, l.sourceCrop.left, l.sourceCrop.top, l.sourceCrop.right, l.sourceCrop.bottom, l.displayFrame.left, l.displayFrame.top, l.displayFrame.right, l.displayFrame.bottom, - visibleLayersSortedByZ[i]->getName().string()); + layer->getName().string()); result.append(buffer); } - } if (mHwc && mHwc->common.version >= 1 && mHwc->dump) { mHwc->dump(mHwc, buffer, SIZE); |