summaryrefslogtreecommitdiff
path: root/libs/gui/SurfaceComposerClient.cpp
diff options
context:
space:
mode:
author Vishnu Nair <vishnun@google.com> 2022-10-10 04:52:13 +0000
committer Vishnu Nair <vishnun@google.com> 2022-10-10 20:51:24 +0000
commitbbceb46b722db9d1ececb909c845e45302721f89 (patch)
tree8a8685b42b9e1cd4535a717256fe848d7abfbbff /libs/gui/SurfaceComposerClient.cpp
parent933a6bfdb7d5d77cfda1e4646cf9a3a985d4e562 (diff)
SurfaceComposerClient: Clean up layer state
- align layer alpha/color with SF layer drawing state - remove unused flags and fields Bug: 238781169 Test: presubmit Change-Id: I4be9c56b3006b7d7a0ca19160511ebb9e3551a8c
Diffstat (limited to 'libs/gui/SurfaceComposerClient.cpp')
-rw-r--r--libs/gui/SurfaceComposerClient.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp
index 694bc5af5b..fee45ea693 100644
--- a/libs/gui/SurfaceComposerClient.cpp
+++ b/libs/gui/SurfaceComposerClient.cpp
@@ -1293,7 +1293,7 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setAlpha
ALOGE("SurfaceComposerClient::Transaction::setAlpha: invalid alpha %f, clamping", alpha);
}
s->what |= layer_state_t::eAlphaChanged;
- s->alpha = std::clamp(alpha, 0.f, 1.f);
+ s->color.a = std::clamp(alpha, 0.f, 1.f);
registerSurfaceControlForCallback(sc);
return *this;
@@ -1424,7 +1424,7 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setColor
return *this;
}
s->what |= layer_state_t::eColorChanged;
- s->color = color;
+ s->color.rgb = color;
registerSurfaceControlForCallback(sc);
return *this;
@@ -1439,7 +1439,7 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setBackg
}
s->what |= layer_state_t::eBackgroundColorChanged;
- s->color = color;
+ s->color.rgb = color;
s->bgColorAlpha = alpha;
s->bgColorDataspace = dataspace;
@@ -1454,8 +1454,8 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setTrans
mStatus = BAD_INDEX;
return *this;
}
- s->what |= layer_state_t::eTransformChanged;
- s->transform = transform;
+ s->what |= layer_state_t::eBufferTransformChanged;
+ s->bufferTransform = transform;
registerSurfaceControlForCallback(sc);
return *this;