SF: Remove conditional lock in setPowerMode
The mCurrentState access in setPowerModeInternal was only for looking up
the sequence ID of the display.
Bug: 74619554
Test: Boot
Change-Id: If0fad8f19bf8680f247476c3ffe52667e061fdd3
diff --git a/services/surfaceflinger/DisplayDevice.h b/services/surfaceflinger/DisplayDevice.h
index 8357228..ba85432 100644
--- a/services/surfaceflinger/DisplayDevice.h
+++ b/services/surfaceflinger/DisplayDevice.h
@@ -112,6 +112,7 @@
const std::optional<DisplayId>& getId() const { return mId; }
const wp<IBinder>& getDisplayToken() const { return mDisplayToken; }
+ int32_t getSequenceId() const { return mSequenceId; }
int32_t getSupportedPerFrameMetadata() const { return mSupportedPerFrameMetadata; }
@@ -205,6 +206,7 @@
private:
const sp<SurfaceFlinger> mFlinger;
const wp<IBinder> mDisplayToken;
+ const int32_t mSequenceId;
std::optional<DisplayId> mId;
@@ -332,6 +334,7 @@
const wp<IBinder> displayToken;
const std::optional<DisplayId> displayId;
+ int32_t sequenceId{0};
bool isVirtual{false};
bool isSecure{false};
sp<ANativeWindow> nativeWindow;