Use case
Flutter GPU can be compiled into some toolchains when impeller_supports_rendering is false, even though creating a usable GpuContext already requires Impeller at runtime. This makes implementation code carry redundant !IMPELLER_SUPPORTS_RENDERING paths and can obscure which native symbols and files are expected to exist in non-rendering builds.
This came up while adding GpuSurface, where the surface implementation depends on DlImageImpeller and only makes sense when Impeller rendering support is compiled in.
Proposal
Split the Flutter GPU native build so non-rendering configurations compile only the minimal code needed to report the existing clean GpuContext initialization error, while the full Flutter GPU implementation is compiled only when impeller_supports_rendering is true.
As part of this cleanup, remove redundant non-rendering runtime branches from implementation files and verify that Dart @Native imports and symbol resolution still behave correctly in configurations where Flutter GPU is unavailable.
Use case
Flutter GPU can be compiled into some toolchains when
impeller_supports_renderingis false, even though creating a usableGpuContextalready requires Impeller at runtime. This makes implementation code carry redundant!IMPELLER_SUPPORTS_RENDERINGpaths and can obscure which native symbols and files are expected to exist in non-rendering builds.This came up while adding
GpuSurface, where the surface implementation depends onDlImageImpellerand only makes sense when Impeller rendering support is compiled in.Proposal
Split the Flutter GPU native build so non-rendering configurations compile only the minimal code needed to report the existing clean
GpuContextinitialization error, while the full Flutter GPU implementation is compiled only whenimpeller_supports_renderingis true.As part of this cleanup, remove redundant non-rendering runtime branches from implementation files and verify that Dart
@Nativeimports and symbol resolution still behave correctly in configurations where Flutter GPU is unavailable.