[SF] Use HWC api getPhysicalDisplayOrientation

With HWC3.0 we have the getPhysicalDisplayOrientation
api that can replace the sysprop ro.surface_flinger.primary_display_orientation

BUG: 184085132
Test: atest libsurfaceflinger_unittest
Change-Id: Ie2b0f8e1a81219dc8231a56b9e6174d549a4cbd1
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index fa65803..3369a86 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -256,8 +256,6 @@
     // found on devices with wide color gamut (e.g. Display-P3) display.
     static bool hasWideColorDisplay;
 
-    static ui::Rotation internalDisplayOrientation;
-
     // Indicate if device wants color management on its display.
     static const constexpr bool useColorManagement = true;
 
@@ -1145,6 +1143,9 @@
 
     bool isHdrLayer(Layer* layer) const;
 
+    ui::Rotation getPhysicalDisplayOrientation(DisplayId, bool isPrimary) const
+            REQUIRES(mStateLock);
+
     sp<StartPropertySetThread> mStartPropertySetThread;
     surfaceflinger::Factory& mFactory;
     pid_t mPid;