2617 Commits

Author SHA1 Message Date
Chris Yang
d1d6103681 Introduce TaskRunnerChecker, TaskRunnerAffineWeakPtr (flutter/engine#17649) 2020-05-01 11:28:20 -07:00
Alexander Aprelev
4b5878c6ab Introduce runtime check that it is root isolate that makes UI native calls. (flutter/engine#18050)
* Revert "Do not register UI-related native functions in secondary isolates (#6401)"

This reverts commit c23deb818efc3813273d28ce7d965d0eb261cca9 as it doesn't work when root and secondary isolates run in the same isolate group.

* Confirm it is root isolate that makes UI native calls.

* Fix format, UIDartState reference from Fuchsia source

* No UI isolate check for fuchsia calls

* Fix typo. Remove redundant runtime calls
2020-05-01 09:05:41 -07:00
Felipe Archondo
fbdf852d1d [fuchsia] set vsync_offset based on config file (flutter/engine#18006)
In order to better support different products on Fuchsia, we should
change performance-sensitive attributes based on config files passed in.
This change does so for `vsync_offset`.
2020-05-01 08:45:53 -07:00
stuartmorgan
6027990460 Add an API for resyncing output streams (flutter/engine#18070)
When creating a console on Windows, stdout/stderr aren't wired up to it.
They need to be re-opened afeter the console is created, and that needs
to be done separately in the engine due to the use of static runtime
linking. This provides a helper method that the runner can call when
creating a console so that output will work as expected.

Part of https://github.com/flutter/flutter/issues/53169
2020-05-01 08:38:42 -07:00
George Wright
c64646b6e8 Bundle the validation layers and enable them if --enable-vulkan-validation-layers is specified to gn (flutter/engine#17854) 2020-04-30 16:06:59 -07:00
Kaushik Iska
9525672548 [fuchsia] Log unregistered platform channels only once (flutter/engine#18064)
This is to reduce log spam.

Fixes: https://github.com/flutter/flutter/issues/55966
2020-04-30 15:25:48 -07:00
Filip Filmar
604892e454 [fuchsia] Use dart::ComponentContext() (flutter/engine#17876)
This functionality is added in issue #41523.  Allows runners to request
the singleton instance of `sys::ComponentContext`, while it remains also
accessible to component-specific code that does not have direct access
to top-level objects.

Fixes #41523
2020-04-30 13:27:57 -07:00
Chris Yang
532f988f67 RendererContextManager (flutter/engine#17941) 2020-04-30 09:39:33 -07:00
Wings006
c65ab74a1c make "flutter run --trace-systrace" work. (flutter/engine#18052) 2020-04-30 09:30:24 -07:00
stuartmorgan
dda139248a Fix method handler control flow in Windows and Linux text input plugins (flutter/engine#17964)
The existing logic incorrectly factored out a check that there were arguments too early, applying it to any message not already handled (including unhandled methods, such as methods added after the initial implementation) and thus failing if any unhandled message had no arguments.

Fixes https://github.com/flutter/flutter/issues/55653
2020-04-29 19:43:12 -07:00
Chinmay Garde
d1acd32a82 [Metal] On context loss with a paused texture source, preserve external pixel buffer. (flutter/engine#18022)
Fixes https://github.com/flutter/flutter/issues/55783
Requires follow-up https://github.com/flutter/flutter/issues/55926
2020-04-29 13:27:00 -07:00
Robert Ancell
1523f9e550 Replace usage of NULL with nullptr to match coding style (flutter/engine#18023) 2020-04-29 13:26:27 -07:00
Robert Ancell
9d09f9ac4e Use g_warning instead of stderr (flutter/engine#17994) 2020-04-29 15:13:29 +12:00
George Wright
be852ec9a1 Set the max Vulkan API version when creating the GrContext (flutter/engine#18007) 2020-04-28 14:15:56 -07:00
Robert Ancell
c9b3285fa2 Run Flutter platform tasks in GLib main loop (flutter/engine#17910)
Fixes https://github.com/flutter/flutter/issues/54856
2020-04-29 09:13:58 +12:00
xster
62a64ac11e remove top padding when system UI in fullscreen mode (flutter/engine#17985) 2020-04-28 12:21:37 -07:00
liyuqian
0b7c37b9ba Set SkSL asset manager in RunConfiguration ctor (flutter/engine#17948) 2020-04-27 17:49:04 -07:00
gaaclarke
63c6010814 Started ignoring remote keyboard notifications. (flutter/engine#17981) 2020-04-27 17:30:50 -07:00
Emmanuel Garcia
f6c5bdea96 Add initial unit tests for the android embedding (flutter/engine#17921) 2020-04-26 20:45:28 -07:00
xster
664700007c Fix accessibility focus loss when first focusing on text field (flutter/engine#17803) 2020-04-24 15:44:54 -07:00
Robert Ancell
214641ff29 Fix units used in Linux shell timestamps. (flutter/engine#17912)
GTK uses timestamps in milliseconds, Flutter wants them in microseconds.
2020-04-24 13:30:34 +12:00
liyuqian
09d418b080 Revert "[tracing] SceneDisplayLag is a synchronous event (#17878)" (flutter/engine#17916)
This reverts commit ca5cc907a90ee4e0dffd712f7fa1f2142813220e.

Reverts flutter/engine#17878

This breaks our devicelab tests.

TBR: @flar
2020-04-23 18:04:39 -07:00
Gary Qian
b181ae8f63 Hand off presentation properly in VirtualDisplayController.resize() (flutter/engine#17897) 2020-04-23 15:32:20 -07:00
Robert Ancell
a643d8aa67 Refactor FlutterEngine usage in Linux shell (flutter/engine#17363) 2020-04-24 10:30:41 +12:00
Kaushik Iska
ca5cc907a9 [tracing] SceneDisplayLag is a synchronous event (flutter/engine#17878)
This change converts it from an events that spans a time interval
to an event that occurs at an instant.

We also emit this trace event when there is no lag as opposed to
only when there was a lag to make it monotonous.

Co-authored-by: Kaushik Iska <kaushikiska@google.com>
2020-04-23 10:53:45 -07:00
LongCatIsLooong
b4bce4be70 add missing case for TextInput.requestAutofill (flutter/engine#17857) 2020-04-23 10:52:47 -07:00
Mehmet Fidanboylu
fe52878092 Protect LanguageRange behind Android O. (flutter/engine#17882) 2020-04-23 05:59:52 -07:00
liyuqian
d5e3357c3f Read SkSL from json asset (flutter/engine#17861)
Fixes https://github.com/flutter/flutter/issues/55219
2020-04-22 14:10:17 -07:00
Emmanuel Garcia
c6f023fe75 Extend external view embedder on Android (flutter/engine#17839) 2020-04-21 19:14:38 -07:00
Gary Qian
887c1a875e PlatformResolvedLocale localization message channel (flutter/engine#17755) 2020-04-21 15:34:44 -07:00
stuartmorgan
6823cf09f2 Use UTF-16 for C++ text input model (flutter/engine#17831)
The C++ text input model used by Windows and Linux currently uses UTF-32. The intention was to facilitate handling of arrow keys, backspace/delete, etc., however since part of what is synchronized with the engine is cursor+selection offsets, and those offsets are defined in terms of UTF-16 code units, this causes very bad interactions with the framework-side model.

This converts to using UTF-16, rather than UTF-32, so that the offsets align with the framework. It also adds surrogate pair handling to the operations that adjust indexes, to avoid breaking surrogate pairs. (Arbitrary grapheme cluster handling is out of scope for this PR; while definitely desirable in the long term, surrogate pair handling is much more critical since improper handling yields invalid UTF-16, which breaks the text field).

This partially fixes https://github.com/flutter/flutter/issues/55014. A framework-side fix is also necessary (since currently both the engine and the framework attempt to handle arrow keys, which is another out-of-scope-for-this-PR issue), but even without the framework fix this dramatically improves the cursor behavior on Windows when there are surrogate pairs somewhere in the string since at least the two sides agree on what indexes mean.

Includes minor plumbing changes to the text input plumbing on Windows so that we're not pointlessly converting from UTF-16 to UTF-32 and then back to UTF-16.
2020-04-21 11:01:01 -07:00
Gary Qian
05434dc4a4 Accessibility null check to catch out of bounds hitTest (flutter/engine#17833) 2020-04-21 06:16:42 -07:00
Brian Osman
1a6e99b23d Remove legacy version of SkCanvas::didConcat44 (flutter/engine#17828)
Builds flags have been switched, so the old versions aren't needed any
longer.
2020-04-21 08:46:57 -04:00
Robert Ancell
d8cc8645bc Add pointer events to the Linux shell (flutter/engine#17304) 2020-04-21 11:27:13 +12:00
stuartmorgan
f166d4c159 Windows text input fixes (flutter/engine#17768)
Fixes a few issues with Windows text input:
- Filters out ASCII control characters
- Filters out lead surrogates, which aren't valid UTF-16 on their own so will cause assertion failures if sent to Flutter
- Adds a bandaid fix for a crash due to mismatches in indexing in the C++ and Dart text models. (A better fix would be to use UTF-16 and add surrogate pair handling to deletion and forward/back; that will be a later PR since it has a larger scope.)

Fixes https://github.com/flutter/flutter/issues/54879
2020-04-20 14:05:41 -07:00
LongCatIsLooong
c399be3ab7 Fix a typo so that the secure input view is properly initialized (flutter/engine#17816) 2020-04-20 11:39:55 -07:00
David Reveman
5439fdc086 [fuchsia] Enable raster cache on Fuchsia (flutter/engine#17753)
The raster cache is critical for good performance. This
enables the cache and provides a GrContext to ScopedFrame
instances so the cache can be efficiently populated.

Small increase in peak GPU memory usage is expected from
this change. Otherwise, no change in behavior expected.

Fixes https://github.com/flutter/flutter/issues/54950

Co-authored-by: David Reveman <reveman@google.com>
2020-04-20 10:29:08 -07:00
David Reveman
7ae25c916d [fuchsia] Adjust Skia GPU resource cache size (flutter/engine#17798)
16 MiB -> 28 MiB

Same size as what would be used on a 1024x600 display if we
allowed the common engine code to adjust this.

Co-authored-by: David Reveman <reveman@google.com>
2020-04-20 10:07:28 -07:00
Gary Qian
4dba845101 Remove Samsung workarounds (flutter/engine#17612) 2020-04-17 17:38:30 -07:00
Amir Hardon
9e7f2cbd7c Dispatch platform view touch events to the presentation (flutter/engine#17792) 2020-04-17 17:19:10 -07:00
Jason Simmons
b3baad9b94 Unregister the TextInputChannel method handler when the TextInputPlugin is destroyed (flutter/engine#17646)
Fixes https://github.com/flutter/flutter/issues/54275
2020-04-17 14:25:34 -07:00
George Wright
56bdcec5ae Enable Vulkan validation layers for shell_test (flutter/engine#17684) 2020-04-17 13:00:02 -07:00
Chris Yang
6bb1dd885a Pipeline: complete method returns a bool to indicate if complete is successful (flutter/engine#17687) 2020-04-17 10:39:16 -07:00
Brian Osman
948065c3a7 Convert semantics_node from SkMatrix44 to SkM44 (flutter/engine#17763)
* Convert semantics_node from SkMatrix44 to SkM44
2020-04-17 07:24:40 -04:00
Michael Goderbauer
e60051f0b3 Clear focus if a platform view goes away (flutter/engine#17381) 2020-04-16 13:23:05 -07:00
Brian Osman
4b424c1296 Guard canvas virtuals so we can remove legacy didConcat44 (flutter/engine#17756)
* Guard canvas virtuals so we can remove legacy didConcat44

SkMatrix44 is also deprecated, so start transitioning to SkM44.

* Fix formatting
2020-04-16 13:40:22 -04:00
LongCatIsLooong
1afb95d156 Android text input autofill (flutter/engine#17465) 2020-04-16 03:41:23 -07:00
LongCatIsLooong
fd18ae6aeb Add autofill support to ios text input plugin (flutter/engine#17493) 2020-04-16 02:47:53 -07:00
Ali Mahdiyar
28c34245cf Fix RTL handling in delete key event for android (flutter/engine#17393) 2020-04-16 01:48:21 -07:00
Jonah Williams
152ae6b486 [a11y] Support TalkBack reading by word, character, and paragraph (flutter/engine#17626) 2020-04-15 19:07:12 -07:00