__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.
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>
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>
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
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
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.