summaryrefslogtreecommitdiff
path: root/libs/ui/FramebufferNativeWindow.cpp
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
commit94720d7ec40d2b5ee200d95a46588cdb0fb30e66 (patch)
tree48c53514ce6f4eb1012a38ec8fd9b422d7937897 /libs/ui/FramebufferNativeWindow.cpp
parent882754e8cc5833e19696271d612b4b9eabcc5bb3 (diff)
surfaceflinger: add support for gralloc dump hooks
Change-Id: Ib6f539ed0132b70d040d653c03d52cc04249ac3c
Diffstat (limited to 'libs/ui/FramebufferNativeWindow.cpp')
-rw-r--r--libs/ui/FramebufferNativeWindow.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/ui/FramebufferNativeWindow.cpp b/libs/ui/FramebufferNativeWindow.cpp
index 04a01955558b..0702d4966796 100644
--- a/libs/ui/FramebufferNativeWindow.cpp
+++ b/libs/ui/FramebufferNativeWindow.cpp
@@ -182,6 +182,16 @@ int FramebufferNativeWindow::setSwapInterval(
return fb->setSwapInterval(fb, interval);
}
+void FramebufferNativeWindow::dump(String8& result) {
+ if (fbDev->common.version >= 1 && fbDev->dump) {
+ const size_t SIZE = 4096;
+ char buffer[SIZE];
+
+ fbDev->dump(fbDev, buffer, SIZE);
+ result.append(buffer);
+ }
+}
+
// only for debugging / logging
int FramebufferNativeWindow::getCurrentBufferIndex() const
{