121 Commits

Author SHA1 Message Date
Adam Barth
e1c043fe58 [fuchsia] Update zx_clock_get callers (flutter/engine#8998)
Fuchsia is changing zx_clock_get to return a zx_status_t. This change
prepares us for that change.
2019-05-17 16:37:28 -07:00
Matthew Dempsky
0bca459e28 Replace ararysize macro with fml::size function (flutter/engine#8975)
This is forward compatible with std::size and similar to how Chromium
removed use of the arraysize macro.
2019-05-15 12:43:47 -07:00
Chinmay Garde
74f9cc79b3 Avoid disabling sources assignment filters are these have been removed. (flutter/engine#8954) 2019-05-13 18:38:28 -07:00
stuartmorgan
4bb9f5d60d Standardize TimePoint implementaion on std::chrono (flutter/engine#8913)
In practice, the implementations of std::chrono seem to match our
implementations, so this makes the code simpler and easier to maintain,
as well as potentially improving over time without changes on our part.
2019-05-09 10:33:36 -04:00
stuartmorgan
501354c207 Fix TimePoint on Windows (flutter/engine#8910)
Addresses overflow issues with timer multiplication by using std::chrono
instead of QueryPerformanceCounter. The Windows implementation of
std::chrono uses QPC, so this should have no impact on performance or
clock resolution.

Fixes #32121
2019-05-08 23:20:32 -04:00
Chinmay Garde
56e7bf84b1 Wire up Fuchsia SDK related updated for shell dependencies. #8869
This does not actually import the runners into the engine. It only sets up the targets so they need no modifications are necessary when the migration is done. The engine has been verified to build in both buildroots.
2019-05-06 18:01:59 -07:00
Matthew Dempsky
ea70585830 Fix header include guards for fml/thread_local.h (flutter/engine#8721)
While working on #8659, I had planned on renaming this file to
thread_local_unique_ptr.h, but decided against that at the last minute
before sending for review. However, when reverting the file rename, I
forgot to also revert the header guard change.
2019-04-29 11:07:04 -07:00
Dan Field
c7e9c7b016 Fix crash when cursor ends up at invalid position (flutter/engine#8747) 2019-04-26 15:43:44 -07:00
liyuqian
358e88cabf Revert "Only allow mappings for ICU initialization. (#8656)" (flutter/engine#8682)
This reverts commit dfaa1c9292238e73c56d36f7264adc63ea53745c.

Reverts flutter/engine#8656

Reason:  https://github.com/flutter/engine/pull/8656 seems to break the framework windows tests and the engine roll (see https://cirrus-ci.com/task/4704667236827136 and https://github.com/flutter/flutter/pull/31330). The failure has been consistent for 7 consecutive engine-to-framework auto-rolls.

TBR: @chinmaygarde
2019-04-22 10:28:54 -07:00
Matthew Dempsky
2107712b0f Replace ThreadLocal with ThreadLocalUniquePtr<T> (flutter/engine#8659)
Fixes https://github.com/flutter/flutter/issues/31292.
2019-04-19 17:33:46 -07:00
Chinmay Garde
dfaa1c9292 Only allow mappings for ICU initialization. (flutter/engine#8656)
If the mapping callback is not set or it the callback returns invalid data, ICU initialization will be embedder responsibility.

This affects all embedders and the following have been audited:
* Android: Via a symbol mapping.
* iOS: Via a file mapping.
* Embedder: Via a file mapping.
* Fuchsia: Via a VMO mapping
* Test shells and Flutter tester: Via file mapping with ICU data needing to be next to the executable.
2019-04-19 15:01:40 -07:00
Chinmay Garde
1133591eeb Add factory methods to FileMapping that make it easy to create common mappings. (flutter/engine#8652)
The GetMapping calls removed in this patch had the same code and had to be repeated across different test harnesses as well as in dart_snapshot.cc. Just make this a factory method so the code is less verbose.
2019-04-19 12:48:53 -07:00
Chinmay Garde
46f575eccb Reland "Remove DartSnapshotBuffer and dry up snapshot resolution logic". (flutter/engine#8645)
This reverts commit 1c06891c101f530c1f46337b457ba02e0f6c8633.
Windows depends on referencing the snapshot symbols directly instead of
via dlsym. Something in the way these symbolsa are generated in
bin_to_assembly.py is causing them to be inaccessible at runtime.
2019-04-18 18:54:43 -07:00
Chinmay Garde
1c06891c10 Revert "Remove DartSnapshotBuffer and dry up snapshot resolution logic. (#8640)" (flutter/engine#8644)
This reverts commit 29b322db9ecd6f8fad72b5f7ad91a64e01c89958.
2019-04-18 16:46:03 -07:00
Chinmay Garde
29b322db9e Remove DartSnapshotBuffer and dry up snapshot resolution logic. (flutter/engine#8640)
Fixes https://github.com/flutter/flutter/issues/26782.
2019-04-18 16:01:19 -07:00
Chinmay Garde
2b4e6ce82b Merge flutter/synchronization contents into fml. (flutter/engine#8525)
When flutter/synchronization was first authored, we did not own fml (it was called fxl then). Now we do, so use a single spot for such utilities. The pipeline was meant to be a general purpose utility that was only ever used by the animator (it even has animator specific tracing), so move that to shell instead (where the animator resides).
2019-04-09 19:18:51 -07:00
Chinmay Garde
2217a3a42d Support message loops whose tasks are executed concurrently. (flutter/engine#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
David Worsham
0e76733763 Add Views V2 support for Fuchsia (flutter/engine#8115) 2019-04-07 01:18:59 -07:00
Chinmay Garde
20fe654ef3 Allow embedders to specify their own task runner interfaces. (flutter/engine#8273)
Currently, all Flutter threads are managed by the engine itself. This works for
all threads except the platform thread. On this thread, the engine cannot see
the underlying event multiplexing mechanism. Using the new task runner
interfaces, the engine can relinquish the task of setting up the event
multiplexing mechanism and instead have the embedder provide one for it during
setup.

This scheme is only wired up for the platform thread. But, the eventual goal
is to expose this message loop interoperability for all threads.
2019-03-27 16:16:59 -07:00
Zachary Anderson
610db85f04 [fuchsia] Disable FML_TRACE_COUNTER events to unblock roll (flutter/engine#8325) 2019-03-27 10:36:34 -07:00
Zachary Anderson
4a4a074914 [fuchsia] Add missing trace macros (flutter/engine#8297) 2019-03-25 16:03:41 -07:00
Chinmay Garde
16999258f7 Simplify the fallback waiter and add traces for vsync scheduling overhead. (flutter/engine#8185) 2019-03-18 15:49:16 -07:00
Chinmay Garde
9ada55b844 Add frame and target time metadata to vsync events and connect platform vsync events using flows. (flutter/engine#8172)
This will allow us to easily visualize the time the platform informed the engine of a vsync event, its arguments, and when the engine began its UI thread workload using this information.
2019-03-14 16:48:01 -07:00
Chinmay Garde
8fc02f5b1d Add an allocator specific check to ensure that strings passed to the timeline are not heap allocated. (flutter/engine#8168)
Verified that the tests fail on issues like https://github.com/flutter/engine/pull/8166. Unfortunately, there is no x-platform way to perform this check but this should gate incorrect traces being added to the engine.
2019-03-14 14:15:46 -07:00
Jason Simmons
4670858e8f Do not pass short-lived buffers as labels to Dart_TimelineEvent (flutter/engine#8166)
Dart no longer makes a copy of the label string when recording events.

See https://github.com/flutter/engine/pull/8152
2019-03-14 12:49:42 -07:00
Chinmay Garde
0809280550 Reland ""Add support for trace counters with variable arguments and instrument the raster cache." (flutter/engine#8145)
This reverts commit da6e460c67c34d34eef1e9ec87b8534a379fe1f5 and fixes the
discovered on Windows builds.
2019-03-13 13:53:22 -07:00
liyuqian
6b28290f44 Typo "fast an inline" to "fast and inline" (flutter/engine#8142) 2019-03-12 15:27:33 -07:00
Chinmay Garde
da6e460c67 Revert "Add support for trace counters with variable arguments and instrument the raster cache. (#8094)" (flutter/engine#8122)
This reverts commit 9f384e3e4cbfdf23381509a62c7023e77edcbfd8.
2019-03-11 15:09:24 -07:00
Chinmay Garde
9f384e3e4c Add support for trace counters with variable arguments and instrument the raster cache. (flutter/engine#8094) 2019-03-11 14:44:43 -07:00
Chinmay Garde
c20c3c47f4 Remove redundant thread checker in FML. (flutter/engine#8053)
There is already fml/memory/thread_checker.h
2019-03-05 20:07:10 -08:00
Chinmay Garde
eccfd67b6c Remove unused FML file export.h (flutter/engine#7926)
We should not be exporting anything from FML anyway.
2019-02-22 12:44:09 -08:00
Alexander Aprelev
adc3ca0e31 Add fml::FileExists implementation for Windows (flutter/engine#7845) 2019-02-15 12:42:41 -08:00
Jason Simmons
8a941d7b3c Embed ICU data inside libflutter.so on Android (flutter/engine#7588)
Prior to this the Android embedder code would extract the icudtl.dat asset out
of the APK and write it to local disk during the first startup of the app.

This change will make that work unnecessary and eliminate the risk of ICU
failures due to errors in the extraction process.
2019-01-30 11:56:17 -08:00
Chris Bracken
23db336526 [Fuchsia] Depend on libtrace when that is what's really meant (flutter/engine#7214)
libtrace-provider has libtrace listed as a dependency when really it
does not have any such dependency. This lets trace clients use
libtrace-provider as a dependency when what they really mean is libtrace.

This errant dependency in trace-provider is being fixed, which
means we need to fix these clients.
2018-12-13 13:13:38 -08:00
Alexander Aprelev
839fd8348a Guard the service protocol's global handlers list with a reader/writer lock. (flutter/engine#6900)
* Revert "Revert "Guard the service protocol's global handlers list with a reader/writer lock (#6888) #6895" (#6899)"

This reverts commit bcf5e1eae123478564468b77251a2674bd0e773e 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
bcf5e1eae1 Revert "Guard the service protocol's global handlers list with a reader/writer lock (#6888) #6895" (flutter/engine#6899) 2018-11-18 09:28:26 -08:00
Jason Simmons
f5496c0977 Guard the service protocol's global handlers list with a reader/writer lock (#6888) (flutter/engine#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
Jason Simmons
7449dc427e Revert "Guard the service protocol's global handlers list with a reader/writer lock (#6888)" (flutter/engine#6893)
This reverts commit e740d7f1dbdb69dc4fd38e39c887dd3cccae7c3d.

(shared_timed_mutex is unavailable in the iOS build)
2018-11-17 12:27:06 -08:00
Jason Simmons
e740d7f1db Guard the service protocol's global handlers list with a reader/writer lock (flutter/engine#6888)
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 10:53:26 -08:00
Michael Goderbauer
e9bfd56271 Fix Windows Engine Bot (flutter/engine#6844)
Follow-up to https://github.com/flutter/engine/pull/6833
2018-11-13 09:46:30 -08:00
Michael Goderbauer
082336e7c2 Fix code smells reported by chrome's clang plugin (flutter/engine#6833) 2018-11-12 19:59:29 -08:00
Michael Goderbauer
0def82ddb0 Unify copyright lines (flutter/engine#6757) 2018-11-07 12:24:35 -08:00
Chinmay Garde
ddd0b8887a Handle Windows headers defining ERROR to 0 in log levels. (flutter/engine#6677) 2018-10-26 16:47:14 -07:00
Chinmay Garde
9e7967d181 Add a CountDownLatch to fml with tests. (flutter/engine#6574) 2018-10-17 17:20:44 -07:00
Chinmay Garde
74c44fa72a Wire up the Skia persistent GPU related artifacts cache. (flutter/engine#6278)
Also teaches FML to create files and directories.
2018-09-26 14:54:09 -07:00
Chinmay Garde
b1b2a1cc3f Add support for counter timeline traces from the engine. (flutter/engine#6315) 2018-09-26 13:26:23 -07:00
Chinmay Garde
7cebfdf58e Ensure that objects on stack that close traces have unique variable names. (flutter/engine#6298) 2018-09-22 14:46:29 -07:00
Mehmet Fidanboylu
c43e79d938 Don't use unix or win namespaces (flutter/engine#6277) 2018-09-18 19:43:26 -07:00
Jason Simmons
5ecda4b710 Accept file URIs as parameters in the RunInView service RPC (flutter/engine#6191)
See https://github.com/flutter/flutter/issues/21348
2018-09-07 09:34:45 -07:00
Michael Goderbauer
441b84f24c Update to latest clang (flutter/engine#6174)
* Roll buildroot to be483cb1cd3a9c4313b2e534034d23a05c3d849e
* Rolls buildtools to c1408453246f0475547b6fe634c2f3dad71c6457
2018-09-06 15:29:04 -07:00