For consistency, I don't think we have any other tools with `-`'s.
I'll be honest - this seemed easier than teaching the header guard tool
how to handle `-`'s in directory names, but if you feel strongly about
it I can revert.
This benchmark includes things like allocating geometry/contents, path conversions, et cetera. It doesn't include dispatching or GPU work, but should make it easier to see improvements/regressions in the efficiency of this code.
## Description
This moves the state update to only happen on realizing the window instead of at initialization time, based on [the comment from](https://github.com/flutter/flutter/issues/137262#issuecomment-1792020246) @robert-ancell .
## Related Issues
- https://github.com/flutter/flutter/issues/137262
## Tests
- I tried to add tests, but it doesn't seem possible to create a view without an actual display connected (and making a mock of it defeats the purpose of the test). I'm happy to be proven wrong, though.
This removes skips for the golden tests in `//testing/dart/canvas_test.dart` and instead passes them up to Skia gold.
Adds a utility class for dealing with Skia gold from these tests, as well as the existing fuzzy identical image comparison for tests that just want to do in memory comparison of images generated from the same test.
Removes the old golden files that were in tree.
Part of https://github.com/flutter/flutter/issues/53784
As part of eliminating the Flutter buildroot (https://github.com/flutter/flutter/issues/67373), we are moving all third-party dependencies from //third_party to //flutter/third_party.
Once all third-party dependencies have been migrated, tooling and config will be moved and the buildroot will be eliminated altogether.
No tests changed because there is no semantic change to this PR. This is simply relocating a dependency.
The Impeller ContextVK contains a ConcurrentMessageLoop whose threads may invoke Dart timeline APIs. The Dart APIs will create a thread-local object that will be deleted during thread shutdown. Therefore, these threads should not outlive the engine/Shell and Dart VM.
Previously, RunTester held the ImpellerVulkanContextHolder on the stack, and its reference to the ContextVK would be dropped while exiting the function after the Shell is destructed.
This PR moves the contents of the tester's ImpellerVulkanContextHolder out of the instance on the stack and into a lambda owned by the Shell.
It also reenables the flutter_tester Impeller tests in the run_tests script.
This patch does the following:
- Updates `flutter_tester` to set up an Impeller rendering context and surface if `--enable-impeller` is set to true, using the Vulkan backend with Swiftshader.
- Updates `run_tests.py` to run all tests except the smoke test (that one really has no rendering impact whatsoever) with and without `--enable-impeller`.
- Updates a few tests to work that were trivial:
- A couple tests needed updated goldens for very minor rendering differences. Filed https://github.com/flutter/flutter/issues/135684 to track using Skia gold for this instead.
- Disabled SKP screenshotting if Impeller is enabled, and updated the test checking that to verify an error is thrown if an SKP is requested.
- The Dart GPU based test now asserts that the gpu context is available if Impeller is enabled, and does not deadlock if run in a single threaded mode.
- We were missing some trace events around `Canvas::SaveLayer` for Impeller as compared to Skia.
- A couple other tests had strict checks about exception messages that are slightly different between Skia and Impeller.
- I've filed bugs for other tests that may require a little more work, and skipped them for now. For FragmentProgram on Vulkan I reused an existing bug.
This is part of my attempt to address https://github.com/flutter/flutter/issues/135693, although @chinmaygarde and I had slightly different ideas about how to do this.
The goals here are:
- Run the Dart unit tests we already have with Impeller enabled.
- Enable running more of the framework tests (including gold tests) with Impeller enabled.
- Run all of these tests via public `dart:ui` API rather than mucking around in C++ internals in the engine.
This PR creates a new test type for `run_tests.py` called `dart-host`.
The tests remaining under the `dart` type are tests that run in
`flutter_tester`. The `dart-host` tests run in the Dart CLI. This allows
`run_tests.py` to be simplified a bit, and while doing this I spotted a
couple of mistakes that were causing some tests not to run.
This PR also makes a couple of small style fixes to the build config
json files, converting tabs to spaces, and moving some "script" fields
before the "parameters" fields.
This PR changes run_tests.py to use the python logging library to report
results instead of direct prints or writes to stdout/stderr. This change
simplifies adding a `--quiet` flag that causes the script to only
generate output if a log is emitted at WARNING or above.
Overall this is a bit of progress toward landing something like
https://github.com/flutter/engine/pull/45595
As discussed offline, this is best deleted when Skia-gold is used for
all of our engine tests.
However, this will be useful for unblocking some PRs until then :)
See README.md for details!
Partial work towards re-landing #44936.
Both the `clang_tidy` and `githooks` passage could benefit from being
able to automatically find the latest `compile_commands.json` output,
which means that some common code should exist in the `tools/`
directory.
This is a very minimal (but tested) library for doing exactly that.
Previously, some common Darwin framework targets existed in:
//flutter/shell/platform/darwin/BUILD.gn
This moves all targets into:
//flutter/shell/platform/darwin/common/BUILD.gn
The framework_shared target has been renamed framework_common for consistency with the directory name, and flutter_channels_unittests has been renamed framework_common_unittests since it's a reasonable target for adding other tests of common framework code.
We also de-duplicate targets with existing targets.
* The `flutter_channels` target duplicates the existing
`framework_shared` target.
* The `common` target already includes the buffer conversions
translation units,
which are only used by the iOS embedder.
No test changes since there are no semantic changes, just a
restructuring of build targets.
## Pre-launch Checklist
- [X] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [X] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [X] I read and followed the [Flutter Style Guide] and the [C++,
Objective-C, Java style guides].
- [X] I listed at least one issue that this PR fixes in the description
above.
- [ ] I added new tests to check the change I am making or feature I am
adding, or Hixie said the PR is test-exempt. See [testing the engine]
for instructions on writing and running engine tests.
- [X] I updated/added relevant documentation (doc comments with `///`).
- [X] I signed the [CLA].
- [X] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel
on [Discord].
<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[C++, Objective-C, Java style guides]:
https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
[testing the engine]:
https://github.com/flutter/flutter/wiki/Testing-the-engine
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
Re-submit the changes to enable windows pre-push checks.
This patch changes how `ci/bin/format.dart` generate diffs from `diff` and `patch` commands to `git diff` and `git apply` in order to have a common method for these operations on all platforms. Windows installations don't have diff and patch commands available by default and many implementations which provide such commands work differently than the UN*X tools. Git however works consistently across all platforms.
Additionally, this patch also changes the python executable in some of the pre-push components affected by this to `vpython3` to continue the effort started at flutter/flutter#108474 and I also removed the `--no-sound-null-safety` parameter in the ci/format.sh, ci/format.bat files
NOTE: Since the original patch caused some issues, I suggest that this should be tested more carefully before it is merged.
### Issues fixed by this PR
* flutter/flutter#108122
* flutter/flutter#107920
* flutter/flutter#86506
* flutter/flutter#106615
### [flutter/tests] repo impact
None.
writing and running engine tests.
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
* Enable the same test in linux host for v2 and legacy recipes.
Dart tests were not being run in the engine v2 linux builds.
Bug: https://github.com/flutter/flutter/issues/120701
* Generate path_ops.
* Remove unopt build requirement.
* Remove the check for host_debug_unopt.
* Add shell_testing deps.
* Add path_ops.
* Build benchmarks in release.
* Enable fml benchmarks.
* Add UI benchmarks.
* Add ui_list.
* Add geometry benchmarks.
* Add remaining benchmark targets.
* Compatibility with python2 and python3
* Formatting
* Updated to use a function instead of decoding bytes in multiple places.
* Formatting and whitespace cleanup.
* Fix import statement.
* Linter change for docstring.
* Formatting.
* Remove function from run_tests.py since it is a pain to import.
* Add todo message for python 2 deprecation.
* Updated copyright year.
* wip
* extend const_finder_test to compile web dills
* add test
* add back tests, including non-const for web
* update run_tests.py
* fix whitespace
* clean up test file
* add new options to cli
* use annotation rather than explicit deny list
* clean up
* Apply suggestions from code review
Co-authored-by: Zachary Anderson <zanderso@users.noreply.github.com>
* clean up
* code review
Co-authored-by: Zachary Anderson <zanderso@users.noreply.github.com>