Add graphite_renderengine_compile_only to SF flags
This will be used to guard compilation of Graphite in RenderEngine.
Enabling the flag will ONLY compile Graphite, but not enable it. The
debug.renderengine.graphite system property could then be set to true to
enable Graphite in RenderEngine.
The existing graphite_renderengine flag will both compile and enable
Graphite in RenderEngine.
Compilation is gated on a logical inclusive OR of the two flags.
Bug: b/293371537
Bug: b/331678326
Bug: b/341728634
Test: compiles
Change-Id: I4d6408b5e65b8b8862c79086dba2f4ce56a3d179
diff --git a/services/surfaceflinger/common/FlagManager.cpp b/services/surfaceflinger/common/FlagManager.cpp
index b78809a..b7ec6e0 100644
--- a/services/surfaceflinger/common/FlagManager.cpp
+++ b/services/surfaceflinger/common/FlagManager.cpp
@@ -149,6 +149,7 @@
DUMP_READ_ONLY_FLAG(local_tonemap_screenshots);
DUMP_READ_ONLY_FLAG(override_trusted_overlay);
DUMP_READ_ONLY_FLAG(flush_buffer_slots_to_uncache);
+ DUMP_READ_ONLY_FLAG(force_compile_graphite_renderengine);
#undef DUMP_READ_ONLY_FLAG
#undef DUMP_SERVER_FLAG
@@ -248,6 +249,7 @@
FLAG_MANAGER_READ_ONLY_FLAG(local_tonemap_screenshots, "debug.sf.local_tonemap_screenshots");
FLAG_MANAGER_READ_ONLY_FLAG(override_trusted_overlay, "");
FLAG_MANAGER_READ_ONLY_FLAG(flush_buffer_slots_to_uncache, "");
+FLAG_MANAGER_READ_ONLY_FLAG(force_compile_graphite_renderengine, "");
/// Trunk stable server flags ///
FLAG_MANAGER_SERVER_FLAG(refresh_rate_overlay_on_external_display, "")
diff --git a/services/surfaceflinger/common/include/common/FlagManager.h b/services/surfaceflinger/common/include/common/FlagManager.h
index 302d311..8f98ed3 100644
--- a/services/surfaceflinger/common/include/common/FlagManager.h
+++ b/services/surfaceflinger/common/include/common/FlagManager.h
@@ -88,6 +88,7 @@
bool local_tonemap_screenshots() const;
bool override_trusted_overlay() const;
bool flush_buffer_slots_to_uncache() const;
+ bool force_compile_graphite_renderengine() const;
protected:
// overridden for unit tests
diff --git a/services/surfaceflinger/surfaceflinger_flags.aconfig b/services/surfaceflinger/surfaceflinger_flags.aconfig
index dea74d0..56bca7f 100644
--- a/services/surfaceflinger/surfaceflinger_flags.aconfig
+++ b/services/surfaceflinger/surfaceflinger_flags.aconfig
@@ -161,7 +161,7 @@
flag {
name: "graphite_renderengine"
namespace: "core_graphics"
- description: "Use Skia's Graphite Vulkan backend in RenderEngine."
+ description: "Compile AND enable Skia's Graphite Vulkan backend in RenderEngine. See also: force_compile_graphite_renderengine."
bug: "293371537"
is_fixed_read_only: true
}
diff --git a/services/surfaceflinger/surfaceflinger_flags_new.aconfig b/services/surfaceflinger/surfaceflinger_flags_new.aconfig
index 0772891..ee12325 100644
--- a/services/surfaceflinger/surfaceflinger_flags_new.aconfig
+++ b/services/surfaceflinger/surfaceflinger_flags_new.aconfig
@@ -66,6 +66,14 @@
} # flush_buffer_slots_to_uncache
flag {
+ name: "force_compile_graphite_renderengine"
+ namespace: "core_graphics"
+ description: "Compile Skia's Graphite Vulkan backend in RenderEngine, but do NOT enable it, unless graphite_renderengine is also set. It can also be enabled with the debug.renderengine.graphite system property for testing. In contrast, the graphite_renderengine flag both compiles AND enables Graphite in RenderEngine."
+ bug: "293371537"
+ is_fixed_read_only: true
+} # force_compile_graphite_renderengine
+
+flag {
name: "frame_rate_category_mrr"
namespace: "core_graphics"
description: "Enable to use frame rate category and newer frame rate votes such as GTE in SurfaceFlinger scheduler, to guard dVRR changes from MRR devices"