From 94720d7ec40d2b5ee200d95a46588cdb0fb30e66 Mon Sep 17 00:00:00 2001 From: Erik Gilling Date: Wed, 1 Dec 2010 16:38:01 -0800 Subject: surfaceflinger: add support for gralloc dump hooks Change-Id: Ib6f539ed0132b70d040d653c03d52cc04249ac3c --- libs/ui/FramebufferNativeWindow.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libs/ui/FramebufferNativeWindow.cpp') 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 { -- cgit v1.2.3-59-g8ed1b