summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2012-09-18 01:38:00 -0700
committerMathias Agopian <mathias@google.com>2012-09-18 14:42:32 -0700
commit1d12d8a8e61163b35cf42c51c558a67138014e82 (patch)
tree08cc8bbf62569dda023f80f93d45bc40bed940bf /services
parent6ab93290aeed63f139b0e77819ea889bbce9ec8b (diff)
downloadframeworks_native-1d12d8a8e61163b35cf42c51c558a67138014e82.zip
frameworks_native-1d12d8a8e61163b35cf42c51c558a67138014e82.tar.gz
frameworks_native-1d12d8a8e61163b35cf42c51c558a67138014e82.tar.bz2
improve logging of external displays
Change-Id: I041aebb7fc655aeca98bbf698d15e05d7c12cac9
Diffstat (limited to 'services')
-rw-r--r--services/surfaceflinger/DisplayDevice.cpp34
-rw-r--r--services/surfaceflinger/DisplayDevice.h2
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp21
3 files changed, 29 insertions, 28 deletions
diff --git a/services/surfaceflinger/DisplayDevice.cpp b/services/surfaceflinger/DisplayDevice.cpp
index 78024b8..de6e7a7 100644
--- a/services/surfaceflinger/DisplayDevice.cpp
+++ b/services/surfaceflinger/DisplayDevice.cpp
@@ -235,13 +235,6 @@ uint32_t DisplayDevice::getFlags() const
return mFlags;
}
-void DisplayDevice::dump(String8& res) const
-{
- if (mFramebufferSurface != NULL) {
- mFramebufferSurface->dump(res);
- }
-}
-
EGLBoolean DisplayDevice::makeCurrent(EGLDisplay dpy,
const sp<const DisplayDevice>& hw, EGLContext ctx) {
EGLBoolean result = EGL_TRUE;
@@ -406,3 +399,30 @@ void DisplayDevice::updateGeometryTransform() {
mGlobalTransform = R * TP * S * TL;
}
}
+
+void DisplayDevice::dump(String8& result, char* buffer, size_t SIZE) const {
+ const Transform& tr(mGlobalTransform);
+ snprintf(buffer, SIZE,
+ "+ DisplayDevice: %s\n"
+ " type=%x, layerStack=%u, (%4dx%4d), ANativeWindow=%p, orient=%2d (type=%08x), "
+ "flips=%u, secure=%d, acquired=%d, numLayers=%u\n"
+ " v:[%d,%d,%d,%d], f:[%d,%d,%d,%d], "
+ "transform:[[%0.3f,%0.3f,%0.3f][%0.3f,%0.3f,%0.3f][%0.3f,%0.3f,%0.3f]]\n",
+ mType, mDisplayName.string(),
+ mLayerStack, mDisplayWidth, mDisplayHeight, mNativeWindow.get(),
+ mOrientation, tr.getType(), getPageFlipCount(),
+ mSecureLayerVisible, mScreenAcquired, mVisibleLayersSortedByZ.size(),
+ mViewport.left, mViewport.top, mViewport.right, mViewport.bottom,
+ mFrame.left, mFrame.top, mFrame.right, mFrame.bottom,
+ tr[0][0], tr[1][0], tr[2][0],
+ tr[0][1], tr[1][1], tr[2][1],
+ tr[0][2], tr[1][2], tr[2][2]);
+
+ result.append(buffer);
+
+ String8 fbtargetDump;
+ if (mFramebufferSurface != NULL) {
+ mFramebufferSurface->dump(fbtargetDump);
+ result.append(fbtargetDump);
+ }
+}
diff --git a/services/surfaceflinger/DisplayDevice.h b/services/surfaceflinger/DisplayDevice.h
index e3b8d57..c9d21e4 100644
--- a/services/surfaceflinger/DisplayDevice.h
+++ b/services/surfaceflinger/DisplayDevice.h
@@ -138,7 +138,7 @@ public:
* Debugging
*/
uint32_t getPageFlipCount() const;
- void dump(String8& res) const;
+ void dump(String8& result, char* buffer, size_t SIZE) const;
private:
void init(EGLConfig config);
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 27677d6..a1e72a4 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -2025,25 +2025,7 @@ void SurfaceFlinger::dumpAllLocked(
result.append(buffer);
for (size_t dpy=0 ; dpy<mDisplays.size() ; dpy++) {
const sp<const DisplayDevice>& hw(mDisplays[dpy]);
- snprintf(buffer, SIZE,
- "+ DisplayDevice[%u] '%s'\n"
- " type=%x, layerStack=%u, (%4dx%4d), orient=%2d (type=%08x), "
- "flips=%u, secure=%d, numLayers=%u, v:[%d,%d,%d,%d], f:[%d,%d,%d,%d], "
- "transform:[[%0.3f,%0.3f,%0.3f][%0.3f,%0.3f,%0.3f][%0.3f,%0.3f,%0.3f]]\n",
- dpy, (const char*) hw->getDisplayName(),
- hw->getDisplayType(), hw->getLayerStack(),
- hw->getWidth(), hw->getHeight(),
- hw->getOrientation(), hw->getTransform().getType(),
- hw->getPageFlipCount(),
- hw->getSecureLayerVisible(),
- hw->getVisibleLayersSortedByZ().size(),
- hw->getViewport().left, hw->getViewport().top, hw->getViewport().right, hw->getViewport().bottom,
- hw->getFrame().left, hw->getFrame().top, hw->getFrame().right, hw->getFrame().bottom,
- hw->getTransform()[0][0], hw->getTransform()[1][0], hw->getTransform()[2][0],
- hw->getTransform()[0][1], hw->getTransform()[1][1], hw->getTransform()[2][1],
- hw->getTransform()[0][2], hw->getTransform()[1][2], hw->getTransform()[2][2]);
-
- result.append(buffer);
+ hw->dump(result, buffer, SIZE);
}
/*
@@ -2118,7 +2100,6 @@ void SurfaceFlinger::dumpAllLocked(
*/
const GraphicBufferAllocator& alloc(GraphicBufferAllocator::get());
alloc.dump(result);
- hw->dump(result);
}
bool SurfaceFlinger::startDdmConnection()