156 Commits

Author SHA1 Message Date
George Wright
591d149f97
Make flutter_tester support multithreaded testing, and run all Dart tests in both single and multithreaded configurations (#13273)
Make flutter_tester support multithreaded testing, and run all Dart tests in both single and multithreaded configurations

This also modifies Shell::GetUIIsolateLastError() and Shell::EngineHasLivePorts() so that they must be called from the UI task runner.
2019-10-22 14:10:57 -07:00
gaaclarke
25fcf531fa
Made restarting the Engine remember the last entrypoint that was used. (#13289) 2019-10-22 14:01:52 -07:00
Ryan Macnak
f6900001eb
Roll Dart to 6a65ea9cad4b014f88d2f1be1b321db493725a1c. (#13294)
Remove dead shared snapshot arguments to Dart_CreateIsolateGroup.

6a65ea9cad4b [vm] Remove shared snapshot and reused instructions features.
db8370e36147 [gardening] Fix frontend-server dartdevc windows test.
4601bd7bffea Modified supertype check error message to be more descriptive.
0449905e2de6 [CFE] Add a serialization-and-unserialization step to strong test
c8b903c2f94f Update CHANGELOG.md
2a12a13d9684 [Test] Skips emit_aot_size_info_flag_test on crossword.
b26127fe01a5 [cfe] Add reachability test skeleton
2019-10-22 13:14:20 -07:00
gaaclarke
0d43469b40
Revert "Made restarting the Engine remember the last entrypoint that was used. (#13264)" (#13287)
This reverts commit 9dd585c463c35950a79471fab80023cfa9ce9c26.
2019-10-22 10:03:10 -07:00
gaaclarke
9dd585c463
Made restarting the Engine remember the last entrypoint that was used. (#13264) 2019-10-22 08:10:57 -07:00
George Wright
73c6a4a1e2
Ensure we call into Engine from the UI taskrunner in Shell::EngineHasLivePorts (#13265) 2019-10-21 15:56:03 -07:00
Jason Simmons
4ecfa62735
Hold a reference to the Skia unref queue in UIDartState (#13239)
Obtaining the SkiaUnrefQueue through the IOManager is unsafe because
UIDartState has a weak pointer to the IOManager that can not be dereferenced
on the UI thread.
2019-10-21 14:15:03 -07:00
George Wright
8b9761940b
Re-enable WeakPtr ThreadChecker and fix associated failures (#12257)
This re-enables thread safety checks for WeakPtr. WeakPtrs can't be used on a thread other than the one the WeakPtrFactory was created on.

This fixes the unit tests and adds a getUnsafe() method to WeakPtr to work around the remaining unresolved locations where we are using WeakPtr unsafely.
2019-10-17 14:10:16 -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
liyuqian
9675ca2f6b
Reland "Smooth out iOS irregular input events delivery (#12280)" (#12385)
This reverts commit c2879cae2ee3707ad07af1118bf4862dc1d82bb7.

Additionally, we fix https://github.com/flutter/flutter/issues/40863 by adding a secondary VSYNC callback.

Unit tests are updated to provide VSYNC mocking and check the fix of https://github.com/flutter/flutter/issues/40863.

The root cause of having https://github.com/flutter/flutter/issues/40863 is the false assumption that each input event must trigger a new frame. That was true in the framework PR https://github.com/flutter/flutter/pull/36616 because the input events there are all scrolling move events. When the PR was ported to the engine, we can no longer distinguish different types of events, and tap events may no longer trigger a new frame.

Therefore, this PR directly hooks into the `VsyncWaiter` and uses its (newly added) secondary callback to dispatch the pending input event.
2019-09-30 11:25:50 -07:00
Jonah Williams
6f5eb1332f
Add support for JIT release mode (#12446) 2019-09-27 11:20:54 -07:00
chunhtai
aadd5a346b
Add system font change listener for windows (#12276)
* Add windows font change logic

* update

* fix comment
2019-09-23 13:23:46 -07:00
liyuqian
c2879cae2e
Revert "Reland "Smooth out iOS irregular input events delivery (#11817)" (#12280)" (#12364)
This reverts commit aac33d1bced7a9d15e1feb19f73eef6da16470f0.

Reason: flutter/flutter#40863

TBR: chinmaygarde, iskakaushik
2019-09-19 19:39:36 -07:00
liyuqian
d54ed1f13f
Add "type" to getDisplayRefreshRate protocol (#12319)
Per kenzieschmoll's request.

Will update https://github.com/flutter/flutter/wiki/Engine-specific-Service-Protocol-extensions once this is merged.
2019-09-17 11:35:01 -07:00
gaaclarke
2620babef0
Made flutter startup faster by allowing initialization to be parallelized (#10182)
Made flutter startup faster by allowing initialization to be parallelized.  This resulting in a 15% decrease in startup time (~0.05ms)
2019-09-16 15:04:51 -07:00
liyuqian
aac33d1bce
Reland "Smooth out iOS irregular input events delivery (#11817)" (#12280)
Additionally, we now use the engine directly as a delegate instead of storing potentially dead runtime_controller.

Unit tests have been updated to include an engine restart check which would fail before the fix.

This fixes https://github.com/flutter/flutter/issues/40303
2019-09-16 10:42:44 -07:00
Michael Klimushyn
3c6383f2db
Revert "Smooth out iOS irregular input events delivery (#11817)" (#12251)
This reverts commit b569e8c2fd5a444b6a3f7355a2f8c983c3a23e05.
2019-09-12 11:23:05 -07:00
liyuqian
b569e8c2fd
Smooth out iOS irregular input events delivery (#11817)
Fixes https://github.com/flutter/flutter/issues/31086

This patch is a lower level implementation of
https://github.com/flutter/flutter/pull/36616 that would only impact iOS
engine, and host unittests.
2019-09-10 11:18:01 -07:00
Dan Field
101e03c1c8
Return a JSON value for the Skia channel (#11717) 2019-08-29 14:03:55 -07:00
Dan Field
4ceaafc0a8
Make Skia cache size channel respond with a value (#11550) 2019-08-27 17:52:35 -07:00
liyuqian
4d83ef8c7f
Support non-60 refresh rate on PerformanceOverlay (#11419)
So we can get the correct graph on 90fps/120fps devices :)

See https://github.com/flutter/flutter/issues/37888
2019-08-24 15:22:52 -07:00
Dan Field
960501721b
Reland Skia Caching improvements (#10434) 2019-08-02 19:31:57 -07:00
Dan Field
ed8e35c4cf
Remove get engine (#9747) 2019-07-30 17:11:04 -07:00
gaaclarke
78a8ca0f62
Made Picture::toImage happen on the IO thread with no need for an onscreen surface. (#9813)
Made Picture::toImage happen on the IO thread with no need for a surface.
2019-07-15 17:16:20 -07:00
gaaclarke
9776043ea5
Synchronize main thread and gpu thread for first render frame (#9506)
Got rid of the black frame by synchronizing the main thread with the
gpu thread to make sure a frame is rendered before presenting the
view.
2019-07-10 13:14:07 -07:00
Chinmay Garde
f600ae830d
Use libc++ variant of string view and remove the FML variant. (#9737) 2019-07-10 12:11:39 -07:00
Dan Field
564f53f0a6
Revert "Improve caching limits for Skia (#9503)" (#9740)
This reverts commit 63c2c3316d667e7677782d10be57982dd4a7595c.
2019-07-10 12:09:42 -07:00
Dan Field
63c2c3316d
Improve caching limits for Skia (#9503) 2019-06-26 16:21:46 -07:00
Dan Field
da82361dad
Purge caches on low memory on iOS (#9491) 2019-06-25 20:47:55 -07:00
liyuqian
a184037971
Send timings of the first frame without batching (#9424)
For https://github.com/flutter/flutter/issues/34867

Test added:
* ReportTimingsIsCalledImmediatelyAfterTheFirstFrame
2019-06-24 12:40:38 -07:00
liyuqian
ccb5034d54
Generate weak pointers only in the platform thread (#9431) 2019-06-24 10:33:34 -07:00
Zachary Anderson
0a2e28d797
Revert tracing changes (#9296)
* Revert "[fuchsia] Fix alignment of Fuchsia/non-Fuchsia tracing (#9289)"

This reverts commit f80ac5f571479053b134e60bca77603269b2ce2a.

* Revert "Align fuchsia and non-fuchsia tracing (#9199)"

This reverts commit 78265484623037c6544dfd5380367bca29fa27b0.
2019-06-12 10:25:49 -07:00
liyuqian
de350c4cbb
Report timings faster (100ms) in profile/debug (#9287)
This should satisfy the low-latency need of DevTools.

Test added:
* ReportTimingsIsCalledSoonerInNonReleaseMode
* ReportTimingsIsCalledLaterInReleaseMode
2019-06-11 16:51:20 -07:00
liyuqian
9f088c65ee
Add onReportTimings and FrameRasterizedCallback API (#8983)
Using it, a Flutter app can monitor missing frames in the release mode, and a custom Flutter runner (e.g., Fuchsia) can add a custom FrameRasterizedCallback.

Related issues:
https://github.com/flutter/flutter/issues/26154
https://github.com/flutter/flutter/issues/31444
https://github.com/flutter/flutter/issues/32447

Need review as soon as possible so we can merge this before the end of May to catch the milestone.

Tests added:
* NoNeedToReportTimingsByDefault
* NeedsReportTimingsIsSetWithCallback
* ReportTimingsIsCalled
* FrameRasterizedCallbackIsCalled
* FrameTimingSetsAndGetsProperly
* onReportTimings preserves callback zone
* FrameTiming.toString has the correct format

This will need a manual engine roll as the TestWindow defined in the framework needs to implement onReportTimings.
2019-06-06 10:42:48 -07:00
Dan Field
7826548462
Align fuchsia and non-fuchsia tracing (#9199) 2019-06-05 15:14:27 -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
liyuqian
1c9457cedc
Revert "Only allow mappings for ICU initialization. (#8656)" (#8682)
This reverts commit bd8c5b135e4d41842d0d5d42ff4943a18b8f4f0c.

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
Chinmay Garde
bd8c5b135e
Only allow mappings for ICU initialization. (#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
liyuqian
8ff631f3df
Rename flow namespace to flutter (#8615)
This follows our namespace change from shell to flutter: https://github.com/flutter/engine/pull/8520.
2019-04-17 14:38:45 -07:00
Chinmay Garde
39e1d00f39
Remove redundant specification of the |flutter| namespace in the engine. (#8523) 2019-04-09 17:50:06 -07:00
Chinmay Garde
56052c70af
Rename the shell namespace to flutter. (#8520) 2019-04-09 17:10:46 -07:00
Chinmay Garde
eec74e5c92
Rename the blink namespace to flutter. (#8517)
Some components in the Flutter engine were derived from the forked blink codebase. While the forked components have either been removed or rewritten, the use of the blink namespace has mostly (and inconsistently) remained. This renames the blink namesapce to flutter for consistency. There are no functional changes in this patch.
2019-04-09 12:44:42 -07:00
Chinmay Garde
7e38b0aa23
Revert "Revert "Separate the data required to bootstrap the VM into its own class. (#8397)" (#8406)" (#8414)
This reverts commit f7b4903d7c9913447af3aaebc4308d1a1e2a4dde.
2019-04-03 13:38:12 -07:00
Zachary Anderson
f7b4903d7c
Revert "Separate the data required to bootstrap the VM into its own class. (#8397)" (#8406)
This reverts commit c991647404f8117dab2ca4ed49aa3ba48a634240.
2019-04-02 09:12:56 -07:00
Chinmay Garde
c991647404
Separate the data required to bootstrap the VM into its own class. (#8397)
When attempting to shutdown and subsequently restart the VM, having the
VM own this data introduces lifecycle issues due to circular references.
2019-04-01 14:58:05 -07:00
Chinmay Garde
975fe8776c
Reset min log levels on each engine launch. (#8343) 2019-03-28 11:21:25 -07:00
Amir Hardon
629072277d
Merge only gpu and platform threads for platform views, fix deadlock. (#8045)
The reason we didn't merge just the gpu and platform threads from the get go was a deadlock in Shell:OnPlatformViewCreated and Shell:OnPlatformViewDestroyed.

The deadlock was caused by the platform thread starting a thread-hopping flow that ends ends up with the gpu thread releasing a latch that the platform thread is waiting on just after starting the cross-thread dance.
If the platform and gpu threads are the same, that last task that is posted to the gpu thread will never get executed as the gpu/platform thread is blocked on a latch.

This works around the deadlock by having a special case in the code for the scenario where the gpu and platform threads are the same.

Fixes: flutter/flutter#23974
2019-03-18 14:13:30 -07:00
liyuqian
66fdeb163e
Add dump-shader-skp switch to help ShaderWarmUp (#8148)
Allow Flutter to automatically dump the skp that triggers new shader compilations. This is useful for writing custom ShaderWarmUp to reduce jank. By default, it's not enabled to reduce the overhead. This is only available in profile or debug build.

Later, we can add service protocol support to pull the skp from the client to the host. Currently, it works fine for Android-based devices (including our urgent internal clients) where we can `adb shell` into the cache directory.
2019-03-14 12:58:09 -07:00
Chinmay Garde
e37bd27b48
Fix weak pointer use violations in shell and platform view. (#8046) 2019-03-05 15:21:06 -08:00
Mehmet Fidanboylu
204e7da36c
New setting to decide whether we want the engine to load ICU mapping. (#7928) 2019-02-22 14:49:15 -08:00