SF: Introduce LayerTraceGenerator
Generates layer traces from transaction traces. The tool is a custom
surface flinger build that mocks out most everything else apart from
the front end logic. Transaction traces are written when the
transaction is applied, along with a timestamp and vsync id. The
transactions are parsed from proto, and applied to recreate the
layer state and output the result into a layer trace.
Test: presubmit
Bug: 200284593
Change-Id: If90a23b9310dbafbdca597b7f5178e40c8b86022
diff --git a/services/surfaceflinger/tests/unittests/Android.bp b/services/surfaceflinger/tests/unittests/Android.bp
index 1db5e61..58cd7ba 100644
--- a/services/surfaceflinger/tests/unittests/Android.bp
+++ b/services/surfaceflinger/tests/unittests/Android.bp
@@ -42,6 +42,7 @@
cc_test {
name: "libsurfaceflinger_unittest",
defaults: [
+ "libsurfaceflinger_mocks_defaults",
"skia_renderengine_deps",
"surfaceflinger_defaults",
],
@@ -122,6 +123,10 @@
"VSyncReactorTest.cpp",
"VsyncConfigurationTest.cpp",
],
+}
+
+cc_defaults {
+ name: "libsurfaceflinger_mocks_defaults",
static_libs: [
"android.hardware.common-V2-ndk",
"android.hardware.common.fmq-V1-ndk",
@@ -193,3 +198,8 @@
"libsurfaceflinger_headers",
],
}
+
+cc_library_headers {
+ name: "libsurfaceflinger_mocks_headers",
+ export_include_dirs: ["."],
+}