SF: Clean up DisplayDeviceState
The DisplayDevice::DisplayType in DisplayDeviceState will be replaced
with a DisplayId in a follow-up CL, so this CL removes unnecessary
constructors and renames displayId to sequenceId.
Bug: 74619554
Test: Build
Change-Id: I994042188299d59a62a368c12455d04891d07298
diff --git a/services/surfaceflinger/DisplayDevice.h b/services/surfaceflinger/DisplayDevice.h
index d7c5b26..dd69404 100644
--- a/services/surfaceflinger/DisplayDevice.h
+++ b/services/surfaceflinger/DisplayDevice.h
@@ -267,15 +267,10 @@
};
struct DisplayDeviceState {
- DisplayDeviceState() = default;
- DisplayDeviceState(DisplayDevice::DisplayType type, bool isSecure);
-
bool isValid() const { return type >= 0; }
- bool isMainDisplay() const { return type == DisplayDevice::DISPLAY_PRIMARY; }
- bool isVirtualDisplay() const { return type >= DisplayDevice::DISPLAY_VIRTUAL; }
+ bool isVirtual() const { return type >= DisplayDevice::DISPLAY_VIRTUAL; }
- static std::atomic<int32_t> nextDisplayId;
- int32_t displayId = nextDisplayId++;
+ int32_t sequenceId = sNextSequenceId++;
DisplayDevice::DisplayType type = DisplayDevice::DISPLAY_ID_INVALID;
sp<IGraphicBufferProducer> surface;
uint32_t layerStack = DisplayDevice::NO_LAYER_STACK;
@@ -286,6 +281,9 @@
uint32_t height = 0;
std::string displayName;
bool isSecure = false;
+
+private:
+ static std::atomic<int32_t> sNextSequenceId;
};
class DisplayRenderArea : public RenderArea {