Add support for enabling GraphiteVkRenderEngine in SurfaceFlinger
Predicated on just the graphite_renderengine flag (overridable with
the debug.renderengine.graphite sysprops), which inherently implies
GraphicsApi::VK.
As currently implemented, setting the old debug.renderengine.backend
sysprop (e.g. "skiavkthreaded") will fully override this logic,
preventing Graphite from being enabled. This approach is simpler, but
also maintains backwards compatibility, and distances the new approach
from that restrictive terminology.
Note that the approach for actually instantiating a RenderEngine
instance extends the existing RenderEngine::create(args) model, forcing
the caller to know exactly which concrete subclass they wish to
instantiate. This could be reworked in the future.
Test: local validation (sysprops + logs)
Bug: b/293371537
Change-Id: Iff0a8894725fc45e679074ddc2e4af56cca318c6
diff --git a/services/surfaceflinger/common/FlagManager.cpp b/services/surfaceflinger/common/FlagManager.cpp
index 6507aba..d9334d6 100644
--- a/services/surfaceflinger/common/FlagManager.cpp
+++ b/services/surfaceflinger/common/FlagManager.cpp
@@ -139,6 +139,7 @@
DUMP_READ_ONLY_FLAG(protected_if_client);
DUMP_READ_ONLY_FLAG(ce_fence_promise);
DUMP_READ_ONLY_FLAG(idle_screen_refresh_rate_timeout);
+ DUMP_READ_ONLY_FLAG(graphite_renderengine);
#undef DUMP_READ_ONLY_FLAG
#undef DUMP_SERVER_FLAG
#undef DUMP_FLAG_INTERVAL
@@ -227,6 +228,7 @@
FLAG_MANAGER_READ_ONLY_FLAG(dont_skip_on_early_ro, "")
FLAG_MANAGER_READ_ONLY_FLAG(protected_if_client, "")
FLAG_MANAGER_READ_ONLY_FLAG(ce_fence_promise, "");
+FLAG_MANAGER_READ_ONLY_FLAG(graphite_renderengine, "debug.renderengine.graphite")
/// Trunk stable server flags ///
FLAG_MANAGER_SERVER_FLAG(refresh_rate_overlay_on_external_display, "")