summaryrefslogtreecommitdiffstats
path: root/include/gui
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2013-03-05 02:30:13 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-03-05 02:30:13 +0000
commit306f18c5fb15ac05db09ece7241af02b9713a23d (patch)
tree25ad5112b9963cd7f6f822690ad1c7f8afef9ef6 /include/gui
parenteabe3140f11e515639e7a70a1286dd6af7352c9e (diff)
parent2a9fc493dfdba67108e4335bb1fe931bc1e2a025 (diff)
downloadframeworks_native-306f18c5fb15ac05db09ece7241af02b9713a23d.zip
frameworks_native-306f18c5fb15ac05db09ece7241af02b9713a23d.tar.gz
frameworks_native-306f18c5fb15ac05db09ece7241af02b9713a23d.tar.bz2
Merge "rework screenshot API and implementation" into jb-mr2-dev
Diffstat (limited to 'include/gui')
-rw-r--r--include/gui/ISurfaceComposer.h9
-rw-r--r--include/gui/SurfaceComposerClient.h9
2 files changed, 16 insertions, 2 deletions
diff --git a/include/gui/ISurfaceComposer.h b/include/gui/ISurfaceComposer.h
index 4862949..08eddcb 100644
--- a/include/gui/ISurfaceComposer.h
+++ b/include/gui/ISurfaceComposer.h
@@ -103,7 +103,6 @@ public:
uint32_t reqWidth, uint32_t reqHeight,
uint32_t minLayerZ, uint32_t maxLayerZ) = 0;
-
/* triggers screen off and waits for it to complete */
virtual void blank(const sp<IBinder>& display) = 0;
@@ -113,6 +112,11 @@ public:
/* returns information about a display
* intended to be used to get information about built-in displays */
virtual status_t getDisplayInfo(const sp<IBinder>& display, DisplayInfo* info) = 0;
+
+ virtual status_t captureScreen(const sp<IBinder>& display,
+ const sp<IGraphicBufferProducer>& producer,
+ uint32_t reqWidth, uint32_t reqHeight,
+ uint32_t minLayerZ, uint32_t maxLayerZ) = 0;
};
// ----------------------------------------------------------------------------
@@ -130,11 +134,12 @@ public:
GET_BUILT_IN_DISPLAY,
SET_TRANSACTION_STATE,
AUTHENTICATE_SURFACE,
- CAPTURE_SCREEN,
+ CAPTURE_SCREEN_DEPRECATED,
BLANK,
UNBLANK,
GET_DISPLAY_INFO,
CONNECT_DISPLAY,
+ CAPTURE_SCREEN,
};
virtual status_t onTransact(uint32_t code, const Parcel& data,
diff --git a/include/gui/SurfaceComposerClient.h b/include/gui/SurfaceComposerClient.h
index 9e4d6fc..38c931d 100644
--- a/include/gui/SurfaceComposerClient.h
+++ b/include/gui/SurfaceComposerClient.h
@@ -156,10 +156,19 @@ private:
class ScreenshotClient
{
+public:
+ static status_t capture(
+ const sp<IBinder>& display,
+ const sp<IGraphicBufferProducer>& producer,
+ uint32_t reqWidth, uint32_t reqHeight,
+ uint32_t minLayerZ, uint32_t maxLayerZ);
+
+private:
sp<IMemoryHeap> mHeap;
uint32_t mWidth;
uint32_t mHeight;
PixelFormat mFormat;
+
public:
ScreenshotClient();