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
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.
- 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.
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
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.
This event goes from now -> current vsync target time
to avoid the limitations as seen in https://github.com/flutter/flutter/issues/54095#issuecomment-610636237
This event also tags additional metadata to capture
`vsync_transitions_missed` considering the refresh rate of the display.
Relands #17489 with a fix for the unit test flake.
The previous unit test relied on the new instance not being created at the same memory address, which isn't guaranteed.
The transitive dependency on the embedder library brings in the right
runtime for the build mode, so directly depending on the JIT version
isn't necessary, and causes duplicate symbol issues in release builds.
I fixed a bug that left a blank at the bottom of the screen when the iPad's split keyboard was hidden.
I also had the same problem with this issue, so I fixed it.
iPad split keyboard cause a blank space problem
There is no function to change the space size at the bottom of the screen when the split keyboard is moved. This is because it's not clear what the keyboard should do when it's moved to the top of the screen.
Seems to have triggered flaky failures on the Windows bot since landing.
Example failure:
[ RUN ] PluginRegistrarTest.ManagerRemovesOnDestruction
c:\b\s\w\ir\cache\builder\src\flutter\shell\platform\common\cpp\client_wrapper\plugin_registrar_unittests.cc(149): error: Expected: (manager->GetRegistrar<PluginRegistrar>(dummy_registrar_handle)) != (first_wrapper), actual: 000002400A90E3D0 vs 000002400A90E3D0
This reverts commit 478a7855943d81a58dd9e9037fb338d3a18bb294.
This makes two changes:
- Adds a way to register a callback for when a FlutterDesktopPluginRegistrarRef is destroyed, and implements the logic to call it in the Windows and Linux embeddings.
- Adds a class to the C++ wrapper that handles making a singleton owning PluginRegistrar wrappers, and destroying them when the underlying reference goes away, to avoid needing that boilerplate code in every plugin's source.
Fixes https://github.com/flutter/flutter/issues/53496
This change also adds TimeRecorder which records time at the start
of each frame to capture the latest vsync target display time and
wires it in to the rasterizer to add trace events when there is a lag.
The JSON codec is awkward to use in the wrapper (since the client has to build and link one of the JSON libraries to do so). Since it would be very cumbersome to wrap in a C API, and there's essentially no reason to use it instead of the standard codec, this removes it from the wrapper entirely.
Since some system channels (internal to the engine) still use it, it's moved into common/cpp instead of being eliminated entirely. Internally we always use RapidJSON though, so the jsoncpp implementation is removed. Also adds some unit test coverage, since there wasn't any.
Fixes#30669
* "Reland Clang 11, roll buildroot to 1bc40a5f916adb93d87e2a2230a0ec43db876c1c, take 4 (#17467)" (#17482)"
This reverts commit d7bbf2e70c8cb86823f1ec7a310d6ab0b9a610db.
* format code
* Roll buildroot to 3a27de1c5bb0f50be7d3efe3e00de4f6068c9f30