87 Commits

Author SHA1 Message Date
Gary Qian
c9fa545cf3 Platform resolved locale and Android localization refactor (flutter/engine#18645) 2020-06-16 04:29:50 -07:00
David Worsham
d2b7646e68 Move Surface and friends to flow/ (flutter/engine#18938) 2020-06-09 16:03:01 -07:00
Kaushik Iska
1430d4e26b Remove pipeline in favor of layer tree holder (flutter/engine#18901)
Relanding of a change that was reverted in:
https://github.com/flutter/engine/pull/18427
2020-06-09 12:19:34 -07:00
Chris Yang
80c707a642 Introduce TaskRunnerAffineWeakPtrFactory to generate TaskRunnerAffineWeakPtrs (flutter/engine#18346) 2020-05-19 16:36:17 -07:00
Kaushik Iska
5519277f4a Revert "Remove pipeline in favor of layer tree holder (#18285)" (flutter/engine#18427)
This reverts commit 0219ee95d8ffdef4d839f0419ce5e1f22b27d8d1.
2020-05-15 12:27:32 -07:00
Kaushik Iska
0219ee95d8 Remove pipeline in favor of layer tree holder (flutter/engine#18285)
go/flutter-pipeline-improvements for more details.
2020-05-14 10:46:14 -07:00
Kaushik Iska
1acb5d4817 Fix latest_frame_target_time race (flutter/engine#18279)
There are some cases where onAnimatorDraw gets called before
onAnimatorBeginFrame, in these cases we need to update the
latest_frame_target_time to be the target time for the current frame.

This manifested as an issue in release mode Android builds:
https://firebase.corp.google.com/project/flutter-infra/testlab/histories/bh.27c33c672e9b01f2/matrices/4903344583855476919/executions/bs.ee4f6f7ad8671a34
2020-05-11 14:52:22 -07:00
Kaushik Iska
1785bb19b0 Revert "Remove pipeline in favor of layer tree holder (#17688)" (flutter/engine#18242) 2020-05-08 16:09:02 -07:00
Kaushik Iska
dee9634111 Remove pipeline in favor of layer tree holder (flutter/engine#17688)
go/flutter-pipeline-improvements for more details.
2020-05-08 10:51:10 -07:00
Chris Yang
d1d6103681 Introduce TaskRunnerChecker, TaskRunnerAffineWeakPtr (flutter/engine#17649) 2020-05-01 11:28:20 -07:00
Jason Simmons
02720fbca8 Fix include paths of fml/time headers in the shell and rasterizer (flutter/engine#17502) 2020-04-03 12:33:54 -07:00
Kaushik Iska
ce0ec9042f [pipeline] Add trace event for lag between target and display times (flutter/engine#17384)
This change also adds TimeRecorder which records time at the start
of each frame to capture the latest vsync target display time and
wires it in to the rasterizer to add trace events when there is a lag.
2020-04-02 17:15:45 -07:00
liyuqian
10824995dd Rename GPU thread to raster thread in code comments (flutter/engine#17329)
1. Simple "GPU thread" to "raster thread" replacement.

2. Regex replace "GPU([\n\r\s]+//+ thread)" with "raster$1".

3. Regex replace "// gpu$" with "// raster".

4. Simple test change.

5. Run ci/format.sh
2020-03-25 22:49:59 -07:00
liyuqian
d968e224ca Add service protocol to get SkSLs (flutter/engine#17300)
Fixes https://github.com/flutter/flutter/issues/53114
2020-03-24 21:42:12 -07:00
Chinmay Garde
ef31000576 Allow embedders to schedule a callback on all engine managed threads. (flutter/engine#15980)
`FlutterEnginePostCallbackOnAllNativeThreads` schedule a callback to be run on
all engine managed threads. The engine will attempt to service this callback the
next time the message loops for each managed thread is idle. Since the engine
manages the entire lifecycle of multiple threads, there is no opportunity for
the embedders to finely tune the priorities of threads directly, or, perform
other thread specific configuration (for example, setting thread names for
tracing). This callback gives embedders a chance to affect such tuning.

Fixes flutter/flutter#49551
Fixes b/143774406
Fixes b/148278215
Fixes b/148278931
2020-01-27 13:49:39 -08:00
chunhtai
1571512735 Add shell api to set default for windows data (flutter/engine#14002) 2020-01-08 19:36:10 -08:00
gaaclarke
ec5cf813f6 Made a way to turn off the OpenGL operations on the IO thread for backgrounded apps (flutter/engine#13908) 2019-11-22 14:08:33 -08:00
gaaclarke
43dce83fc1 Refactor to passing functions by const ref (flutter/engine#13975)
Moved our code to passing functions by const ref
2019-11-22 12:20:02 -08:00
Michael Klimushyn
24ba26f80c Turn on RasterCache based on view hierarchy (flutter/engine#13762)
This is a duplicate of flutter/engine#13360 with the test switched to use the software backend instead of the GL backend.

After some debugging and testing on another GL embedder I think the issue with the test is some bug having to do with the GL implementation in the test harness specifically. 

Fixes flutter/flutter#38903
2019-11-08 17:14:50 -08:00
Michael Klimushyn
791c5441a5 Revert "Turn on RasterCache based on view hierarchy (#13360)" (flutter/engine#13442)
This caused EmbedderTest.VerifyB143464703 to fail after merging into
master.

```
../../flutter/shell/platform/embedder/tests/embedder_unittests.cc:3111: Failure
Value of: ImageMatchesFixture("verifyb143464703.png", renderered_scene)
  Actual: false
Expected: true
[  FAILED  ] EmbedderTest.VerifyB143464703 (2507 ms)
```

This reverts commit b1479f8e6075ef95d6b11a03e318bff72a2c0288.
2019-10-30 11:25:29 -07:00
Michael Klimushyn
b1479f8e60 Turn on RasterCache based on view hierarchy (flutter/engine#13360)
Previously the cache was disabled on whether or not PlatformViews were
globally enabled. Instead track their existence in the view hierarchy
and only disable RasterCache if a PlatformView is actually present.
2019-10-30 10:45:15 -07:00
gaaclarke
ac32ac8391 Made restarting the Engine remember the last entrypoint that was used. (flutter/engine#13289) 2019-10-22 14:01:52 -07:00
Ryan Macnak
344c0abb0a Roll Dart to 6a65ea9cad4b014f88d2f1be1b321db493725a1c. (flutter/engine#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
ec08de4bc5 Revert "Made restarting the Engine remember the last entrypoint that was used. (#13264)" (flutter/engine#13287)
This reverts commit ba50a6dfba72b30a7a06cfb1ee5d40c2316b8a71.
2019-10-22 10:03:10 -07:00
gaaclarke
ba50a6dfba Made restarting the Engine remember the last entrypoint that was used. (flutter/engine#13264) 2019-10-22 08:10:57 -07:00
George Wright
60e88f7a6c Re-enable WeakPtr ThreadChecker and fix associated failures (flutter/engine#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
Chinmay Garde
395f1cda67 Remove incomplete static thread safety annotations. (flutter/engine#13151)
Fixes https://github.com/flutter/flutter/issues/42704.
2019-10-16 17:28:31 -07:00
chunhtai
051ed653cc Add system font change listener for windows (flutter/engine#12276)
* Add windows font change logic

* update

* fix comment
2019-09-23 13:23:46 -07:00
Michael Klimushyn
862f40c774 Revert "Smooth out iOS irregular input events delivery (#11817)" (flutter/engine#12251)
This reverts commit 6b742994a371f5edded8925708d101186c950ada.
2019-09-12 11:23:05 -07:00
liyuqian
6b742994a3 Smooth out iOS irregular input events delivery (flutter/engine#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
liyuqian
f8f285edcc Support non-60 refresh rate on PerformanceOverlay (flutter/engine#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
cd18c5ef0b Remove get engine (flutter/engine#9747) 2019-07-30 17:11:04 -07:00
gaaclarke
6acae05b3c Synchronize main thread and gpu thread for first render frame (flutter/engine#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
3d231d854c Use libc++ variant of string view and remove the FML variant. (flutter/engine#9737) 2019-07-10 12:11:39 -07:00
Chinmay Garde
83b4d5a0d5 Document various classes in //flutter/shell/common. (flutter/engine#9591) 2019-06-29 14:08:02 -07:00
Dan Field
9b08763a75 Purge caches on low memory on iOS (flutter/engine#9491) 2019-06-25 20:47:55 -07:00
liyuqian
ac90c31ae4 Remove unused/unimplemented shell constructor (flutter/engine#9459) 2019-06-24 12:59:54 -07:00
liyuqian
8bd7715e9c Send timings of the first frame without batching (flutter/engine#9424)
For https://github.com/flutter/flutter/issues/34867

Test added:
* ReportTimingsIsCalledImmediatelyAfterTheFirstFrame
2019-06-24 12:40:38 -07:00
liyuqian
7606eb25fb Generate weak pointers only in the platform thread (flutter/engine#9431) 2019-06-24 10:33:34 -07:00
gaaclarke
686215ac99 Added class docstrings for classes inside of shell/common. (flutter/engine#9303)
Added class docstrings for classes inside of shell/common.
2019-06-13 16:15:10 -07:00
liyuqian
fb0ea0ef4c Add onReportTimings and FrameRasterizedCallback API (flutter/engine#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
liyuqian
27e4dac06b Rename flow namespace to flutter (flutter/engine#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
72111314cb Remove redundant specification of the |flutter| namespace in the engine. (flutter/engine#8523) 2019-04-09 17:50:06 -07:00
Chinmay Garde
4dd267959f Rename the shell namespace to flutter. (flutter/engine#8520) 2019-04-09 17:10:46 -07:00
Chinmay Garde
1fd28a143a Rename the blink namespace to flutter. (flutter/engine#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
736277e9c7 Revert "Revert "Separate the data required to bootstrap the VM into its own class. (#8397)" (#8406)" (flutter/engine#8414)
This reverts commit 8a0076fdddc96b4ec2fb67f45051aa490827fc02.
2019-04-03 13:38:12 -07:00
Zachary Anderson
8a0076fddd Revert "Separate the data required to bootstrap the VM into its own class. (#8397)" (flutter/engine#8406)
This reverts commit 38f5fc418a08ed43945ad21d19494d6b352e1443.
2019-04-02 09:12:56 -07:00
Chinmay Garde
38f5fc418a Separate the data required to bootstrap the VM into its own class. (flutter/engine#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
Dan Field
4206f443f7 Revert "Shut down and restart the Dart VM as needed. (#7832)" (flutter/engine#7877)
This reverts commit 75a66f31dc2a02ccb54f10fb4477233086f4906b.
2019-02-19 16:14:18 -08:00
Chinmay Garde
75a66f31dc Shut down and restart the Dart VM as needed. (flutter/engine#7832)
The shell was already designed to cleanly shut down the VM but it couldnt
earlier as |Dart_Initialize| could never be called after a |Dart_Cleanup|. This
meant that shutting down an engine instance could not shut down the VM to save
memory because newly created engines in the process after that point couldn't
restart the VM. There can only be one VM running in a process at a time.

This patch separate the previous DartVM object into one that references a
running instance of the DartVM and a set of immutable dependencies that
components can reference even as the VM is shutting down.

Unit tests have been added to assert that non-overlapping engine launches use
difference VM instances.
2019-02-15 14:16:17 -08:00