Adds methods to get and set the window size, as well as to query the
window's scale factor. This is useful both for custom clients, and for
building a window resize plugin to prototype what will eventually likely
be a system channel.
Plugins may need to be able to access functions affecting the GLFW
window (e.g., a plugin to resize the window). This restructures the API
to create a distinction at both the C and C++ level between the window
controller, which provides access to high-level behaviors driving the
Flutter application, and the window, which provides access to functions
to affect the UI state of the window (i.e., wrapped GLFWwindow
functions).
Also provides a PluginRegistrar extension for plugins that need access
to GLFW-specific functionality.
* Re-create texture from pixel buffer onGrContextCreate
OnGrContextDestroy we destroy the texture, this is because
we can not access it from the potentially new context that
we get on bringing the app back to foreground.
To show a valid texture on fg, we need to preserve the pixel
buffer, using which we will create the new texture.
* ensure texture cache exists
* only reset pixel buffer if not null.
Class.newInstance() propagates any exception thrown by the nullary
constructor, including a checked exception. This effectively bypasses
the compile-time exception checking that would otherwise be performed by
the compiler. The Constructor.newInstance method avoids this problem by
wrapping any exception thrown by the constructor in a (checked)
InvocationTargetException.
If the mapping callback is not set or it the callback returns invalid data, ICU initialization will be embedder responsibility.
This affects all embedders and the following have been audited:
* Android: Via a symbol mapping.
* iOS: Via a file mapping.
* Embedder: Via a file mapping.
* Fuchsia: Via a VMO mapping
* Test shells and Flutter tester: Via file mapping with ICU data needing to be next to the executable.
The GetMapping calls removed in this patch had the same code and had to be repeated across different test harnesses as well as in dart_snapshot.cc. Just make this a factory method so the code is less verbose.
Creates a minimal FLEPluginRegistry protocol, which is a subset of the
FlutterPluginRegistry.
This is a small step toward eventually merging the APIs, but allows
changing the example project structure to better reflect what a future
template will look like.
Adds StandardMethodCodec support to the C++ client wrapper. This makes it
substantially easier to add Windows and Linux support for existing plugins, as
StandardMethodCodec is the default plugin protocol.
Fixesflutter/flutter#30670
Does not include extensibility for the codec, which will be added later.
Adds a type that can hold any of the types corresponding to the Dart types
that are supported by the standard message channel codec. This provides
the foundation for adding standard message codec support for the C++
desktop shells (flutter/flutter#30670).
Adds a guard on `_activeClientID` in `insertNewline:`. The conditional
around the `insertText:replacementRange:` call already catches this, but
we then unconditionally pack `_activeClientID` into an `NSArray`, which
disallows nil.
FlutterStandardReader's `readValueOfType:` method returns nil when
called with `FlutterStandardFieldNil`. By extension, `readValue` can
also return nil values.
Since the GLFW shell is likely to continue to exist in at least the
medium term, it is useful for maintenance to be able to build and use it
on any desktop platform.
Includes a buildroot roll to pick up the macOS build suppport for
third_party/glfw.
Some components in the Flutter engine were derived from the forked blink codebase. While the forked components have either been removed or rewritten, the use of the blink namespace has mostly (and inconsistently) remained. This renames the blink namesapce to flutter for consistency. There are no functional changes in this patch.