Ignore local transforms when mirroring a partial hierarchy
When mirroring a partial hierarchy remove the local transform
on the mirrored root. This is necessary because we are placing
the mirrored root under a new parent layer and its original
position relative to the old parent is no longer relevant. This
fixes offsets when mirroring a freeform window.
Flag: com.android.graphics.surfaceflinger.flags.detached_mirror
Fixes: 337845753
Test: atest libsurfaceflinger_unittest
Change-Id: I0453026217f62868a4f6d1362cdc8187baf3f9b0
diff --git a/services/surfaceflinger/surfaceflinger_flags_new.aconfig b/services/surfaceflinger/surfaceflinger_flags_new.aconfig
index 4a60987..4d3195d 100644
--- a/services/surfaceflinger/surfaceflinger_flags_new.aconfig
+++ b/services/surfaceflinger/surfaceflinger_flags_new.aconfig
@@ -32,6 +32,17 @@
}
} # deprecate_vsync_sf
+ flag {
+ name: "detached_mirror"
+ namespace: "window_surfaces"
+ description: "Ignore local transform when mirroring a partial hierarchy"
+ bug: "337845753"
+ is_fixed_read_only: true
+ metadata {
+ purpose: PURPOSE_BUGFIX
+ }
+} # deprecate_vsync_sf
+
flag {
name: "frame_rate_category_mrr"
namespace: "core_graphics"