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.
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
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
* 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
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>
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.
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
[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.
This implements the design in flutter.dev/go/handling-synchronous-keyboard-events for Android.
I started with Android, but this will be used for all platforms as we add them.
The related framework PR is: flutter/flutter#59358 (which has already landed)