diff options
author | Mathias Agopian <mathias@google.com> | 2011-09-09 00:49:11 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2011-09-09 00:49:44 -0700 |
commit | 5bd1b2794b227e25fbd7e4c919bcefc3510e0761 (patch) | |
tree | 126c836c07209df2d44cb3db4b596841a0064fe1 /services/surfaceflinger | |
parent | 4bacc9dc674792c745f362962883a19f4a35c88c (diff) | |
download | frameworks_base-5bd1b2794b227e25fbd7e4c919bcefc3510e0761.zip frameworks_base-5bd1b2794b227e25fbd7e4c919bcefc3510e0761.tar.gz frameworks_base-5bd1b2794b227e25fbd7e4c919bcefc3510e0761.tar.bz2 |
Improve SF dumpsys output wrt HWC
Change-Id: Ibdb7930fa3b521bfd3f44750ed98cfd75f9a01fe
Diffstat (limited to 'services/surfaceflinger')
-rw-r--r-- | services/surfaceflinger/DisplayHardware/HWComposer.cpp | 10 | ||||
-rw-r--r-- | services/surfaceflinger/DisplayHardware/HWComposer.h | 5 | ||||
-rw-r--r-- | services/surfaceflinger/LayerBase.cpp | 7 | ||||
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 2 |
4 files changed, 15 insertions, 9 deletions
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.cpp b/services/surfaceflinger/DisplayHardware/HWComposer.cpp index 0ff1cce..c9567d5 100644 --- a/services/surfaceflinger/DisplayHardware/HWComposer.cpp +++ b/services/surfaceflinger/DisplayHardware/HWComposer.cpp @@ -22,6 +22,7 @@ #include <utils/Errors.h> #include <utils/String8.h> +#include <utils/Vector.h> #include <hardware/hardware.h> @@ -29,6 +30,7 @@ #include <EGL/egl.h> +#include "LayerBase.h" #include "HWComposer.h" #include "SurfaceFlinger.h" @@ -133,7 +135,8 @@ hwc_layer_t* HWComposer::getLayers() const { return mList ? mList->hwLayers : 0; } -void HWComposer::dump(String8& result, char* buffer, size_t SIZE) const { +void HWComposer::dump(String8& result, char* buffer, size_t SIZE, + const Vector< sp<LayerBase> >& visibleLayersSortedByZ) const { if (mHwc && mList) { result.append("Hardware Composer state:\n"); @@ -143,11 +146,12 @@ void HWComposer::dump(String8& result, char* buffer, size_t SIZE) const { 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]\n", + snprintf(buffer, SIZE, " %8s | %08x | %08x | %02x | %04x | [%5d,%5d,%5d,%5d] | [%5d,%5d,%5d,%5d] %s\n", l.compositionType ? "OVERLAY" : "FB", l.hints, l.flags, l.transform, l.blending, l.sourceCrop.left, l.sourceCrop.top, l.sourceCrop.right, l.sourceCrop.bottom, - l.displayFrame.left, l.displayFrame.top, l.displayFrame.right, l.displayFrame.bottom); + l.displayFrame.left, l.displayFrame.top, l.displayFrame.right, l.displayFrame.bottom, + visibleLayersSortedByZ[i]->getName().string()); result.append(buffer); } diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.h b/services/surfaceflinger/DisplayHardware/HWComposer.h index 77c1a4b..8758a80 100644 --- a/services/surfaceflinger/DisplayHardware/HWComposer.h +++ b/services/surfaceflinger/DisplayHardware/HWComposer.h @@ -25,12 +25,14 @@ #include <hardware/hwcomposer.h> #include <utils/StrongPointer.h> +#include <utils/Vector.h> namespace android { // --------------------------------------------------------------------------- class String8; class SurfaceFlinger; +class LayerBase; class HWComposer { @@ -63,7 +65,8 @@ public: hwc_layer_t* getLayers() const; // for debugging - void dump(String8& out, char* scratch, size_t SIZE) const; + void dump(String8& out, char* scratch, size_t SIZE, + const Vector< sp<LayerBase> >& visibleLayersSortedByZ) const; private: struct cb_context { diff --git a/services/surfaceflinger/LayerBase.cpp b/services/surfaceflinger/LayerBase.cpp index dfc531e..a63dcd3 100644 --- a/services/surfaceflinger/LayerBase.cpp +++ b/services/surfaceflinger/LayerBase.cpp @@ -480,12 +480,13 @@ void LayerBase::dump(String8& result, char* buffer, size_t SIZE) const { const Layer::State& s(drawingState()); snprintf(buffer, SIZE, - "+ %s %p\n" + "+ %s %p (%s)\n" " " "z=%9d, pos=(%g,%g), size=(%4d,%4d), " "isOpaque=%1d, needsDithering=%1d, invalidate=%1d, " "alpha=0x%02x, flags=0x%08x, tr=[%.2f, %.2f][%.2f, %.2f]\n", - getTypeId(), this, s.z, s.transform.tx(), s.transform.ty(), s.w, s.h, + getTypeId(), this, getName().string(), + s.z, s.transform.tx(), s.transform.ty(), s.w, s.h, isOpaque(), needsDithering(), contentDirty, s.alpha, s.flags, s.transform[0][0], s.transform[0][1], @@ -561,9 +562,7 @@ void LayerBaseClient::dump(String8& result, char* buffer, size_t SIZE) const sp<Client> client(mClientRef.promote()); snprintf(buffer, SIZE, - " name=%s\n" " client=%p, identity=%u\n", - getName().string(), client.get(), getIdentity()); result.append(buffer); diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 2576576..768f8e0 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -1606,7 +1606,7 @@ status_t SurfaceFlinger::dump(int fd, const Vector<String16>& args) hwc.initCheck()==NO_ERROR ? "present" : "not present", (mDebugDisableHWC || mDebugRegion) ? "disabled" : "enabled"); result.append(buffer); - hwc.dump(result, buffer, SIZE); + hwc.dump(result, buffer, SIZE, mVisibleLayersSortedByZ); /* * Dump gralloc state |