summaryrefslogtreecommitdiffstats
path: root/include/gui
diff options
context:
space:
mode:
authorDan Stoza <stoza@google.com>2014-05-28 18:31:39 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-05-28 18:31:40 +0000
commit3d5c8a98c1822e5f32f0b7e82a40f14f41769878 (patch)
tree987be3647fa786578a36ee9c02be1aa13e31f189 /include/gui
parent7eb2a1566a5c0a4a8a189df6dffe847e2c8b559c (diff)
parentc18790018be5d7ea7061ccbc81f3044e74adc823 (diff)
downloadframeworks_native-3d5c8a98c1822e5f32f0b7e82a40f14f41769878.zip
frameworks_native-3d5c8a98c1822e5f32f0b7e82a40f14f41769878.tar.gz
frameworks_native-3d5c8a98c1822e5f32f0b7e82a40f14f41769878.tar.bz2
Merge "SurfaceFlinger: Add sourceCrop to screenshot"
Diffstat (limited to 'include/gui')
-rw-r--r--include/gui/ISurfaceComposer.h4
-rw-r--r--include/gui/SurfaceComposerClient.h15
2 files changed, 12 insertions, 7 deletions
diff --git a/include/gui/ISurfaceComposer.h b/include/gui/ISurfaceComposer.h
index 8042211..1581084 100644
--- a/include/gui/ISurfaceComposer.h
+++ b/include/gui/ISurfaceComposer.h
@@ -41,6 +41,7 @@ class DisplayState;
class DisplayInfo;
class IDisplayEventConnection;
class IMemoryHeap;
+class Rect;
/*
* This class defines the Binder IPC interface for accessing various
@@ -131,11 +132,10 @@ public:
*/
virtual status_t captureScreen(const sp<IBinder>& display,
const sp<IGraphicBufferProducer>& producer,
- uint32_t reqWidth, uint32_t reqHeight,
+ Rect sourceCrop, uint32_t reqWidth, uint32_t reqHeight,
uint32_t minLayerZ, uint32_t maxLayerZ,
bool useIdentityTransform) = 0;
-
/* Clears the frame statistics for animations.
*
* Requires the ACCESS_SURFACE_FLINGER permission.
diff --git a/include/gui/SurfaceComposerClient.h b/include/gui/SurfaceComposerClient.h
index c2192af..e666329 100644
--- a/include/gui/SurfaceComposerClient.h
+++ b/include/gui/SurfaceComposerClient.h
@@ -180,10 +180,12 @@ private:
class ScreenshotClient
{
public:
+ // if cropping isn't required, callers may pass in a default Rect, e.g.:
+ // capture(display, producer, Rect(), reqWidth, ...);
static status_t capture(
const sp<IBinder>& display,
const sp<IGraphicBufferProducer>& producer,
- uint32_t reqWidth, uint32_t reqHeight,
+ Rect sourceCrop, uint32_t reqWidth, uint32_t reqHeight,
uint32_t minLayerZ, uint32_t maxLayerZ,
bool useIdentityTransform);
@@ -197,13 +199,16 @@ public:
ScreenshotClient();
~ScreenshotClient();
- // frees the previous screenshot and capture a new one
- status_t update(const sp<IBinder>& display, bool useIdentityTransform);
+ // frees the previous screenshot and captures a new one
+ // if cropping isn't required, callers may pass in a default Rect, e.g.:
+ // update(display, Rect(), useIdentityTransform);
status_t update(const sp<IBinder>& display,
- uint32_t reqWidth, uint32_t reqHeight,
+ Rect sourceCrop, bool useIdentityTransform);
+ status_t update(const sp<IBinder>& display,
+ Rect sourceCrop, uint32_t reqWidth, uint32_t reqHeight,
bool useIdentityTransform);
status_t update(const sp<IBinder>& display,
- uint32_t reqWidth, uint32_t reqHeight,
+ Rect sourceCrop, uint32_t reqWidth, uint32_t reqHeight,
uint32_t minLayerZ, uint32_t maxLayerZ,
bool useIdentityTransform);