diff options
| author | 2020-05-12 00:09:04 +0000 | |
|---|---|---|
| committer | 2020-05-12 00:09:04 +0000 | |
| commit | 5705de86b465f287b5fab48f9c99d6ac0a82dcad (patch) | |
| tree | 426e6afa031b9fefa064155a9093dc098fa4f08c /libs/gui/SurfaceComposerClient.cpp | |
| parent | 5005714718cc5173df5c85b8c1780cf322a5ce47 (diff) | |
| parent | 942c53703fa4d1dec14d0e68b594c83e5fd30c4f (diff) | |
Merge "Provide a fixed transform hint if the layer is in a fixed orientation 1/2" into rvc-dev am: 942c53703f
Change-Id: I25879fed381d7b53dfa0bed31b32304147a37815
Diffstat (limited to 'libs/gui/SurfaceComposerClient.cpp')
| -rw-r--r-- | libs/gui/SurfaceComposerClient.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp index a52f298e77..5922f3a876 100644 --- a/libs/gui/SurfaceComposerClient.cpp +++ b/libs/gui/SurfaceComposerClient.cpp @@ -1437,6 +1437,22 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setFrame return *this; } +SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setFixedTransformHint( + const sp<SurfaceControl>& sc, int32_t fixedTransformHint) { + layer_state_t* s = getLayerState(sc); + if (!s) { + mStatus = BAD_INDEX; + return *this; + } + + const ui::Transform::RotationFlags transform = fixedTransformHint == -1 + ? ui::Transform::ROT_INVALID + : ui::Transform::toRotationFlags(static_cast<ui::Rotation>(fixedTransformHint)); + s->what |= layer_state_t::eFixedTransformHintChanged; + s->fixedTransformHint = transform; + return *this; +} + // --------------------------------------------------------------------------- DisplayState& SurfaceComposerClient::Transaction::getDisplayState(const sp<IBinder>& token) { |