summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/Layer.cpp
diff options
context:
space:
mode:
author Robert Carr <racarr@google.com> 2021-06-11 14:30:09 -0700
committer Robert Carr <racarr@google.com> 2021-06-15 11:53:29 -0700
commit38d2500594652eabe7ee989d40b7190a26c577cc (patch)
tree6819769370bc9866374ef81f18b12f91cc026fa8 /services/surfaceflinger/Layer.cpp
parent13a864c4702e4303b6ccb26ae0cbe573bf62e2da (diff)
Layer: Don't need atomic for transaction flags
Following queued transaction changes we don't need an atomic here since setPosition etc all execute on the main thread. Test: Existing tests pass. simpleperf Bug: 186200583 Change-Id: I965d3883d30ce1eb3c452742535281f3e2719424
Diffstat (limited to 'services/surfaceflinger/Layer.cpp')
-rw-r--r--services/surfaceflinger/Layer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index 2bf5602595..00defb3dc1 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -847,11 +847,13 @@ void Layer::commitTransaction(State& stateToCommit) {
}
uint32_t Layer::getTransactionFlags(uint32_t flags) {
- return mTransactionFlags.fetch_and(~flags) & flags;
+ auto ret = mTransactionFlags & flags;
+ mTransactionFlags &= ~flags;
+ return ret;
}
uint32_t Layer::setTransactionFlags(uint32_t flags) {
- return mTransactionFlags.fetch_or(flags);
+ return mTransactionFlags |= flags;
}
bool Layer::setPosition(float x, float y) {