2222 Commits

Author SHA1 Message Date
stuartmorgan
bfeb4ed5a4 Fix RTTI check in EncodableValue (flutter/engine#20398)
__has_feature(cxx_rtti) is a clang extension, but clients of this code
are mostly using the VS toolchain. This makes the RTTI check work with
more compilers.
2020-08-11 10:53:26 -07:00
David Worsham
c7ac7c98f7 Fix broken Fuchsia test (flutter/engine#20397) 2020-08-11 01:01:38 -07:00
David Reveman
d44cc3bcfa Add Surface::GetContext() support on Fuchsia (flutter/engine#20391)
This improves raster cache control from apps and enables
GPU acceleration for some offscreen workloads that would
fallback to software.

Test: PlatformViewTests.GetGrContextTest

Co-authored-by: David Reveman <reveman@google.com>
2020-08-10 20:51:43 -07:00
Kaushik Iska
bbe13c2353 engineCallbackOnPresent should return false if glContext is invalid (flutter/engine#20337)
Co-authored-by: Kaushik Iska <kaushikiska@google.com>
2020-08-10 16:44:20 -07:00
guolinaileen
72bfcbb0e2 Add TextInput performPrivateCommand to Flutter Engine (flutter/engine#20188)
New command for Crowdsource 2/2
2020-08-10 14:04:11 -07:00
Sanjay Chouksey
070abcfb40 Create scenic session with view focuser (flutter/engine#20288)
This change creates the scenic session with request to Focuser. The
focuser is used to request focus to a view, given it's ViewRef. The call to
requestFocus is made from PlatformView messages channel, which will
be used from Flutter side by ChildView.

Adds a PlatformView unittest for the requestFocus method.

Co-authored-by: Sanjay Chouksey <sanjayc@google.com>
2020-08-10 13:57:46 -07:00
David Worsham
02c71c1170 Dedupe sources for fuchsia shell/tests (flutter/engine#20343)
Remove the gni file, as it is confusing things
2020-08-10 13:52:19 -07:00
stuartmorgan
ebd2bb1e89 Allow extending the C++ standard codec (flutter/engine#20317)
Standard*Codec allows for extensions to support arbitrary types; this
had not previously been implemented for the C++ version.

Overview of changes:
- EncodableValue's std::variant type now allows for a new CustomEncodableValue, which is a thin wrapper around std::any, to store arbitrary extension types.
- ByteBufferStream* has been split into an interface class and the buffer-based implementation, with the former now part of the public API surface to be used in standard codec extensions.
  - They also gained utility methods for some common data types to simplify writing extensions.
- StandardCodecSerializer is now part of the public API surface, and is subclassable.
- StandardCodecSerializer's ReadValue has been split into ReadValue and ReadValueOfType to match the structure used when subclassing on the Dart side, for easier porting of custom extensions across languages.
- Standard*Codec now optionally accepts a non-default serializer in GetInstance, providing a shared instance using that serializer.

Fixes https://github.com/flutter/flutter/issues/31174
2020-08-10 13:41:13 -07:00
LongCatIsLooong
0b8e18c6f4 [iOS TextInput] Fixes selection clamping & composing range change logic (flutter/engine#20348) 2020-08-10 09:45:36 -07:00
stuartmorgan
e297b7d731 [windows] Rework controller/engine interaction in the API (flutter/engine#20266)
Changes the interaction between the view controller and engine in both the C API and
the engine API, so that there's always an engine (as on other platforms) rather than
the engine APIs being specific to headless mode.

While adjusting the C API, this does a large cleanup:
- Renames all methods to follow a `FlutterDesktop` (prefix) + "class" name + method-style name.
  E.g., `FlutterDestkopViewControllerCreate` rather than `FlutterDesktopCreateViewController`.
  This makes it easier to see what functions operate on which conceptual "object" in the API.
- Reorders and groups them by the object they operate on.

Fixes https://github.com/flutter/flutter/issues/61966
2020-08-10 09:41:18 -07:00
Emmanuel Garcia
c2c71dd96a Add FlutterFragmentActivity#getRenderMode() (flutter/engine#20245) 2020-08-07 18:41:01 -07:00
guolinaileen
3c958edb47 Add TextInput sendAppPrivateCommand to Flutter Engine (flutter/engine#20144)
Adds sendAppPrivateCommand for Crowdsource
2020-08-07 17:15:05 -07:00
Adlai Holler
dc700ae269 android_external_texture: Use the available GrDirectContext arg (flutter/engine#20303)
getGrContext is going away, plus we already have the fully-powered-up GrDirectContext available and we previously weren't using it.
2020-08-06 12:11:36 -07:00
Zachary Anderson
275f2b04cc Revert "fuchsia: Remove dead code / break dependencies (#19396)" (flutter/engine#20302)
This reverts commit 017f07942e8e80a4e886def19c6fffac7ce18479.
2020-08-06 12:06:06 -07:00
chunhtai
3ea7cae3d3 fix ios layout change cause the accessibility focus to jump randomly. (flutter/engine#20167)
* fix ios layout change cause the accessibility focus to jump randomly.

* format

* addressing review comments
2020-08-05 16:32:59 -07:00
gaaclarke
afd037961b refactored the accessibility bridge to have a view controller instead of a view (flutter/engine#18800) 2020-08-05 10:00:52 -07:00
stuartmorgan
4bbcaf10c4 [windows] Separate the engine from the view (flutter/engine#19896)
Refactors the Windows embedding internals to make an engine object that
owns things associated with the engine rather than the view, and updates
the API surface to allow using the engine directly.

This is an incremental step toward both a cleaner, non-struct-based
internal structure and a finalized API surface.
2020-08-05 08:09:13 -07:00
William Wold
ef326b26ef Improve FlRenderer interface in preperation for Wayland on Linux (flutter/engine#20006) 2020-08-05 12:04:01 +12:00
Robert Ancell
1a4c83514c Update code style to pass clang-tidy checks 2020-08-05 10:35:03 +12:00
stuartmorgan
d6fccfd566 Make EncodableValue a thin std::variant wrapper (flutter/engine#19983)
Instead of a hand-rolled discriminated union (originally used to avoid a C++17
dependency, which is no longer an issue), implement EncodableValue as a
std::variant. Rather than simply changing the internals, this makes EncodableValue
a minimal std::variant subclass with only a handful of added methodS, replacing
the old IsFoo/FooValue APIs with the standard std::holds_alternative/std::get,
so that plugin code will use a standard-based API rather than a Flutter-specific
API for wrapped values.

This is a breaking change for Windows and GLFW plugins. In the short
term USE_LEGACY_ENCODABLE_VALUE can be set in builds to use the old
version, to separate rolling from updating.

Fixes https://github.com/flutter/flutter/issues/61970
2020-08-04 08:53:07 -07:00
David Worsham
017f07942e fuchsia: Remove dead code / break dependencies (flutter/engine#19396)
The fuchsia code around metrics and sizing was just sending this
information through a side-channel, when the engine already had the
information available. So, delete all of it to make future CLs simpler.

Additionally, the SceneUpdateContext has many unneccesary dependencies
re: metrics and PaintTasks. Break those to make future CLs simpler.

Tested: Ran all unittests and ran workstation on Fuchsia
BUG: 53062, 53063
2020-08-03 22:09:26 -07:00
Justin McCandless
c611078344 Clipboard hasStrings method on iOS (flutter/engine#19859)
* Implement Clipboard hasStrings method on iOS

* Test call to hasStrings

* Formatting fixes

* Move test to its own file

* Alphabetical order

* Update licenses

* arguments nil instead of empty dictionary

* Guarantee hasStrings will be true when tested

* Formatting
2020-08-03 16:08:52 -07:00
DongXu
3944bf4015 iOS external texture supports rendering NV12 pixelbuffer (flutter/engine#20082) 2020-08-03 11:20:45 -07:00
Chris Yang
ec162103df Use a single mask view to clip iOS platform view (flutter/engine#20050) 2020-08-03 10:07:19 -07:00
Robert Ancell
ead38a2509 Fix Implments typo 2020-08-03 10:45:01 +12:00
Robert Ancell
41f57f117b Fix parameter names 2020-08-03 10:44:20 +12:00
Greg Spencer
e994f832d2 Move platform specific information to PlatformConfiguration class (flutter/engine#19652) 2020-07-31 17:21:02 -07:00
Justin McCandless
3ae4605206 Fix iOS Keyboard stuck as UIKeyboardTypeNamePhonePad (flutter/engine#20181)
P0 bug fix
2020-07-31 11:57:48 -07:00
Emmanuel Garcia
88e65719a4 Wait before switching surfaces (flutter/engine#20100) 2020-07-30 20:36:01 -07:00
Jason Simmons
6de80232b2 Revert "Enable lazy-async-stacks by-default in all modes (2) (#19270)" (flutter/engine#20165)
This reverts commit 9a94fd08b4493c7af12d2c119f1f67f3a4288264.
2020-07-30 18:34:51 -07:00
LongCatIsLooong
f522de0d27 [iOS] Fixes text input plugin crash (flutter/engine#20127) 2020-07-30 11:32:49 -07:00
Daco Harkes
8e7d90d2c4 Migrate some Dart_WeakPersistentHandle uses to Dart_FinalizableHandle (flutter/engine#20107) 2020-07-30 15:56:00 +02:00
Todd Volkert
752bbf32de Add ALERT SoundType enum value (flutter/engine#20139)
https://github.com/flutter/flutter/issues/62143
2020-07-29 23:55:38 -07:00
Jason Simmons
0c3c6ab964 Add missing MouseCursorPlugin destroy call (flutter/engine#19968) 2020-07-29 17:01:04 -07:00
Siva
03706dce89 Manual roll of Dart from 24c7666def...40fd1c456e (flutter/engine#20092)
* Manual roll of Dart from 24c7666def...40fd1c456e

dart-lang/sdk@40fd1c456e Revert "[dart:io] Add Abort() on HttpClientRequest"
dart-lang/sdk@17d7296a42 [vm/nnbd/bytecode] Fix reuse of type arguments in bytecode
dart-lang/sdk@58b6f40c73 Issue 42797. Understand in legacy libraries that a function returning Never (in Null Safety library) never returns. (reland)
dart-lang/sdk@fc8a6d9f9b [VM/compiler] Dereference TypeRef literal when propagating constants.
dart-lang/sdk@0689ec527a Move "test.dart" (well, most of its contents) into pkg/test_runner.
dart-lang/sdk@1094b3c61d Prepare static error test updater tool to handle web tests.
dart-lang/sdk@b258585f2f [observatory] Migrate from deprecated isInstanceOf to isA.
dart-lang/sdk@dfe1d9b682 Disable OverrideContributor for Cider.
dart-lang/sdk@aea99b2f5c scope debug property assist to Diagnosticables
dart-lang/sdk@4b96f20a79 [dart:io] Add Abort() on HttpClientRequest
dart-lang/sdk@1b1a39708c [build] Use frameworks instead of libs
dart-lang/sdk@3fef522496 Revert "Reland "[vm] Replaces fuchsia.deprecatedtimezone""
dart-lang/sdk@8c664d4f3f Revert "Issue 42797. Understand in legacy libraries that a function returning Never (in Null Safety library) never returns."
dart-lang/sdk@2efb5bebc7 [ dart:_http ] Fix typo in HTTP response timeline event
dart-lang/sdk@0884dae36c Revert "Fix the #include path for ICU headers"
dart-lang/sdk@5171534e81 Scope tweaks. Report REFERENCED_BEFORE_DECLARATION in more places.
dart-lang/sdk@6bba75079a Issue 42797. Understand in legacy libraries that a function returning Never (in Null Safety library) never returns.
dart-lang/sdk@b4ebbb7f5c [build] Update gn to match Fuchsia
dart-lang/sdk@cb428a7a02 [dart2js] Remove old bug work around in collector.
dart-lang/sdk@08663c20ab Change flutter patch to match existing DEPS on master branch
dart-lang/sdk@146ad014d9 update js/meta for the 2.10 dev sdk
dart-lang/sdk@488c718793 [co19] Roll co19 to d79951e06e443213243e54c2c32694b79a221b65
dart-lang/sdk@ba20edd7be Add patch for flutter-engine when changing to version 2.10

* Rev buildroot to latest version.

* Update license.

* update.

* Update gn revision.

* Format BUILD.gn files as the gn revision has been updated.
2020-07-29 13:10:15 -07:00
Clement Skau
9a94fd08b4 Enable lazy-async-stacks by-default in all modes (2) (flutter/engine#19270) 2020-07-29 12:25:30 +02:00
Sanjay Chouksey
442e4d82fc Allow access to a zircon handle's koid (flutter/engine#20087)
A zircon handle is associated with a koid, kernal object identifier.
Whereas the handle can be duplicated, koid is unique. Two distinct
handles can point to the same kernal object, if their koids are
the same.

This change adds access to koid for a Handle object.

Test: Adds a unittest for koid

Co-authored-by: Sanjay Chouksey <sanjayc@google.com>
2020-07-28 16:32:17 -07:00
Adlai Holler
e5614964f4 Use the GrDirectContext factories instead of deprecated GrContext ones (flutter/engine#19962)
This is part of a larger effort to expose the difference between GrDirectContext,
which runs on the GPU thread and can directly perform operations like uploading
textures, and GrRecordingContext, which can only queue up work to be delivered
to the GrDirectContext later.
2020-07-28 13:32:09 -07:00
Yuqian Li
d026bc360e Add purge-persistent-cache (flutter/engine#20013)
For https://github.com/flutter/flutter/issues/39526
2020-07-28 10:29:59 -07:00
LongCatIsLooong
cfb0e1570f Add autofill save for iOS and Android (flutter/engine#18643) 2020-07-28 10:23:55 -07:00
chunhtai
23fb7c08c6 fix FlutterViewUpdateCustomAccessibilityActions uses correct string list (flutter/engine#19623)
* fix FlutterViewUpdateCustomAccessibilityActions uses correct string list

* add test to ci

* format

* add license file

* fix test

* fix lint
2020-07-28 09:49:59 -07:00
stuartmorgan
cd66f501cb Fix invalid selection handling in text plugins (flutter/engine#19899)
The Windows, Linux, and GLFW embeddings (which all share a common code
ancestry) pass TextInput.setEditingState selection base and extents
straight through to the shared text model class. The model expects those
values to be valid, but the framework sends -1/-1 for "invalid"
selections, which happen for some empty text cases (e.g.,
TextFieldController.clear()).

This translates those invalid selection values to an empty selection at
the start of the string, as expected by the model.

Fixes https://github.com/flutter/flutter/issues/59140
2020-07-27 11:00:02 -07:00
Emmanuel Garcia
da28c5954a bool SubmitFrame -> void SubmitFrame (flutter/engine#18984) 2020-07-23 16:16:02 -07:00
Todd Volkert
f13417b37a Add support for playing alert sound on MacOS (flutter/engine#19970)
flutter/flutter#62143
2020-07-23 14:00:13 -07:00
Emmanuel Garcia
b7345a4242 Remove android view from the Mutator stack (flutter/engine#19972) 2020-07-23 10:50:15 -07:00
Felipe Archondo
6cdf2e8d43 fix and re-enable SessionConnection unit tests (flutter/engine#19812)
[fuchsia] fix and re-enable SessionConnection unittests

This change waits until Scenic is initialized before beginning the test
logic. This should fix the issue where the test starts running before or
during Scenic startup.
2020-07-23 12:15:07 -04:00
gaaclarke
ee0e1788d9 Made the linter print out more information in its output and fixed bugs (flutter/engine#19895) 2020-07-22 15:38:09 -07:00
Greg Spencer
36d1a9f78c Revert "Implement delayed event synthesis key event handling for Android (#19024)" (flutter/engine#19956)
This reverts commit adeb2599ce8c144daef5e77bd25c4da6cae7bc44 because it breaks flutter_gallery__back_button_memory and a customer test.
2020-07-22 12:36:26 -07:00
William Wold
f9535697d8 Change FlView::renderer from X11-specific to generic 2020-07-22 11:17:38 +12:00
William Wold
31b6df06b4 Call eglGetError() before other EGL calls that will wipe it 2020-07-22 11:17:38 +12:00