1934 Commits

Author SHA1 Message Date
Jason Simmons
663bfe8d61
Remove the ResourceCleaner from the Android embedding (#18072) 2020-05-04 16:34:02 -07:00
Robert Ancell
95ecd9a405
Move G_END_DECLS that was in the wrong place (#18116) 2020-05-05 09:11:57 +12:00
Robert Ancell
180a497ee5
Support platform messages in Linux shell (#17995) 2020-05-04 17:03:04 +12:00
gabeschine
72fe227a50
Update Fuchsia ComponentContext constructor call to renamed, but equvalent, method (#18067)
This change is part of an LSC in Fuchsia, and is a functionality no-op.

Fixes fxbug.dev/50759

Co-authored-by: Gabriel Schine <thatguy@google.com>
2020-05-01 15:04:58 -07:00
Gary Qian
7a05fcbdbe
Revert "Remove Samsung workarounds (#17612)" (#18081)
This reverts commit a5e0b2f2f2376cdd87f9c690ae1ab6074321ecc3.
2020-05-01 13:14:27 -07:00
Chinmay Garde
e9f20601f1
Don't depend on an implicit transaction when presenting drawables on the raster thread. (#18076)
The way transactions were added changed in
68fd833488.
This broke rendering using both Metal and OpenGL when no implicit transaction
was present on the transaction stack. The failure models differ based on Metal
vs. OpenGL and iOS/device versions. On older versions of iOS, rendering would
consume memory till exhaustion. On newer iOS versions, rendering would be stuck
(till a timeout). This patch brings transaction management back in line with as
it was earlier and also makes the Metal backend resilient to transactions being
present on the transaction stack at all. Since this is still quite brittle,
transaction management must be moved to IOSSurface as a followup.

Fixes https://github.com/flutter/flutter/issues/55784.
2020-05-01 13:05:23 -07:00
Alexander Aprelev
1c8ee9856b
Introduce runtime check that it is root isolate that makes UI native calls. (#18050)
* Revert "Do not register UI-related native functions in secondary isolates (#6401)"

This reverts commit 69ae5694de54d2a163743dcec727fcea1c7bc8e1 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
24df4a2768
[fuchsia] set vsync_offset based on config file (#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
6634497724
Add an API for resyncing output streams (#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
4c4e24bd77
Bundle the validation layers and enable them if --enable-vulkan-validation-layers is specified to gn (#17854) 2020-04-30 16:06:59 -07:00
Kaushik Iska
6530b57d0d
[fuchsia] Log unregistered platform channels only once (#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
fe70fc74a0
[fuchsia] Use dart::ComponentContext() (#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
Wings006
84093e844c
make "flutter run --trace-systrace" work. (#18052) 2020-04-30 09:30:24 -07:00
stuartmorgan
32a4cc5ed4
Fix method handler control flow in Windows and Linux text input plugins (#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
2e738ee40e
[Metal] On context loss with a paused texture source, preserve external pixel buffer. (#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
ae96c36c55
Replace usage of NULL with nullptr to match coding style (#18023) 2020-04-29 13:26:27 -07:00
Robert Ancell
34f516b016
Use g_warning instead of stderr (#17994) 2020-04-29 15:13:29 +12:00
George Wright
df4596d87b
Set the max Vulkan API version when creating the GrContext (#18007) 2020-04-28 14:15:56 -07:00
Robert Ancell
fda26fc70f
Run Flutter platform tasks in GLib main loop (#17910)
Fixes https://github.com/flutter/flutter/issues/54856
2020-04-29 09:13:58 +12:00
xster
45e6cfd1ff
remove top padding when system UI in fullscreen mode (#17985) 2020-04-28 12:21:37 -07:00
gaaclarke
5f437fb4f6
Started ignoring remote keyboard notifications. (#17981) 2020-04-27 17:30:50 -07:00
Emmanuel Garcia
eed05dd00d
Add initial unit tests for the android embedding (#17921) 2020-04-26 20:45:28 -07:00
xster
2589d07ee9
Fix accessibility focus loss when first focusing on text field (#17803) 2020-04-24 15:44:54 -07:00
Robert Ancell
9ece5ba789
Fix units used in Linux shell timestamps. (#17912)
GTK uses timestamps in milliseconds, Flutter wants them in microseconds.
2020-04-24 13:30:34 +12:00
Gary Qian
0273fab759
Hand off presentation properly in VirtualDisplayController.resize() (#17897) 2020-04-23 15:32:20 -07:00
Robert Ancell
12012f135c
Refactor FlutterEngine usage in Linux shell (#17363) 2020-04-24 10:30:41 +12:00
LongCatIsLooong
1df760024d
add missing case for TextInput.requestAutofill (#17857) 2020-04-23 10:52:47 -07:00
Mehmet Fidanboylu
feb94f6c97
Protect LanguageRange behind Android O. (#17882) 2020-04-23 05:59:52 -07:00
Emmanuel Garcia
b1c51cfe78
Extend external view embedder on Android (#17839) 2020-04-21 19:14:38 -07:00
Gary Qian
8dc91229b4
PlatformResolvedLocale localization message channel (#17755) 2020-04-21 15:34:44 -07:00
stuartmorgan
ed58844e8a
Use UTF-16 for C++ text input model (#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
52a815df0a
Accessibility null check to catch out of bounds hitTest (#17833) 2020-04-21 06:16:42 -07:00
Robert Ancell
1dba1ef1f8
Add pointer events to the Linux shell (#17304) 2020-04-21 11:27:13 +12:00
stuartmorgan
fa8b9a5380
Windows text input fixes (#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
1cb6db6283
Fix a typo so that the secure input view is properly initialized (#17816) 2020-04-20 11:39:55 -07:00
David Reveman
ae311ca4da
[fuchsia] Enable raster cache on Fuchsia (#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
a15eca8b4f
[fuchsia] Adjust Skia GPU resource cache size (#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
a5e0b2f2f2
Remove Samsung workarounds (#17612) 2020-04-17 17:38:30 -07:00
Amir Hardon
f13031b026
Dispatch platform view touch events to the presentation (#17792) 2020-04-17 17:19:10 -07:00
Jason Simmons
f9e53c72c6
Unregister the TextInputChannel method handler when the TextInputPlugin is destroyed (#17646)
Fixes https://github.com/flutter/flutter/issues/54275
2020-04-17 14:25:34 -07:00
George Wright
9f31d81dcd
Enable Vulkan validation layers for shell_test (#17684) 2020-04-17 13:00:02 -07:00
Brian Osman
fb208b486e
Convert semantics_node from SkMatrix44 to SkM44 (#17763)
* Convert semantics_node from SkMatrix44 to SkM44
2020-04-17 07:24:40 -04:00
Michael Goderbauer
f4d6ce13dc
Clear focus if a platform view goes away (#17381) 2020-04-16 13:23:05 -07:00
LongCatIsLooong
cf3d738f50
Android text input autofill (#17465) 2020-04-16 03:41:23 -07:00
LongCatIsLooong
104df6bba4
Add autofill support to ios text input plugin (#17493) 2020-04-16 02:47:53 -07:00
Ali Mahdiyar
6b883e9ff7
Fix RTL handling in delete key event for android (#17393) 2020-04-16 01:48:21 -07:00
Jonah Williams
6e1d7f8883
[a11y] Support TalkBack reading by word, character, and paragraph (#17626) 2020-04-15 19:07:12 -07:00
stuartmorgan
2fe73589fb
Use the right constant for macOS event timestamps (#17713)
The NSEvent->Flutter event conversion code for pointer events was
multiplying seconds by nanoseconds per milliseconds. While this does end
up giving the right number of microseconds, it's a very confusing way to
write it.
2020-04-15 14:33:00 -07:00
gaaclarke
3791f0bc8c
Added some tests after the fact for #17499 (#17714) 2020-04-15 11:52:52 -07:00
stuartmorgan
7498dc2af5
Fix Windows clipboard handling (#17706)
Fixes several bugs in the clipboard code, and makes some structural
improvements:
- Adds scoped wrappers for clipboard open/close and global lock/unlock,
  to prevent missing cleanup, fixing at least one case where the lock
  was not released.
- Adds the relevant window handle to the clipboard calls, since the docs
  suggest that some operations won't work without one.
- Adds a missing clear step to setting the clipboard data.
- Switches from TEXT to UNICODETEXT to handle non-ASCII text correctly.
  - To enable that, adds UTF-16/-8 conversion utilities built on the
    Win32 APIs (rather than the deprecated std::codecvt functions, as
    have been previously used in the engine).
- Fixes handling of getting data when the clipboard is empty, correctly
  returning null.
- Passes more errors back through the method channel, with details, for
  easier debugging of future issues.

Fixes https://github.com/flutter/flutter/issues/54226
2020-04-15 07:02:58 -07:00