Add isVirtual flag to SF trace display

Bug: 140855415
Test: atest FlickerLibTest
Change-Id: Ifb0159a57cfa5cad4b5831d505653ecf39024eb7
diff --git a/libraries/flicker/src/com/android/server/wm/traces/common/layers/Display.kt b/libraries/flicker/src/com/android/server/wm/traces/common/layers/Display.kt
index 1dfa94e..fe7afb6 100644
--- a/libraries/flicker/src/com/android/server/wm/traces/common/layers/Display.kt
+++ b/libraries/flicker/src/com/android/server/wm/traces/common/layers/Display.kt
@@ -28,7 +28,8 @@
     val layerStackId: Int,
     val size: Size,
     val layerStackSpace: Rect,
-    val transform: Transform
+    val transform: Transform,
+    val isVirtual: Boolean
 ) {
     override fun equals(other: Any?): Boolean {
         if (this === other) return true
@@ -40,6 +41,7 @@
         if (size != other.size) return false
         if (layerStackSpace != other.layerStackSpace) return false
         if (transform != other.transform) return false
+        if (isVirtual != other.isVirtual) return false
 
         return true
     }
@@ -51,6 +53,7 @@
         result = 31 * result + size.hashCode()
         result = 31 * result + layerStackSpace.hashCode()
         result = 31 * result + transform.hashCode()
+        result = 31 * result + isVirtual.hashCode()
         return result
     }
 
@@ -61,7 +64,8 @@
             layerStackId = -1,
             size = Size.EMPTY,
             layerStackSpace = Rect.EMPTY,
-            transform = Transform.EMPTY
+            transform = Transform.EMPTY,
+            isVirtual = false
         )
     }
 }
\ No newline at end of file
diff --git a/libraries/flicker/src/com/android/server/wm/traces/parser/layers/LayersTraceParser.kt b/libraries/flicker/src/com/android/server/wm/traces/parser/layers/LayersTraceParser.kt
index d06f727..16d2fd0 100644
--- a/libraries/flicker/src/com/android/server/wm/traces/parser/layers/LayersTraceParser.kt
+++ b/libraries/flicker/src/com/android/server/wm/traces/parser/layers/LayersTraceParser.kt
@@ -204,7 +204,8 @@
                 proto.layerStack,
                 proto.size.toSize(),
                 proto.layerStackSpaceRect.toRect(),
-                Transform(proto.transform, position = null)
+                Transform(proto.transform, position = null),
+                proto.isVirtual
             )
         }