summaryrefslogtreecommitdiffstats
path: root/libs/gui/SurfaceComposerClient.cpp
diff options
context:
space:
mode:
authorRiley Andrews <riandrews@google.com>2014-09-04 16:19:44 -0700
committerRiley Andrews <riandrews@google.com>2014-09-09 19:41:32 +0000
commitd15ef27f9b13727fa7358e3c09572f66bb1e0668 (patch)
tree114aa1f44b0ea45551930ab6c451c995fe57f7f9 /libs/gui/SurfaceComposerClient.cpp
parentedb86f9f681e082a64a670814ee4d73ccf39942a (diff)
downloadframeworks_native-d15ef27f9b13727fa7358e3c09572f66bb1e0668.zip
frameworks_native-d15ef27f9b13727fa7358e3c09572f66bb1e0668.tar.gz
frameworks_native-d15ef27f9b13727fa7358e3c09572f66bb1e0668.tar.bz2
Update ScreenshotClient to take advantage of rotation in surfaceflinger's screencap api
Change-Id: I836649d9d5cd5958ce34e47f26f4a36d2d05d24c
Diffstat (limited to 'libs/gui/SurfaceComposerClient.cpp')
-rw-r--r--libs/gui/SurfaceComposerClient.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp
index 6e13207..6446926 100644
--- a/libs/gui/SurfaceComposerClient.cpp
+++ b/libs/gui/SurfaceComposerClient.cpp
@@ -717,7 +717,7 @@ sp<CpuConsumer> ScreenshotClient::getCpuConsumer() const {
status_t ScreenshotClient::update(const sp<IBinder>& display,
Rect sourceCrop, uint32_t reqWidth, uint32_t reqHeight,
uint32_t minLayerZ, uint32_t maxLayerZ,
- bool useIdentityTransform) {
+ bool useIdentityTransform, uint32_t rotation) {
sp<ISurfaceComposer> s(ComposerService::getComposerService());
if (s == NULL) return NO_INIT;
sp<CpuConsumer> cpuConsumer = getCpuConsumer();
@@ -729,7 +729,8 @@ status_t ScreenshotClient::update(const sp<IBinder>& display,
}
status_t err = s->captureScreen(display, mProducer, sourceCrop,
- reqWidth, reqHeight, minLayerZ, maxLayerZ, useIdentityTransform);
+ reqWidth, reqHeight, minLayerZ, maxLayerZ, useIdentityTransform,
+ static_cast<ISurfaceComposer::Rotation>(rotation));
if (err == NO_ERROR) {
err = mCpuConsumer->lockNextBuffer(&mBuffer);
@@ -740,16 +741,25 @@ status_t ScreenshotClient::update(const sp<IBinder>& display,
return err;
}
+status_t ScreenshotClient::update(const sp<IBinder>& display,
+ Rect sourceCrop, uint32_t reqWidth, uint32_t reqHeight,
+ uint32_t minLayerZ, uint32_t maxLayerZ,
+ bool useIdentityTransform) {
+
+ return ScreenshotClient::update(display, sourceCrop, reqWidth, reqHeight,
+ minLayerZ, maxLayerZ, useIdentityTransform, ISurfaceComposer::eRotateNone);
+}
+
status_t ScreenshotClient::update(const sp<IBinder>& display, Rect sourceCrop,
bool useIdentityTransform) {
return ScreenshotClient::update(display, sourceCrop, 0, 0, 0, -1UL,
- useIdentityTransform);
+ useIdentityTransform, ISurfaceComposer::eRotateNone);
}
status_t ScreenshotClient::update(const sp<IBinder>& display, Rect sourceCrop,
uint32_t reqWidth, uint32_t reqHeight, bool useIdentityTransform) {
return ScreenshotClient::update(display, sourceCrop, reqWidth, reqHeight,
- 0, -1UL, useIdentityTransform);
+ 0, -1UL, useIdentityTransform, ISurfaceComposer::eRotateNone);
}
void ScreenshotClient::release() {