Commit Graph

169 Commits

Author SHA1 Message Date
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 2fc1e1bce1 Relanding: Add Flow unittests and fixtures (#14091) 2019-12-03 14:33:02 -08:00
Kaushik Iska ea228f2f83 Revert "Fix fml_unittests (#14062)" (#14087)
This reverts commit 6c605f8a96.
2019-12-03 12:24:19 -08:00
liyuqian 84bf72917c Revert PRs to unblock David and Jim's work (#14088)
* Revert "Add flow test fixtures and tests (#13986)"

This reverts commit 620f5281b8.

* Revert "Dynamically determine whether to use offscreen surface based on need (#13976)"

This reverts commit a86ef94656.
2019-12-03 12:02:37 -08:00
David Worsham 620f5281b8 Add flow test fixtures and tests (#13986) 2019-12-03 09:43:02 -08:00
David Worsham 6c605f8a96 Fix fml_unittests (#14062) 2019-11-27 16:04:30 -08:00
Chinmay Garde ca68af252c Add a separate target for Dart coverter on FML types. (#14011)
The converters are still in a separate target that must be included manually. This allows targets that depend on FML but not Dart runtime not have to depend on the runtime.

Adds a test that includes this target and tests image decompression from assets. There is also a test for the standalone DartConvertor in shell_unittests but not in fml_unittests be cause FML uni-tests cannot yet launch a VM. I will work on adding fixtures for those.
2019-11-26 13:33:56 -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 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
gaaclarke 92b2d011c2 Made the thread checker print out the thread names on Apple platforms. (#13943) 2019-11-20 17:56:00 -08:00
George Wright bc7a007978 Package fml_unittests in a .far file for fml unit tests on Fuchsia (#13471)
Add fml_tests target for the fml unit tests on Fuchsia
2019-11-06 13:01:54 -08:00
chunhtai d33b91837e Reland "fix fml_unittes is not run during presubmit (#13395)" (#13426) 2019-10-31 13:50:19 -07: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
chunhtai e569294902 Revert "fix fml_unittes is not run during presubmit (#13395)" (#13425)
This reverts commit 4d553cfe1c.
2019-10-29 16:36:43 -07:00
chunhtai 4d553cfe1c fix fml_unittes is not run during presubmit (#13395) 2019-10-29 15:31:25 -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
Chinmay Garde a925df1898 Remove incomplete static thread safety annotations. (#13151)
Fixes https://github.com/flutter/flutter/issues/42704.
2019-10-16 17:28:31 -07:00
liyuqian a1796fc0e9 Update timeout_microseconds to timeout in docs (#13179) 2019-10-16 16:39:30 -07:00
Chinmay Garde 86e3ebb748 Allow embedders to specify arbitrary data to the isolate on launch. (#13047)
Since this is currently only meant to be used by the embedding internally, the setter in Objective-C is only exposed via the FlutterDartProject private class extension. Unit tests have been added to the shell_unittests harness.

Fixes https://github.com/flutter/flutter/issues/37641
2019-10-10 12:31:14 -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 8a8610a9a5 Implement Base32Decode (#12253)
For https://github.com/flutter/flutter/issues/32170

This is to enable reading back SkSL persistent cache filenames
and decode them as SkData.
2019-09-16 10:43:02 -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
Kaushik Iska 632a37b5d5 Make message loop task entry containers thread safe (#11367)
The core underlying issue is that vector push_back could re-allocate and cause us to segfault. I have switched the backing queues to a map per @jason-simmons suggestion in flutter/flutter#38778.

I've also added a test to capture the aforementioned bug. I've run internal tests several times to validate that this is fixed.

General threading note for this class is that only the following operations take a write lock on the meta mutex:

1. Create
2. Dispose

The rest of the operations take read lock on the meta mutex and acquire finer grained locks for the duration of the operation. We can not grab read lock for the entire duration of NotifyObservers for example because observer can in-turn create other queues -- Which we should not block.

Additional changes:

1. Make as many methods as possible const. Unlocked methods are all const.
2. Migrate all the queue members to a struct, and have a map.
3. Get rid of the un-used Swap functionality.
2019-08-22 23:27:25 -07:00
Kaushik Iska bf138516d7 Do not add null task observers (#11315)
Potential fix for: https://github.com/flutter/flutter/issues/38778
2019-08-20 17:28:59 -07:00