summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorErik Gilling <konkers@android.com>2010-12-01 16:38:01 -0800
committerErik Gilling <konkers@android.com>2010-12-08 15:40:11 -0800
commit1d21a9cafc534c34a2f28c985c4c7aa176d0e67b (patch)
tree1e8dd1c885d6122e332b14777143a304dde1c7cd /services
parentdb4fdaaa1e434c854beb29bb499761d3a8aaa982 (diff)
downloadframeworks_native-1d21a9cafc534c34a2f28c985c4c7aa176d0e67b.zip
frameworks_native-1d21a9cafc534c34a2f28c985c4c7aa176d0e67b.tar.gz
frameworks_native-1d21a9cafc534c34a2f28c985c4c7aa176d0e67b.tar.bz2
surfaceflinger: add support for gralloc dump hooks
Change-Id: Ib6f539ed0132b70d040d653c03d52cc04249ac3c
Diffstat (limited to 'services')
-rw-r--r--services/surfaceflinger/DisplayHardware/DisplayHardware.cpp5
-rw-r--r--services/surfaceflinger/DisplayHardware/DisplayHardware.h2
-rw-r--r--services/surfaceflinger/DisplayHardware/HWComposer.cpp5
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp3
4 files changed, 14 insertions, 1 deletions
diff --git a/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp b/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp
index 8926c03..58751be 100644
--- a/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp
+++ b/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp
@@ -367,3 +367,8 @@ void DisplayHardware::makeCurrent() const
{
eglMakeCurrent(mDisplay, mSurface, mSurface, mContext);
}
+
+void DisplayHardware::dump(String8& res) const
+{
+ mNativeWindow->dump(res);
+}
diff --git a/services/surfaceflinger/DisplayHardware/DisplayHardware.h b/services/surfaceflinger/DisplayHardware/DisplayHardware.h
index 75b55df..eb71e8b 100644
--- a/services/surfaceflinger/DisplayHardware/DisplayHardware.h
+++ b/services/surfaceflinger/DisplayHardware/DisplayHardware.h
@@ -80,6 +80,8 @@ public:
EGLDisplay getEGLDisplay() const { return mDisplay; }
overlay_control_device_t* getOverlayEngine() const { return mOverlayEngine; }
+ void dump(String8& res) const;
+
// Hardware Composer
HWComposer& getHwComposer() const;
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.cpp b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
index 4af274b..4a3b20d 100644
--- a/services/surfaceflinger/DisplayHardware/HWComposer.cpp
+++ b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
@@ -120,6 +120,11 @@ void HWComposer::dump(String8& result, char* buffer, size_t SIZE) const {
l.displayFrame.left, l.displayFrame.top, l.displayFrame.right, l.displayFrame.bottom);
result.append(buffer);
}
+
+ }
+ if (mHwc && mHwc->common.version >= 1 && mHwc->dump) {
+ mHwc->dump(mHwc, buffer, SIZE);
+ result.append(buffer);
}
}
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 2e785aa..49240e8 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -1460,7 +1460,7 @@ void SurfaceFlinger::screenAcquired(int dpy)
status_t SurfaceFlinger::dump(int fd, const Vector<String16>& args)
{
- const size_t SIZE = 1024;
+ const size_t SIZE = 4096;
char buffer[SIZE];
String8 result;
if (!mDump.checkCalling()) {
@@ -1538,6 +1538,7 @@ status_t SurfaceFlinger::dump(int fd, const Vector<String16>& args)
const GraphicBufferAllocator& alloc(GraphicBufferAllocator::get());
alloc.dump(result);
+ hw.dump(result);
if (locked) {
mStateLock.unlock();