2255 Commits

Author SHA1 Message Date
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
stuartmorgan
6dbd05214c Use the right constant for macOS event timestamps (flutter/engine#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
43dffbd739 Added some tests after the fact for #17499 (flutter/engine#17714) 2020-04-15 11:52:52 -07:00
stuartmorgan
cb13b1198f Fix Windows clipboard handling (flutter/engine#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
stuartmorgan
a530cb9082 Add a gn flag to disable desktop embeddings (flutter/engine#17708)
Desktop embedding dependencies can trigger gn-generation-time
requiremenets; e.g., the Linux embeddings have pkg-config dependencies.
This can be problematic in some build environments, such as building
flutter_engine.so with a custom sysroot where those higher-level
dependencies aren't available.

This flag allows generating build files that don't have those
dependencies.
2020-04-14 17:48:18 -07:00
gaaclarke
f29e60bff1 switched to using the ocmock build file in //build (flutter/engine#17707) 2020-04-14 14:43:29 -07:00
stuartmorgan
fb6e9d1c6f Adjust the GLFW build options (flutter/engine#17704)
- Adds an explicit option for not building the GLFW embedding.
- Disables GLFW by default on Windows, where it's no longer the
  uploaded embedding.
- Moves the X11 pkg-config, which is only used by the GLFW embedding,
  behind the GLFW build flag.
2020-04-14 12:45:21 -07:00
Robert Ancell
971f86d844 Move Linux shell docstrings to headers (flutter/engine#17410)
Update docstrings for typos and grammar style specified in the style guide.
2020-04-14 15:41:23 +12:00
gaaclarke
3849b114d4 Made it so unit tests can be written against all ios engine code. (flutter/engine#17624) 2020-04-13 12:34:54 -07:00
George Wright
05390d1871 Enable required extension 2020-04-13 12:14:06 -07:00
stuartmorgan
9db5c3fb62 Fix C++ MethodChannel reply type (flutter/engine#17607)
Makes InvokeMethod's reply a high-level response object, rather than
binary data, matching the abstraction level of the class (and the other
languages' implementations).

In support of that:
- Adds the logic to the codecs to decode response envelopes, which had
  never been implemented.
- Adds a convience implementation of MethodResult that forwards to
  lambdas, so that one-off invocation handlers are easier to write.

Also simplified BinaryMessenger's API so that subclasses only need to
implement one version of Send, rather than two almost-identical versions.

Fixes https://github.com/flutter/flutter/issues/53223
2020-04-11 19:06:37 -07:00
Jason Simmons
2105db78eb Update editing state in InputConnectionAdaptor.setSelection (flutter/engine#17652)
The BaseInputConnection superclass does not call endBatchEdit
in setSelection and therefore does not implicitly cause
InputConnectionAdaptor to send a state update.

Some input modes such as numeric keypads will not function without
these updates.
2020-04-11 17:29:50 -07:00
Mehmet Fidanboylu
2a925e4636 Add support for setting allow http flag in Dart VM (flutter/engine#17653) 2020-04-11 11:55:05 -07:00