Allow disabling layer rotation during screenshots
Add the ability to ignore layers' transformation matrices during
screenshot capture, which will allow the window manager to capture
unrotated images for recents during the device rotation animation.
Bug: 11805195
Change-Id: I854d87bc84ca06ef9a054a454af1c080ee66fbb8
diff --git a/include/gui/ISurfaceComposer.h b/include/gui/ISurfaceComposer.h
index 5c3c99c..35dcd4e 100644
--- a/include/gui/ISurfaceComposer.h
+++ b/include/gui/ISurfaceComposer.h
@@ -120,7 +120,8 @@
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;
+ uint32_t minLayerZ, uint32_t maxLayerZ,
+ bool useIdentityTransform) = 0;
};
// ----------------------------------------------------------------------------
diff --git a/include/gui/SurfaceComposerClient.h b/include/gui/SurfaceComposerClient.h
index e982bcd..350b987 100644
--- a/include/gui/SurfaceComposerClient.h
+++ b/include/gui/SurfaceComposerClient.h
@@ -164,7 +164,8 @@
const sp<IBinder>& display,
const sp<IGraphicBufferProducer>& producer,
uint32_t reqWidth, uint32_t reqHeight,
- uint32_t minLayerZ, uint32_t maxLayerZ);
+ uint32_t minLayerZ, uint32_t maxLayerZ,
+ bool useIdentityTransform);
private:
mutable sp<CpuConsumer> mCpuConsumer;
@@ -177,12 +178,14 @@
~ScreenshotClient();
// frees the previous screenshot and capture a new one
- status_t update(const sp<IBinder>& display);
- status_t update(const sp<IBinder>& display,
- uint32_t reqWidth, uint32_t reqHeight);
+ status_t update(const sp<IBinder>& display, bool useIdentityTransform);
status_t update(const sp<IBinder>& display,
uint32_t reqWidth, uint32_t reqHeight,
- uint32_t minLayerZ, uint32_t maxLayerZ);
+ bool useIdentityTransform);
+ status_t update(const sp<IBinder>& display,
+ uint32_t reqWidth, uint32_t reqHeight,
+ uint32_t minLayerZ, uint32_t maxLayerZ,
+ bool useIdentityTransform);
sp<CpuConsumer> getCpuConsumer() const;