diff options
| author | 2021-06-17 17:56:24 +0000 | |
|---|---|---|
| committer | 2021-06-17 17:56:24 +0000 | |
| commit | c67c384ea4d500c655557ee32c12a08bbcaa57a5 (patch) | |
| tree | f9edb3b5d93af7aa396a6ef95a3a9f4b3c195430 | |
| parent | 603a15d295579ea583fbad2cb9c15cf41dd598dc (diff) | |
| parent | 38d2500594652eabe7ee989d40b7190a26c577cc (diff) | |
Merge "Layer: Don't need atomic for transaction flags" into sc-dev
| -rw-r--r-- | services/surfaceflinger/BufferStateLayer.cpp | 1 | ||||
| -rw-r--r-- | services/surfaceflinger/Layer.cpp | 6 | ||||
| -rw-r--r-- | services/surfaceflinger/Layer.h | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/services/surfaceflinger/BufferStateLayer.cpp b/services/surfaceflinger/BufferStateLayer.cpp index d68a0e0b47..6213a8aff5 100644 --- a/services/surfaceflinger/BufferStateLayer.cpp +++ b/services/surfaceflinger/BufferStateLayer.cpp @@ -33,6 +33,7 @@ #include <gui/BufferQueue.h> #include <private/gui/SyncFeatures.h> #include <renderengine/Image.h> +#include "TunnelModeEnabledReporter.h" #include "EffectLayer.h" #include "FrameTracer/FrameTracer.h" 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) { diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h index 58731036d7..5669049512 100644 --- a/services/surfaceflinger/Layer.h +++ b/services/surfaceflinger/Layer.h @@ -960,7 +960,7 @@ protected: // these are protected by an external lock (mStateLock) State mCurrentState; - std::atomic<uint32_t> mTransactionFlags{0}; + uint32_t mTransactionFlags{0}; // Timestamp history for UIAutomation. Thread safe. FrameTracker mFrameTracker; |