Targeted suppression of some deprecation warnings that are build errors under
clang:
- Ignore the deprecation of codecvt's unicode conversion until we decide on
a replacement strategy.
- Allow the deprecated posix names of functions in third_party/txt.
Part of https://github.com/flutter/flutter/issues/16256
To give more flexibility in scheduling, we change the number of frames
in flight we can have at one time to 3. We also introduce an offset from
VSync that Flutter can use to begin its work at. It is currently set at
0ms, matching previous behavior.
Clang has different warning settings, so catches different issues than
the VS compile. This fixes various minor issues caught by clang.
Part of https://github.com/flutter/flutter/issues/16256
No change in behavior expected. We have 2 frames in flight as before. By switching to Present2 and specifying a kMaxFramesInFlight however, we allow us greater flexibility to change how Flutter schedules its frames.
This change also adds tests for SessionConnection and VsyncRecorder.
Fixes a bug where deleteBackward was checking for being at the start of
the text before checking for a non-empty selection, breaking deletion
when the entire text field was selected.
Also removes an (incorrect) post-deletion position update that was
redundant with code in insertText:replacementRange:, and thus having no
effect.
Fixes https://github.com/flutter/flutter/issues/46150
This was only necessary when the Engine had to build in multiple buildroots
where the sources where checked out at different paths relative to the
buildroot. This is no longer the case and there are already cases GN rules
have been written that mix and match variable usage with the direct
specification of the path to the Flutter sources relative to the sole buildroot.
FlutterView#enableTransparentBackground has been deprecated for some
time now since it breaks a11y highlighting in most cases. When the
warning was first added there was no known workaround, but now the v2
embedding is in stable and ready to support this usecase. Update the
warning to point to the v2 embedding.
Some parts of the embedding (e.g. VsyncWaiter) may hold global references to
system services obtained through the context used during initialization.
These must not be associated with an activity or other non-application context.
Fixes https://github.com/flutter/flutter/issues/49612
This condition may arise when the embedder passes in a path to a non-existent
dylib. Instead of crashing, the embedder will now return an error response.
Fixes https://github.com/flutter/flutter/issues/49732
This is in the same vein as https://github.com/flutter/engine/pull/16081 but
includes holding the mutex when updating all members in the Captures struct
instead of just when tracking thread IDs.
This was introduced in
ef31000576.
The assertion was originally written to check that more than 4 threads were
managed by the engine (UI, Platform, GPU, IO + ConcurrentWQWorkers). However,
the assertion actually only checked the count of workers in the ConcurrentWQ. As
written, this assertion would fail on all hosts with a hardware concurrency of
less than 4. Remove the assertion. The engine threads count and its assertions
already check callbacks on workers. So this check was incorrect and redundant.
`FlutterEnginePostCallbackOnAllNativeThreads` schedule a callback to be run on
all engine managed threads. The engine will attempt to service this callback the
next time the message loops for each managed thread is idle. Since the engine
manages the entire lifecycle of multiple threads, there is no opportunity for
the embedders to finely tune the priorities of threads directly, or, perform
other thread specific configuration (for example, setting thread names for
tracing). This callback gives embedders a chance to affect such tuning.
Fixesflutter/flutter#49551
Fixes b/143774406
Fixes b/148278215
Fixes b/148278931
Tonic used to be used by multiple consumers outside of Flutter Engine. Due to
this, it has an unnecessary abstraction layer as well as utilities duplicated in
FML and other engine subsystems. The sole user of Tonic is now the Flutter
Engine. It is intended that the Flutter Engine team now owns this subsystem,
remove unnecessary utilities and document the headers. This is the first step in
the transition. No history is being imported as the initial history was already
lost in the transition of this component to fuchsia.googlesource. As this
component was unmaintained there, I could see no additional value in importing
the history of the patches there.
No functional change. Just moved the repo from //third_party to
//flutter/third_party and updates GN refs.
Currently we're automatically registering plugins both when the
FlutterEngine is constructed and in the `flutter create` template, when
FlutterActivity#configureFlutterEngine is called. The initial
registration is too early to contain a reference to the activity and the
second registration can cause problems in some plugins.
This alters the flow so automatic registration happens in two discrete
places, and contains the `activity` in its first and only call for most
apps.
1. We're no longer automatically registering plugins on `FlutterEngine`
in any of our activities/fragments at construction time. But since the
FlutterEngine default constructor still automatically registers plugins,
anyone constructing the engine themselves (for example, in a service) is
still going to get automatic registration at `FlutterEngine`
instantiation time.
2. We now automatically register plugins in the base `FlutterActivity`'s
`configureFlutterEngine` hook. Anyone using `FlutterActivity` (or
`FlutterFragment`) should be automatically registered once that hook is
called. Right now the `flutter create` template overrides the base class
method with a subclass that registers everything manually in the same
spot. But with this in place we can safely recommend to remove the
subclass and rely on this hook to automatically register going forward.
Registering at this time means `activity` is set correctly.
Eliminates an unused dependency on android.os.build. The last remaining
use of this was eliminated in 0ad44285bd91d5e0a17facbac0d16eab7e60a110
with the removal of an unused method that contained an android version
check.