76 Commits

Author SHA1 Message Date
Chinmay Garde
f3d7a76e97
Make scoped_nsprotocol::release() private. (#21467)
This is not used anywhere in the engine. However, this API is easy to misuse as
one might incorrectly assume that it releases the reference on the underlying
object. Callers must use `reset` for this purpose.
2020-09-28 14:02:21 -07:00
Chris Bracken
08dabe9601
Clean up C++ includes (#21127)
Cleans up header order/grouping for consistency: associated header, C/C++ system/standard library headers, library headers, platform-specific #includes.

Adds <cstring> where strlen, memcpy are being used: there are a bunch of places we use them transitively.

Applies linter-required cleanups. Disables linter on one file due to included RapidJson header. See https://github.com/flutter/flutter/issues/65676

This patch does not cover flutter/shell/platform/darwin. There's a separate, slightly more intensive cleanup for those in progress.
2020-09-11 21:18:35 -07:00
Chris Bracken
16b900b63e
Prefer C++ standard headers to their C counterpart (#21091)
We currently use a mix of C standard includes (e.g. limits.h) and their
C++ variants (e.g. climits). This migrates to a consistent style for all
cases where the C++ variants are acceptable, but leaves the C
equivalents in place where they are required, such as in the embedder
API and other headers that may be used from C.
2020-09-11 17:10:00 -07:00
Greg Spencer
e23e4775ae
Lint fixes for fml, tools subdirs (#19990)
This does lint fixes for the fml and tools subdirs.
2020-07-30 12:40:31 -07:00
gaaclarke
21efd7325e
Made the linter print out more information in its output and fixed bugs (#19895) 2020-07-22 15:38:09 -07:00
zljj0818
fb1e5cfa25
fix AttachCurrentThread override thread name issue (#18815) 2020-06-08 12:03:03 -07:00
George Wright
80093aaa4b
Implement WriteAtomically using write/fsync on all platforms, and enable (#18320) 2020-05-21 12:07:03 -07:00
David Worsham
1429534707
fuchsia: Fix runtime_tests and shell_tests (#18492) 2020-05-20 18:47:02 -07:00
George Wright
cdc5ed3ad9
Set caches directory on Fuchsia (#18321) 2020-05-20 11:05:55 -07:00
Chinmay Garde
e56b335ade
Allow external texture sources when using the Metal backend. (#17154) 2020-03-22 22:36:03 -07:00
Chinmay Garde
a37560a074
Use the standard [[nodiscard]] attribute instead of an FML macro. (#17100) 2020-03-11 13:36:01 -07:00
George Wright
15062ca7a2
Revert "Re-arm timer as necessary in MessageLoopFuchsia" (#16568)
This reverts commit 8ec994b4d6addbe730a0f1044ee63593e5f842c3.
2020-02-12 17:22:02 -08:00
Dan Field
d589ddea68
Fix text range logic for a11y (#16496)
Make sure that a text range at the end of the string is still valid.
2020-02-07 12:20:30 -08:00
stuartmorgan
9ad81dae16
Wrap strdup to use compliant name on Windows (#16372)
A number of POSIX methods were renamed on Windows to match standards
requirements, giving deprecation warnings when calling strdup on Windows.
This adds a wrapper, to allow calling _strdup on Windows instead.

Part of #16256
2020-02-05 22:32:56 -08:00
stuartmorgan
1cd8f3b1aa
Fix and consolidate wstring conversion utils (#16342)
There were two variants of string/wstring conversion utils, one using
codecvt_utf8 and the other using codecvt_utf8_utf16. We want the latter,
since we want to be using UTF-16, not UCS2.
2020-02-04 13:33:07 -08:00
stuartmorgan
465529531b
Fix Windows file checks of unicode paths (#16105) 2020-01-30 15:43:02 -08:00
Dan Field
89f3471fa7
the the fix (#15973) 2020-01-24 12:43:32 -08:00
George Wright
8ec994b4d6 Re-arm timer as necessary in MessageLoopFuchsia 2020-01-23 18:54:49 -08:00
George Wright
1d3bb8c271
Fix message_loop_fuchsia and thus enable fml_tests and flow_tests for Fuchsia (#14583) 2019-12-19 17:25:06 -05:00
Kaushik Iska
e65b4901fa
[animator] Pass target frametime for Window.onBeginFrame (#14318)
This gives us a time closer to when the frame will be rendered on
screen.

Fixes: https://github.com/flutter/flutter/issues/10850
2019-12-12 15:03:27 -08:00
David Worsham
e2aa235ab8
Fix most fml tests on Fuchsia (#14007)
* Add fuchsia MessageLoopImpl; fix several tests
2019-11-25 14:16:50 -08:00
gaaclarke
89e395853c
Refactor to passing functions by const ref (#13975)
Moved our code to passing functions by const ref
2019-11-22 12:20:02 -08:00
Jason Simmons
7fe505ca3c
Duplicate the directory fd in fml::VisitFiles (#13448)
The fd passed to fdopendir will be unusable afterward.  Using a duplicate
preserves the validity of the original directory fd passed to VisitFiles.

Fixes https://github.com/flutter/flutter/issues/43844
2019-10-31 10:35:52 -07:00
liyuqian
df0e911c67
SkSL precompile (#12412)
For https://github.com/flutter/flutter/issues/40686

Unit tests added:
- CacheSkSLWorks
- VisitFilesCanBeCalledTwice
- CanListFilesRecursively
2019-10-08 11:51:28 -07:00
Jason Simmons
7711efbf06
Return an empty mapping for an empty file asset (#10815)
Fixes https://github.com/flutter/flutter/issues/36574
2019-08-13 10:02:59 -07:00
Jason Simmons
5d9f7b18e6
Log dlopen errors only in debug mode (#9890)
dlopen errors are expected behavior when locating libapp.so on some older
Android devices (see https://github.com/flutter/engine/pull/9762)
2019-07-17 12:51:03 -07:00
Chris Bracken
0f1ff3bdb3
Correct typos, adopt US spellings (#9081)
Corects a bnuch of typeos throughout teh engien codebsae. Also makes
a couple minor Commonwealth -> US spelling adjustments for consistency
with the rest of Flutter's codebase.

Made use of `misspell` tool:
https://github.com/client9/misspell
2019-05-25 13:14:46 -07:00
Dan Field
57bf1c0968
Fix crash when cursor ends up at invalid position (#8747) 2019-04-26 15:43:44 -07:00
Chinmay Garde
ca1d163d45
Support message loops whose tasks are executed concurrently. (#8419)
The number of workers depends on what the platform deem appropriate for the system at runtime.
2019-04-09 17:03:41 -07:00
Alexander Aprelev
2acd79480a
Add fml::FileExists implementation for Windows (#7845) 2019-02-15 12:42:41 -08:00
Alexander Aprelev
cebde437a1
Guard the service protocol's global handlers list with a reader/writer lock. (#6900)
* Revert "Revert "Guard the service protocol's global handlers list with a reader/writer lock (#6888) #6895" (#6899)"

This reverts commit b6e93759faa92a96650e326b0e82578a6803c46d and applies fix for tests on Windows.

* Reland guard the service protocol's global handlers list with a reader/writer lock.

* Remove blank line
2018-11-18 14:36:15 -08:00
Todd Volkert
b6e93759fa
Revert "Guard the service protocol's global handlers list with a reader/writer lock (#6888) #6895" (#6899) 2018-11-18 09:28:26 -08:00
Jason Simmons
fd0911cc0f Guard the service protocol's global handlers list with a reader/writer lock (#6888) (#6895)
The service protocol holds the lock while waiting for completion of service
RPC tasks.  These tasks (specifically hot restart/RunInView) may need to
modify a handler's description data.

Task execution and ServiceProtocol::SetHandlerDescription will obtain a shared
lock to make this possible.  AddHandler and RemoveHandler will obtain an
exclusive lock in order to guard against a handler being deleted while a
service task is running.
2018-11-17 22:04:37 -08:00
Michael Goderbauer
09ef73ff6e
Fix code smells reported by chrome's clang plugin (#6833) 2018-11-12 19:59:29 -08:00
Michael Goderbauer
70a1106b50
Unify copyright lines (#6757) 2018-11-07 12:24:35 -08:00
Chinmay Garde
f2a3df97e2
Wire up the Skia persistent GPU related artifacts cache. (#6278)
Also teaches FML to create files and directories.
2018-09-26 14:54:09 -07:00
Jason Simmons
85d47fb03c
Accept file URIs as parameters in the RunInView service RPC (#6191)
See https://github.com/flutter/flutter/issues/21348
2018-09-07 09:34:45 -07:00
Michael Goderbauer
842546824c
Roll buildroot to pick up new NDK r17b (#6131) 2018-08-31 11:28:18 -07:00
Chinmay Garde
de206ea953 Update GetDirectoryName namespace to the one in FML on Linux. (#5879) 2018-07-26 13:40:29 -07:00
Chinmay Garde
9f8285ac6c
Remove all dependencies on Garnet. (#5869) 2018-07-26 12:49:34 -07:00
liyuqian
aef291b1e2
Unify trailing spaces / new lines (#5871) 2018-07-26 00:14:43 -07:00
Joshua Seaton
4c9f40a320
[fml] Remove unused ResourceMapping code. (#5811)
ResourceMapping-related code is no longer used.Moreover, there is an
ASan related-error in ResourceMappingDarwin:
https://logs.chromium.org/logs/fuchsia/buildbucket/cr-buildbucket.appspot.com/8940466063445826656/+/steps/test_results/0/steps/s___out_release-x64_host_tests_dart_schema_tests/0/logs/stdio/0
2018-07-20 10:53:27 -07:00
Chinmay Garde
37f456cac0
Fix file flags for directories and backslashes on Windows. (#5387) 2018-05-25 15:28:36 -07:00
Ryan Macnak
0e1966cd50
Reduce log spam: failing to find an instructions buffer isn't an error for ordinary core snapshots. (#5370) 2018-05-25 10:31:56 -07:00
Chinmay Garde
ef7a459cbf
Fix missing include on Windows. (#5313) 2018-05-18 16:22:48 -07:00
Chinmay Garde
fbf07dc332
Import logging utilities from FXL. (#5310) 2018-05-18 15:43:49 -07:00
Chinmay Garde
79b9ffb14b
Fixup Fuchsia content handler post shell refactor. (#5072) 2018-04-23 20:16:01 -07:00
Chinmay Garde
4691a0b23e
Import intrusively ref counted shared pointers into FML. (#5062) 2018-04-21 20:50:03 -07:00
Chinmay Garde
58e84c8bf0
Re-land "Support multiple shells in a single process. (#4932)" (#4998)
* Re-land "Support multiple shells in a single process. (#4932)"

This reverts commit 723c7d01439da4261bc836075fb55651ce9e7f03.
2018-04-13 13:48:15 -07:00
Vyacheslav Egorov
723c7d0143
Revert "Re-land "Support multiple shells in a single process. (#4932)" (#4977)" (#4981)
This reverts commit a3327bff86800b3e654a2988fa7e6049edeb679c.
2018-04-12 18:28:55 +02:00