Commit Graph

6 Commits

Author SHA1 Message Date
Lau Ching Jun
ac7879e2aa
Avoid depending on files from build_system/targets other than from top level entrypoints in flutter_tools. (#142760)
Add a new `BuildTargets` class that provides commonly used build targets. And avoid importing files from `build_system/targets` except from the top level entrypoints or from top level commands.

Also move `scene_importer.dart` and `shader_compiler.dart` into `build_system/tools` because they are not `Target` classes, but wrapper for certain tools.

With this change, we can ignore all files in `build_system/targets` internally and make PR #142709 easier to land internally. See cl/603434066 for the corresponding internal change.

Related to:
https://github.com/flutter/flutter/pull/142709
https://github.com/flutter/flutter/issues/142041

Also note that I have opted to add a new variable in `globals.dart` for `BuildTargets` in this PR, but I know that we are trying to get rid of globals. Several alternatives that I was considering:

1. Add a new field in `BuildSystem` that returns a `BuildTargets` instance. Since `BuildSystem` is already in `globals`, we can access build targets using `globals.buildSystem.buildTargets` without adding a new global variable.
2. Properly inject the `BuildTargetsImpl` instance from the top level `executable.dart` and top level commands.

Let me know if you want me to do one of the above instead. Thanks!
2024-02-02 18:23:08 +00:00
Dan Field
c417c4623c
Refactor ShaderTarget to not explicitly mention impeller or Skia (#141460)
Refactors `ShaderTarget` to make it opaque as to whether it's using Impeller or SkSL and instead has it focus on the target platform it's generating for.

ImpellerC includes SkSL right now whether you ask for it or not. 

The tester target also might need SkSL or Vulkan depending on whether `--enable-impeller` is passed.
2024-01-31 21:30:02 +00:00
Jonah Williams
59ecc75748
[flutter_tools] add uint compilation test (#115317)
* [flutter_tools] add uint compilation test

* Update shader_compiler_test.dart
2022-11-15 01:39:59 +00:00
Jonah Williams
e4e902dced
[flutter_tools] add compilation failure tests for new cases added in impellerc (#114757) 2022-11-07 20:59:13 +00:00
Jonah Williams
4f19a9fa46
[flutter_tools] Add support for compiling shaders to JSON bundle for web (#114295) 2022-10-31 16:52:09 +00:00
Zachary Anderson
4dd9d49608
[flutter_tools] Adds test of impellerc output file mode (#109190) 2022-08-09 15:08:06 +00:00