Benson Luk d8d6d161d7
Fix compiler.gni logic around when to generate reflection state.
- This used to incorrectly generate reflection state whenever the last shader_target_flags is not "--sksl".
  - Instead, generate reflection state when any non-runtime target is in shader_target_flags.
  - Consolidate some of the if/else logic to reduce duplicate code.
Remove the TargetPlatformNeedsReflection check in impeller_main.cc.
  - Instead, whether reflection state is generated depends only on the presence or absense of "reflection_{json|header|cc}_name" flags.
  - The logic of whether to include these flags is already in compiler.gni. So it's redundant to also have logic for whether to generate the reflection state here.
  - The TargetPlatformNeedsReflection method had faulty logic.
    - It returned true for everything except SkSL, even though reflection state isn't needed for runtime targets.
    - It was called on the target from Switches::SelectDefaultTargetPlatform. When impellerc is used with multiple runtime targets, this would return the runtime target that is first alphabetically by flag name. So if --sksl is provided along with any other --runtime-stage-* target, SelectDefaultTargetPlatform returns the non-sksl runtime target. Effectively this meant that TargetPlatformNeedsReflection returns true except for when --sksl is the only provided runtime target.
  - Removes the TargetPlatformNeedsReflection function entirely.
2026-02-18 15:55:23 -08:00
..
2025-10-09 19:44:25 +00:00

Flutter Engine

Setting up the Engine development environment

See here