183 Commits

Author SHA1 Message Date
Chris Yang
9ce1e5c5c7
Introduce TaskRunnerAffineWeakPtrFactory to generate TaskRunnerAffineWeakPtrs (#18346) 2020-05-19 16:36:17 -07:00
Kaushik Iska
2494d1ca70
Revert "Remove pipeline in favor of layer tree holder (#18285)" (#18427)
This reverts commit 2cdbc7f92793125d9312138877c05af6ad708683.
2020-05-15 12:27:32 -07:00
Kaushik Iska
2cdbc7f927
Remove pipeline in favor of layer tree holder (#18285)
go/flutter-pipeline-improvements for more details.
2020-05-14 10:46:14 -07:00
Kaushik Iska
8d76518011
Fix latest_frame_target_time race (#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
4418ce8825
Revert "Remove pipeline in favor of layer tree holder (#17688)" (#18242) 2020-05-08 16:09:02 -07:00
Kaushik Iska
983de2c402
Remove pipeline in favor of layer tree holder (#17688)
go/flutter-pipeline-improvements for more details.
2020-05-08 10:51:10 -07:00
Jason Simmons
88b9d42400
Remove the global engine entry timestamp (#18182)
The engine was using a global to store a timestamp representing the
launch of the engine.  This timestamp is initialized with a JNI call
on Android and during shell setup on other platforms.  Later the
timestamp is added to a FlutterEngineMainEnter timeline event used to
measure engine startup time in benchmarks.

This PR removes the global and the JNI call and moves the timestamp
into the settings object.
2020-05-07 11:29:28 -07:00
Chris Yang
2622cb9c33
Introduce TaskRunnerChecker, TaskRunnerAffineWeakPtr (#17649) 2020-05-01 11:28:20 -07:00
liyuqian
50ae2b997d
Set SkSL asset manager in RunConfiguration ctor (#17948) 2020-04-27 17:49:04 -07:00
liyuqian
a8af96da66
Read SkSLs from asset (#17601)
Fixes https://github.com/flutter/flutter/issues/53117

Test added:
- ShellTest.CanLoadSkSLsFromAsset
2020-04-10 00:16:33 -07:00
Kaushik Iska
abc72933e7
[pipeline] Add trace event for lag between target and display times (#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
Dan Field
ff62dec5c9
Roll to clang11, mark 4 (#17483)
* "Reland Clang 11, roll buildroot to 1bc40a5f916adb93d87e2a2230a0ec43db876c1c, take 4 (#17467)" (#17482)"

This reverts commit 8166a91bca11b83c16fba8f8fd407e937a2ac89c.

* format code

* Roll buildroot to 3a27de1c5bb0f50be7d3efe3e00de4f6068c9f30
2020-04-02 13:04:49 -07:00
liyuqian
f003d9b41a
GPU to raster rename, patch 2 (#17428) 2020-03-31 15:16:11 -07:00
liyuqian
807ca8543c
More rename from GPU thread to raster thread (#17408)
This PR touches variable names, class names, and file names so it's significantly more risky than its predecessor https://github.com/flutter/engine/pull/17329

Due to file name changes, this PR is expected to change the license files.

We haven't rename `shell/gpu` to `shell/raster` yet. It should be optional but I think it's better to have `raster_surface_software.cc` than `gpu_surface_software.cc`.
2020-03-31 14:05:28 -07:00
liyuqian
b3075b3091
Rename GPU thread to raster thread in code comments (#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
bb35963050
Add service protocol to get SkSLs (#17300)
Fixes https://github.com/flutter/flutter/issues/53114
2020-03-24 21:42:12 -07:00
Jonah Williams
857859f801
Remove unused PackagesUri rpc param in OnServiceProtocolRunInView (#17195)
This is not actually used by hot reload since we've switched to compilation from kernel.
2020-03-18 13:41:41 -07:00
gaaclarke
fddb0c272e
Made it so you can whitelist what events you want to listen to (#17108) 2020-03-16 11:00:03 -07:00
chunhtai
7a27e75c67
Add shell api to set default for windows data (#14002) 2020-01-08 19:36:10 -08:00
Chinmay Garde
5f9e558a98
Forward low memory notifications from the shell to DartVM. (#14517) 2019-12-16 16:55:08 -08:00
gaaclarke
97a23a80e1
Made a way to turn off the OpenGL operations on the IO thread for backgrounded apps (#13908) 2019-11-22 14:08:33 -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
Michael Klimushyn
8a99d10748
Turn on RasterCache based on view hierarchy (#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
Dan Field
0a8bd9dd6f
Fix mDNS for iOS13 (#13451) 2019-11-01 15:29:15 -07:00
gaaclarke
1eb15c12fb
Revert 78a8ca0f62b04fa49030ecdd2d91726c0639401f (#13467)
Put `Picture.toImage` back on the GPU thread.  Left the unit tests intact.
2019-10-31 16:57:52 -07:00
Michael Klimushyn
e609577d12
Revert "Turn on RasterCache based on view hierarchy (#13360)" (#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 3ad3bc76a5825210603d4afd12013de8ba7d7668.
2019-10-30 11:25:29 -07:00
Michael Klimushyn
3ad3bc76a5
Turn on RasterCache based on view hierarchy (#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
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