summaryrefslogtreecommitdiffstats
path: root/libs/gui/ISurfaceComposer.cpp
diff options
context:
space:
mode:
authorRiley Andrews <riandrews@google.com>2014-09-04 16:20:31 -0700
committerRiley Andrews <riandrews@google.com>2014-09-09 03:51:16 +0000
commitc3ebe66b49cfba035e1fd0e160a13db38eb81b0e (patch)
treee19c408d47ebbfa8512885dd593c0f1c598c1215 /libs/gui/ISurfaceComposer.cpp
parent7eff26a02aeb35d6c48e1af8d9bebcc838ad1fd2 (diff)
downloadframeworks_native-c3ebe66b49cfba035e1fd0e160a13db38eb81b0e.zip
frameworks_native-c3ebe66b49cfba035e1fd0e160a13db38eb81b0e.tar.gz
frameworks_native-c3ebe66b49cfba035e1fd0e160a13db38eb81b0e.tar.bz2
Add rotation to surfaceflingers screen cap.
+ This is needed so that activity manager does not have to do cpu side rotations when capturing recents thumbnails. Change-Id: If998008e675ad01305db8399fd643cf4608b7025
Diffstat (limited to 'libs/gui/ISurfaceComposer.cpp')
-rw-r--r--libs/gui/ISurfaceComposer.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/libs/gui/ISurfaceComposer.cpp b/libs/gui/ISurfaceComposer.cpp
index 4680168..4d65c56 100644
--- a/libs/gui/ISurfaceComposer.cpp
+++ b/libs/gui/ISurfaceComposer.cpp
@@ -106,7 +106,8 @@ public:
const sp<IGraphicBufferProducer>& producer,
Rect sourceCrop, uint32_t reqWidth, uint32_t reqHeight,
uint32_t minLayerZ, uint32_t maxLayerZ,
- bool useIdentityTransform)
+ bool useIdentityTransform,
+ ISurfaceComposer::Rotation rotation)
{
Parcel data, reply;
data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor());
@@ -118,6 +119,7 @@ public:
data.writeInt32(minLayerZ);
data.writeInt32(maxLayerZ);
data.writeInt32(static_cast<int32_t>(useIdentityTransform));
+ data.writeInt32(static_cast<int32_t>(rotation));
remote()->transact(BnSurfaceComposer::CAPTURE_SCREEN, data, &reply);
return reply.readInt32();
}
@@ -329,10 +331,12 @@ status_t BnSurfaceComposer::onTransact(
uint32_t minLayerZ = data.readInt32();
uint32_t maxLayerZ = data.readInt32();
bool useIdentityTransform = static_cast<bool>(data.readInt32());
+ uint32_t rotation = data.readInt32();
status_t res = captureScreen(display, producer,
sourceCrop, reqWidth, reqHeight, minLayerZ, maxLayerZ,
- useIdentityTransform);
+ useIdentityTransform,
+ static_cast<ISurfaceComposer::Rotation>(rotation));
reply->writeInt32(res);
return NO_ERROR;
}