Loading libs/renderengine/include/renderengine/RenderEngine.h +8 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,14 @@ */ #define PROPERTY_DEBUG_RENDERENGINE_BACKEND "debug.renderengine.backend" /** * Allows opting particular devices into an initial preview rollout of RenderEngine on Graphite. * * Only applicable within SurfaceFlinger, and if relevant aconfig flags are enabled. */ #define PROPERTY_DEBUG_RENDERENGINE_GRAPHITE_PREVIEW_OPTIN \ "debug.renderengine.graphite_preview_optin" /** * Turns on recording of skia commands in SkiaGL version of the RE. This property * defines number of milliseconds for the recording to take place. A non zero value Loading services/surfaceflinger/SurfaceFlinger.cpp +10 −5 Original line number Diff line number Diff line Loading @@ -797,6 +797,12 @@ void SurfaceFlinger::bootFinished() { })); } bool shouldUseGraphiteIfCompiledAndSupported() { return FlagManager::getInstance().graphite_renderengine() || (FlagManager::getInstance().graphite_renderengine_preview_rollout() && base::GetBoolProperty(PROPERTY_DEBUG_RENDERENGINE_GRAPHITE_PREVIEW_OPTIN, false)); } void chooseRenderEngineType(renderengine::RenderEngineCreationArgs::Builder& builder) { char prop[PROPERTY_VALUE_MAX]; property_get(PROPERTY_DEBUG_RENDERENGINE_BACKEND, prop, ""); Loading Loading @@ -825,14 +831,13 @@ void chooseRenderEngineType(renderengine::RenderEngineCreationArgs::Builder& bui // is used by layertracegenerator (which also needs SurfaceFlinger.cpp). :) #if COM_ANDROID_GRAPHICS_SURFACEFLINGER_FLAGS_GRAPHITE_RENDERENGINE || \ COM_ANDROID_GRAPHICS_SURFACEFLINGER_FLAGS_FORCE_COMPILE_GRAPHITE_RENDERENGINE const bool useGraphite = FlagManager::getInstance().graphite_renderengine() && const bool useGraphite = shouldUseGraphiteIfCompiledAndSupported() && renderengine::RenderEngine::canSupport(kVulkan); #else const bool useGraphite = false; if (FlagManager::getInstance().graphite_renderengine()) { ALOGE("RenderEngine's Graphite Skia backend was requested with the " "debug.renderengine.graphite system property, but it is not compiled in this " "build! Falling back to Ganesh backend selection logic."); if (shouldUseGraphiteIfCompiledAndSupported()) { ALOGE("RenderEngine's Graphite Skia backend was requested, but it is not compiled in " "this build! Falling back to Ganesh backend selection logic."); } #endif const bool useVulkan = useGraphite || Loading services/surfaceflinger/common/FlagManager.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,7 @@ void FlagManager::dump(std::string& result) const { DUMP_ACONFIG_FLAG(adpf_gpu_sf); DUMP_ACONFIG_FLAG(adpf_native_session_manager); DUMP_ACONFIG_FLAG(adpf_use_fmq_channel); DUMP_ACONFIG_FLAG(graphite_renderengine_preview_rollout); /// Trunk stable readonly flags /// DUMP_ACONFIG_FLAG(adpf_fmq_sf); Loading Loading @@ -265,6 +266,7 @@ FLAG_MANAGER_ACONFIG_FLAG(begone_bright_hlg, "debug.sf.begone_bright_hlg"); FLAG_MANAGER_ACONFIG_FLAG(refresh_rate_overlay_on_external_display, "") FLAG_MANAGER_ACONFIG_FLAG(adpf_gpu_sf, "") FLAG_MANAGER_ACONFIG_FLAG(adpf_native_session_manager, ""); FLAG_MANAGER_ACONFIG_FLAG(graphite_renderengine_preview_rollout, ""); /// Trunk stable server (R/W) flags from outside SurfaceFlinger /// FLAG_MANAGER_ACONFIG_FLAG_IMPORTED(adpf_use_fmq_channel, "", android::os) Loading services/surfaceflinger/common/include/common/FlagManager.h +1 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ public: bool adpf_use_fmq_channel() const; bool adpf_native_session_manager() const; bool adpf_use_fmq_channel_fixed() const; bool graphite_renderengine_preview_rollout() const; /// Trunk stable readonly flags /// bool adpf_fmq_sf() const; Loading services/surfaceflinger/surfaceflinger_flags_new.aconfig +7 −0 Original line number Diff line number Diff line Loading @@ -172,6 +172,13 @@ flag { } } # frame_rate_category_mrr flag { name: "graphite_renderengine_preview_rollout" namespace: "core_graphics" description: "R/W flag to enable Skia's Graphite Vulkan backend in RenderEngine, IF it is already compiled with force_compile_graphite_renderengine, AND the debug.renderengine.graphite_preview_optin sysprop is set to true." bug: "293371537" } # graphite_renderengine_preview_rollout flag { name: "latch_unsignaled_with_auto_refresh_changed" namespace: "core_graphics" Loading Loading
libs/renderengine/include/renderengine/RenderEngine.h +8 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,14 @@ */ #define PROPERTY_DEBUG_RENDERENGINE_BACKEND "debug.renderengine.backend" /** * Allows opting particular devices into an initial preview rollout of RenderEngine on Graphite. * * Only applicable within SurfaceFlinger, and if relevant aconfig flags are enabled. */ #define PROPERTY_DEBUG_RENDERENGINE_GRAPHITE_PREVIEW_OPTIN \ "debug.renderengine.graphite_preview_optin" /** * Turns on recording of skia commands in SkiaGL version of the RE. This property * defines number of milliseconds for the recording to take place. A non zero value Loading
services/surfaceflinger/SurfaceFlinger.cpp +10 −5 Original line number Diff line number Diff line Loading @@ -797,6 +797,12 @@ void SurfaceFlinger::bootFinished() { })); } bool shouldUseGraphiteIfCompiledAndSupported() { return FlagManager::getInstance().graphite_renderengine() || (FlagManager::getInstance().graphite_renderengine_preview_rollout() && base::GetBoolProperty(PROPERTY_DEBUG_RENDERENGINE_GRAPHITE_PREVIEW_OPTIN, false)); } void chooseRenderEngineType(renderengine::RenderEngineCreationArgs::Builder& builder) { char prop[PROPERTY_VALUE_MAX]; property_get(PROPERTY_DEBUG_RENDERENGINE_BACKEND, prop, ""); Loading Loading @@ -825,14 +831,13 @@ void chooseRenderEngineType(renderengine::RenderEngineCreationArgs::Builder& bui // is used by layertracegenerator (which also needs SurfaceFlinger.cpp). :) #if COM_ANDROID_GRAPHICS_SURFACEFLINGER_FLAGS_GRAPHITE_RENDERENGINE || \ COM_ANDROID_GRAPHICS_SURFACEFLINGER_FLAGS_FORCE_COMPILE_GRAPHITE_RENDERENGINE const bool useGraphite = FlagManager::getInstance().graphite_renderengine() && const bool useGraphite = shouldUseGraphiteIfCompiledAndSupported() && renderengine::RenderEngine::canSupport(kVulkan); #else const bool useGraphite = false; if (FlagManager::getInstance().graphite_renderengine()) { ALOGE("RenderEngine's Graphite Skia backend was requested with the " "debug.renderengine.graphite system property, but it is not compiled in this " "build! Falling back to Ganesh backend selection logic."); if (shouldUseGraphiteIfCompiledAndSupported()) { ALOGE("RenderEngine's Graphite Skia backend was requested, but it is not compiled in " "this build! Falling back to Ganesh backend selection logic."); } #endif const bool useVulkan = useGraphite || Loading
services/surfaceflinger/common/FlagManager.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,7 @@ void FlagManager::dump(std::string& result) const { DUMP_ACONFIG_FLAG(adpf_gpu_sf); DUMP_ACONFIG_FLAG(adpf_native_session_manager); DUMP_ACONFIG_FLAG(adpf_use_fmq_channel); DUMP_ACONFIG_FLAG(graphite_renderengine_preview_rollout); /// Trunk stable readonly flags /// DUMP_ACONFIG_FLAG(adpf_fmq_sf); Loading Loading @@ -265,6 +266,7 @@ FLAG_MANAGER_ACONFIG_FLAG(begone_bright_hlg, "debug.sf.begone_bright_hlg"); FLAG_MANAGER_ACONFIG_FLAG(refresh_rate_overlay_on_external_display, "") FLAG_MANAGER_ACONFIG_FLAG(adpf_gpu_sf, "") FLAG_MANAGER_ACONFIG_FLAG(adpf_native_session_manager, ""); FLAG_MANAGER_ACONFIG_FLAG(graphite_renderengine_preview_rollout, ""); /// Trunk stable server (R/W) flags from outside SurfaceFlinger /// FLAG_MANAGER_ACONFIG_FLAG_IMPORTED(adpf_use_fmq_channel, "", android::os) Loading
services/surfaceflinger/common/include/common/FlagManager.h +1 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ public: bool adpf_use_fmq_channel() const; bool adpf_native_session_manager() const; bool adpf_use_fmq_channel_fixed() const; bool graphite_renderengine_preview_rollout() const; /// Trunk stable readonly flags /// bool adpf_fmq_sf() const; Loading
services/surfaceflinger/surfaceflinger_flags_new.aconfig +7 −0 Original line number Diff line number Diff line Loading @@ -172,6 +172,13 @@ flag { } } # frame_rate_category_mrr flag { name: "graphite_renderengine_preview_rollout" namespace: "core_graphics" description: "R/W flag to enable Skia's Graphite Vulkan backend in RenderEngine, IF it is already compiled with force_compile_graphite_renderengine, AND the debug.renderengine.graphite_preview_optin sysprop is set to true." bug: "293371537" } # graphite_renderengine_preview_rollout flag { name: "latch_unsignaled_with_auto_refresh_changed" namespace: "core_graphics" Loading