Remove usage of hwcomposer_defs.h.

Remove the usage of hwcomposer_defs.h from SurfaceFlinger codebase,
convert usage of HWC_POWER_MODE_* to use IComposerClient::PowerMode
where the sematics of power mode is needed.

Bug: b/77585359
Test: atest libsurfaceflinger_unittest
Test: atest SurfaceFlinger_test
Test: atest libcompositionengine_test
Change-Id: I6c3a5d1b007329e4d9a32732d118365d6273670a
diff --git a/services/surfaceflinger/DisplayDevice.h b/services/surfaceflinger/DisplayDevice.h
index 2b19cc5..8c86153 100644
--- a/services/surfaceflinger/DisplayDevice.h
+++ b/services/surfaceflinger/DisplayDevice.h
@@ -24,7 +24,6 @@
 #include <android/native_window.h>
 #include <binder/IBinder.h>
 #include <gui/LayerState.h>
-#include <hardware/hwcomposer_defs.h>
 #include <math/mat4.h>
 #include <renderengine/RenderEngine.h>
 #include <system/window.h>
@@ -136,8 +135,8 @@
     /* ------------------------------------------------------------------------
      * Display power mode management.
      */
-    int getPowerMode() const;
-    void setPowerMode(int mode);
+    hardware::graphics::composer::hal::PowerMode getPowerMode() const;
+    void setPowerMode(hardware::graphics::composer::hal::PowerMode mode);
     bool isPoweredOn() const;
 
     ui::Dataspace getCompositionDataSpace() const;
@@ -173,7 +172,8 @@
 
     static ui::Transform::RotationFlags sPrimaryDisplayRotationFlags;
 
-    int mPowerMode = HWC_POWER_MODE_OFF;
+    hardware::graphics::composer::hal::PowerMode mPowerMode =
+            hardware::graphics::composer::hal::PowerMode::OFF;
     HwcConfigIndexType mActiveConfig;
 
     // TODO(b/74619554): Remove special cases for primary display.
@@ -184,7 +184,7 @@
     struct Physical {
         DisplayId id;
         DisplayConnectionType type;
-        android::hardware::graphics::composer::hal::HWDisplayId hwcDisplayId;
+        hardware::graphics::composer::hal::HWDisplayId hwcDisplayId;
 
         bool operator==(const Physical& other) const {
             return id == other.id && type == other.type && hwcDisplayId == other.hwcDisplayId;
@@ -228,7 +228,8 @@
     HdrCapabilities hdrCapabilities;
     int32_t supportedPerFrameMetadata{0};
     std::unordered_map<ui::ColorMode, std::vector<ui::RenderIntent>> hwcColorModes;
-    int initialPowerMode{HWC_POWER_MODE_NORMAL};
+    hardware::graphics::composer::hal::PowerMode initialPowerMode{
+            hardware::graphics::composer::hal::PowerMode::ON};
     bool isPrimary{false};
 };