Make NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY transforms sticky

When a client sets the NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY flag, the buffer producer may
override the flag if it sets a buffer transform. The second issue is that SurfaceFlinger may
apply a transform hint based on display orientation which may be applied by the buffer
producer.

The flag NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY indicates the client wants to submit buffers
in the same orientation regardless of display orientation. So if the flag is set, make it
sticky until the surface is disconnected. Secondly, ignore the transform hint if the flag is
set.

Test: Launch test app and test seamless rotation in portrait mode and landscape mode
Test: go/wm-smoke
Test: atest libsurfaceflinger_unittest libgui_test SurfaceFlinger_test
Bug: 127953232
Change-Id: Ic153faae0f3cdc9d385cdfe8162d3caabac60901
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index 7965245..aa7ff81 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -1225,10 +1225,8 @@
 
 void Layer::updateTransformHint(const sp<const DisplayDevice>& display) const {
     uint32_t orientation = 0;
-    // Disable setting transform hint if the debug flag is set or if the
-    // getTransformToDisplayInverse flag is set and the client wants to submit buffers
-    // in one orientation.
-    if (!mFlinger->mDebugDisableTransformHint && !getTransformToDisplayInverse()) {
+    // Disable setting transform hint if the debug flag is set.
+    if (!mFlinger->mDebugDisableTransformHint) {
         // The transform hint is used to improve performance, but we can
         // only have a single transform hint, it cannot
         // apply to all displays.