368 Commits

Author SHA1 Message Date
Dan Field
e4d709de85 Avoid using non-UTF-8 encoded argv more often (flutter/engine#36590) 2022-10-05 12:03:20 -07:00
gaaclarke
e41c775200 Removed instances of unnecessary values (flutter/engine#36221) 2022-09-26 21:28:04 +00:00
Jason Simmons
136cbcc67f [Impeller] Convert the ImpellerC command line arguments to UTF-8 on Windows (flutter/engine#36335) 2022-09-22 15:13:09 +00:00
Alexander Biggs
6751734343 [fuchsia] Add run_unit_tests.sh script. (flutter/engine#36308)
This is a convenience script for running unit tests locally.

To make this script work, I had to move several test exclusions
from test_suites.yaml (which controls running tests on CQ)
to the tests themselves. I think this is for the best because
it makes running the tests locally with behavior that matches
CQ easier.

Also added fuchsia_tests to build_and_copy_to_fuchsia.sh
so it builds the unit tests .far packages by default.

Tested: Ran `run_unit_tests.sh`, all tests pass. Ran
`build_and_copy_to_fuchsia.sh`, it still builds.
2022-09-21 10:40:20 -07:00
Brandon DeRosier
9ce1286f2b Resolve warnings on Windows (flutter/engine#36241) 2022-09-19 05:49:54 -07:00
Brandon DeRosier
b029ab4f73 [Impeller] Header fixes to make fml/impeller buildable against libstdc++ (flutter/engine#36240) 2022-09-19 05:49:26 -07:00
Chris Bracken
b693201c04 [lint] Update local variable names in fml (#36136) (flutter/engine#36147)
This updates local variable names to use clang `lower_case` style in the
fml directory. This is one of several patches to update our variable
names to a consistent style before enabling enforcement in our
clang-tidy rules.

This is a formatting-only change with no intended semantic change.
2022-09-14 15:47:25 -07:00
Dan Field
08312a825e Lint and fix bugprone-use-after-move violations (flutter/engine#35978) 2022-09-09 02:41:03 +00:00
gaaclarke
7a54d02e79 allows mallocmapping copies of size zero (flutter/engine#35803) 2022-08-30 18:10:25 +00:00
Tamir Duberstein
2aaeab3c9d Remove fx_logger_config_t.console_fd (flutter/engine#35302)
This was deprecated in https://fxrev.dev/708606.
2022-08-11 15:02:22 -07:00
Jason Simmons
23d5f04e7b Retain a reference to the CFRunLoop until MessageLoopDarwin::Terminate exits (flutter/engine#34735) 2022-07-19 16:56:06 +00:00
klaxxi
bec0d79eeb remove lock and use raw ptr for MessageLoopTaskQueues (flutter/engine#34249) 2022-07-18 07:08:04 +00:00
Jason Simmons
722630e73a Disable libcxx deprecation warnings for FML's use of UTF-16 string converters (flutter/engine#34551) 2022-07-08 22:37:04 +00:00
Chris Bracken
53a9648da9 [lint] Merge impeller .clang-tidy into main config (flutter/engine#33692)
Merges most (but not all) of the impeller .clang-tidy rules into the
main .clang-tidy config. Merges:

readability-identifier-naming.PrivateMemberSuffix (_)
readability-identifier-naming.EnumConstantPrefix (k)
modernize-use-default-member-init.UseAssignment
Does not merge:

readability-identifier-naming.PublicMethodCase (CamelCase)
readability-identifier-naming.PrivateMethodCase (CamelCase)
These last two are not merged due to the non-trivial number of existing
field accessors that use field_name() methods to directly return
field_name_. While these are permitted by the C++ style guide, we may
want to move to a single, simple rule and name everything in CamelCase.
These can be enabled in a followup patch.

No new tests added, since this change is style-only.
2022-06-21 11:52:42 -07:00
ColdPaleLight
412e090f98 Remove duplicate 'FML_DCHECK' in 'MessageLoopImpl::PostTask' (flutter/engine#34061) 2022-06-16 00:33:06 -07:00
Jonah Williams
b30f87212c Use std::filesystem to compute output paths in blobcat and impellerc (flutter/engine#33939) 2022-06-09 15:48:05 -07:00
Zachary Anderson
8e85a8d270 Fixes a few asan errors (flutter/engine#33632) 2022-05-26 07:29:50 -07:00
David Worsham
88c5519cfa [fuchsia] Migrate unittests to CFv2 (flutter/engine#32878) 2022-05-06 18:54:05 -07:00
Chris Bracken
09285aac02 Use empty in place of size checks vs 0 (flutter/engine#33151) 2022-05-06 13:09:04 -07:00
Zachary Anderson
98bfa2d298 Add an option to use a prebuilt impellerc (flutter/engine#33139) 2022-05-05 18:38:37 -07:00
Tamir Duberstein
d46454914d Remove reference to FX_LOG_ALL (flutter/engine#33027)
It was partially removed in
https://fuchsia-review.googlesource.com/c/fuchsia/+/674049; this commit
allows remaining references to be removed.
2022-05-01 07:06:35 -07:00
Zachary Anderson
ac2c30006a [fml] Pass OPEN_ALWAYS for create_if_necessary (flutter/engine#33033) 2022-04-30 21:06:17 -07:00
Zachary Anderson
511245230b [fml] Handle absolute paths on Windows (flutter/engine#33029) 2022-04-30 10:39:07 -07:00
Chris Bracken
0a84242538 WinUWP: Remove WinUWP sources, targets (flutter/engine#33019)
This removes:
* The Windows UWP emebedder sources and targets
* UWP-specific build targets
* UWP-specific code behind WINUWP #ifdefs
* UWP-specific TODOs.
* uwptool.exe sources and targets used for installing, uninstalling, and
  launching UWP apps.

This is a straight removal patch, and does not land any refactorings
made possible by removal of UWP support. Those patches will land in
followup refactorings.

Tool support was removed in:
https://github.com/flutter/flutter/pull/102174

The CI target was removed in:
https://github.com/flutter/engine/pull/33012

The Recipe was removed in:
https://flutter-review.googlesource.com/c/recipes/+/29500

GN build support was removed in:
https://github.com/flutter/engine/pull/33016

Issue: https://github.com/flutter/flutter/issues/102172
2022-04-29 18:39:36 -07:00
Jonah Williams
2b39f38143 fix impellerc on windows (flutter/engine#33003) 2022-04-29 14:39:02 -07:00
Dan Field
5c27c4acbf Avoid calling Dart_TimelineGetMicros when systrace is enabled (flutter/engine#32968) 2022-04-27 14:59:03 -07:00
Tamir Duberstein
f12e90982b Remove reference to deprecated field (flutter/engine#32964)
log_service_channel is being renamed to log_sink_socket.
2022-04-27 13:12:09 -07:00
Jason Simmons
d9de6d31cf Disable the timeline in release mode on Android unless systrace is enabled (flutter/engine#32909) 2022-04-26 10:54:03 -07:00
Dan Field
f51504259a Do not depend on Dart in FML (flutter/engine#32846) 2022-04-21 19:22:45 -07:00
Dan Field
9e46531319 Remove redundant trace events (flutter/engine#32812) 2022-04-21 13:28:03 -07:00
ColdPaleLight
eb3479dd86 Replace 'std::mutex' inside 'SyncSwitch' to 'fml::SharedMutex' (flutter/engine#32773) 2022-04-19 09:44:04 -07:00
Jason Simmons
c6a09145d7 Wrap the global timeline event handler callback in a std::atomic (flutter/engine#32073) 2022-03-16 16:10:06 -07:00
Ren You
c0958acf73 Add missing #include <algorithm> (flutter/engine#32003)
See b/222535478 and cl/433590918
2022-03-14 09:09:29 -07:00
Zachary Anderson
53e8808dcb Add include to header for coming libc++ updates (flutter/engine#31835) 2022-03-04 11:41:03 -08:00
Jonah Williams
75f0c30722 [win32] support high frame rates (flutter/engine#28927) 2022-03-03 12:06:06 -08:00
JsouLiang
f88b49b778 Add ThreadConfigSetter for Embedder api that can set thread priority (flutter/engine#31626) 2022-03-01 16:23:24 -08:00
Jason Simmons
da146d247c Revert "Reland "Listen for Vsync callback on the UI thread directly"" (flutter/engine#31750) 2022-03-01 15:06:11 -08:00
ColdPaleLight
1a179ecff2 Reland "Listen for Vsync callback on the UI thread directly" (flutter/engine#31494) 2022-02-24 09:51:05 -08:00
JsouLiang
493cfd9601 Define thread priority enum and set thread priority for all threads in Engine (flutter/engine#30605)
* Define thread priority enum and set thread priority for all threads in Engine

* Split out the thread data and the thread data set operator
2022-02-10 21:14:54 -08:00
Chris Bracken
8d99a8bc53 [fml] Use common FML string encoding utils (flutter/engine#31378)
General UTF8/UTF16 string conversion utility functions were recently
added to FML. This migrates calls in the Android JNI utils to the common
implementations.

No additional tests added since we're just dropping one implementation
of UTF8/UTF16 functions and making use of an equivalent set that already
has unit tests of its own. The rest of the Android-related code is
already covered by existing unit tests.

Issue: https://github.com/flutter/flutter/issues/98061
Related PR: https://github.com/flutter/engine/pull/31334
2022-02-10 14:13:59 -08:00
Chris Bracken
3e6137c8ec Migrate string encoding conversions to FML (flutter/engine#31334)
We've implemented UTF-8/UTF-16 string encoding conversions in multiple
places, from FML to //flutter/shell/platform/common, to the individual
embedders. This migrates these conversions to FML and adds tests.

Windows APIs use wchar_t-based strings and as a result, we continue to
keep Windows-specific functions in fml/platform/win/wstring_conversion.h.

We break out string_conversions into its own source set since FML brings
with it some Dart dependencies (e.g. dart_timestamp_provider.cc) that
are unused by some targets such as uwptool.exe in the Windows UWP
embedding.

Issue: https://github.com/flutter/flutter/issues/98061
2022-02-09 22:59:48 -08:00
Zachary Anderson
eca60c0b90 Add clang-analyzer-* and clang-diagnostic-* to .clang-tidy (flutter/engine#31291) 2022-02-09 12:26:34 -08:00
Brandon DeRosier
925224a9ee Prefix remaining OS defines with FML_ namespace (flutter/engine#31172) 2022-01-31 14:31:44 -08:00
Brandon DeRosier
2d4f908b9d Add FML_ prefix to fml/build_config.h macros (flutter/engine#31141) 2022-01-31 11:53:51 -08:00
Brandon DeRosier
a4052af069 Add constexpr endianness utilities to fml (flutter/engine#31118) 2022-01-28 14:51:17 -08:00
Dan Field
e7431e6a1f Re-enable Fuchsia CanWait test (flutter/engine#31095) 2022-01-26 15:10:08 -08:00
Chinmay Garde
d83fbb965a Add //flutter/fml/math.h with common math constants. (flutter/engine#30425)
This came up as I was [debugging failures on Windows](https://ci.chromium.org/p/flutter/builders/try/Windows%20Host%20Engine/30618?) due to use of the
non-portable constants.

Fixes https://github.com/flutter/flutter/issues/82216
2021-12-20 16:12:43 -08:00
Chinmay Garde
35a2ccb79a Add unconditional waits on fml::Semaphore. (flutter/engine#30165) 2021-12-07 12:49:01 -08:00
eggfly
2f9a4fba3f Remove remaining usages of getUnsafe() (flutter/engine#29941) 2021-11-29 21:24:01 -08:00
Gary Qian
9e1a29d21c Revert "Listen for Vsync callback on the UI thread directly" (flutter/engine#29923) 2021-11-24 12:33:02 -08:00