summaryrefslogtreecommitdiffstats
path: root/include/surfaceflinger
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2010-09-24 11:26:58 -0700
committerMathias Agopian <mathias@google.com>2010-09-24 14:56:39 -0700
commitca5edbeba92b96913291792a4df984e158853b6d (patch)
treecef0f4174ca3d5e09a767787eec63b7a0cf7f2cf /include/surfaceflinger
parent5c6c5c7a43d44316395f5c35ab713372124b8b4c (diff)
downloadframeworks_base-ca5edbeba92b96913291792a4df984e158853b6d.zip
frameworks_base-ca5edbeba92b96913291792a4df984e158853b6d.tar.gz
frameworks_base-ca5edbeba92b96913291792a4df984e158853b6d.tar.bz2
add support for [1974164] Be able to take a screen shot on the device
screenshots are taken using ISurfaceComposer::captureScreen() which returns the size of the screenshot and an IMemoryHeap containing the data. screenshots have limitations: - they will always fail if a secure window is up on screen - require GL_OES_framebuffer_object extension - in some situation, video planes won't been captured Change-Id: I741c68a2d2984fb139039301c3349e6780e2cd58
Diffstat (limited to 'include/surfaceflinger')
-rw-r--r--include/surfaceflinger/ISurfaceComposer.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/surfaceflinger/ISurfaceComposer.h b/include/surfaceflinger/ISurfaceComposer.h
index dd44aa5..76307b2 100644
--- a/include/surfaceflinger/ISurfaceComposer.h
+++ b/include/surfaceflinger/ISurfaceComposer.h
@@ -110,6 +110,13 @@ public:
*/
virtual void bootFinished() = 0;
+ /* Capture the specified screen. requires READ_FRAME_BUFFER permission
+ * This function will fail if there is a secure window on screen.
+ */
+ virtual status_t captureScreen(DisplayID dpy,
+ sp<IMemoryHeap>* heap,
+ uint32_t* width, uint32_t* height, PixelFormat* format) = 0;
+
/* Signal surfaceflinger that there might be some work to do
* This is an ASYNCHRONOUS call.
*/
@@ -133,7 +140,8 @@ public:
SET_ORIENTATION,
FREEZE_DISPLAY,
UNFREEZE_DISPLAY,
- SIGNAL
+ SIGNAL,
+ CAPTURE_SCREEN
};
virtual status_t onTransact( uint32_t code,