You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Moves all backend-specific renderer configuration out of
EmbedderConfigBuilder and into the backend-specific subclass of
EmbedderTestContext. EmbedderTestContext is already backend-specific and
as of recent patches, also houses compositor configuration, making it
the natural home of this code.
As a result, we no longer need backend-specific methods such as
SetSoftwareRendererConfig, SetMetalRendererConfig, etc. Nor do we need
manual backend initialization in EmbedderConfigBuilder. Nor does that
initialization any longer require relying on internal backend-specific
code within EmbedderTestContext, since we now do that initialization in
the EmbedderTestContext constructor.
Since the bulk of the work previously done by this method now occurs in
the EmbedderTestContext constructor, the only work remaining in these
methods is surface creation. Further, since theses are now implemented
in backend-specific EmbedderTestContext subclasses, they have all been
renamed to a single method: SetSurface.
Previously, all of these methods took a surface_size parameter with two
exceptions:
* SetVulkanRendererConfig also took an optional
FlutterVulkanInstanceProcAddressCallback parameter. This has been
extracted to a separate method SetVulkanInstanceProcAddressCallback on
EmbedderTestContextVulkan.
* SetSoftwareRendererConfig defaulted the parameter to a size of (1, 1).
For consistency, this is no longer defaulted, and all call sites have
been updated, consistent with other backends.
Lastly, one nice benefit is that because the render config is
initialized in the EmbedderTestContext constructor, there's no longer a
requirement to call Set*RendererConfig prior modifying any specific
properties on the config, nor is it problematic to call the updated
SetSurface method after modifying the config. Where the renderer config
was being customised in embedder unittests, I've pushed that
customisation up to the top of the test where the rest of the test
context is configured.
Issue: flutter/flutter#158998
0 commit comments