diff options
author | Ruben Brunk <rubenbrunk@google.com> | 2014-06-27 15:51:55 -0700 |
---|---|---|
committer | Ruben Brunk <rubenbrunk@google.com> | 2014-07-14 22:14:32 +0000 |
commit | 1681d95989271f3a9ac0dbb93d10e4a29f2b4444 (patch) | |
tree | 52e23db3604b9b52d3f4d62324f279cb8942de69 /include/gui/IGraphicBufferProducer.h | |
parent | f3381cf1a645f857dccad9a4369ae23054e9d7d4 (diff) | |
download | frameworks_native-1681d95989271f3a9ac0dbb93d10e4a29f2b4444.zip frameworks_native-1681d95989271f3a9ac0dbb93d10e4a29f2b4444.tar.gz frameworks_native-1681d95989271f3a9ac0dbb93d10e4a29f2b4444.tar.bz2 |
Add sticky transform to surfaceflinger.
Bug: 15116722
- Adds a sticky transform field that can be set from a
SurfaceFlinger client Surface. This transform is
added to any transform applied to the Surface.
Change-Id: Idaa4311dfd027b2d2b8ea5e2c6cba2da5779d753
Diffstat (limited to 'include/gui/IGraphicBufferProducer.h')
-rw-r--r-- | include/gui/IGraphicBufferProducer.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/include/gui/IGraphicBufferProducer.h b/include/gui/IGraphicBufferProducer.h index 9b96b2b..4e9e810 100644 --- a/include/gui/IGraphicBufferProducer.h +++ b/include/gui/IGraphicBufferProducer.h @@ -273,15 +273,18 @@ public: // async - if the buffer is queued in asynchronous mode // fence - a fence that the consumer must wait on before reading the buffer, // set this to Fence::NO_FENCE if the buffer is ready immediately + // sticky - the sticky transform set in Surface (only used by the LEGACY + // camera mode). inline QueueBufferInput(int64_t timestamp, bool isAutoTimestamp, const Rect& crop, int scalingMode, uint32_t transform, bool async, - const sp<Fence>& fence) + const sp<Fence>& fence, uint32_t sticky = 0) : timestamp(timestamp), isAutoTimestamp(isAutoTimestamp), crop(crop), - scalingMode(scalingMode), transform(transform), async(async), - fence(fence) { } + scalingMode(scalingMode), transform(transform), stickyTransform(sticky), + async(async), fence(fence) { } inline void deflate(int64_t* outTimestamp, bool* outIsAutoTimestamp, Rect* outCrop, int* outScalingMode, uint32_t* outTransform, - bool* outAsync, sp<Fence>* outFence) const { + bool* outAsync, sp<Fence>* outFence, + uint32_t* outStickyTransform = NULL) const { *outTimestamp = timestamp; *outIsAutoTimestamp = bool(isAutoTimestamp); *outCrop = crop; @@ -289,6 +292,9 @@ public: *outTransform = transform; *outAsync = bool(async); *outFence = fence; + if (outStickyTransform != NULL) { + *outStickyTransform = stickyTransform; + } } // Flattenable protocol @@ -303,6 +309,7 @@ public: Rect crop; int scalingMode; uint32_t transform; + uint32_t stickyTransform; int async; sp<Fence> fence; }; |