3051 Commits

Author SHA1 Message Date
stuartmorgan
69e4ea885f Suppress some deprecation warnings on Windows (flutter/engine#16416)
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
2020-02-05 21:10:25 -08:00
Felipe Archondo
4884bd75f9 [fuchsia] change kMaxFramesInFlight to 3 (flutter/engine#16425)
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.
2020-02-05 23:58:05 -05:00
gaaclarke
829529ba4c Added a plugin method that gets called when the engine is about to be deleted (flutter/engine#16336) 2020-02-05 16:12:16 -08:00
stuartmorgan
1749454a9f Fix Windows embedding issues caught by clang (flutter/engine#16369)
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
2020-02-05 14:27:09 -08:00
Felipe Archondo
456e65b23f [fuchsia] Migrate flutter runner to use Present2 (flutter/engine#14162)
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.
2020-02-05 13:51:04 -08:00
gaaclarke
d185bc8360 Copied Apple's semantics for switches, made checkboxes the same. (flutter/engine#16211) 2020-02-05 10:13:31 -08:00
Dan Field
8e419f3347 Fuchsia a11y actions (flutter/engine#16321) 2020-02-04 19:01:19 -08:00
Jonah Williams
14e4054d2a Expose enable-service-port-fallback switch (flutter/engine#16366) 2020-02-04 12:00:58 -08:00
Amir Hardon
69ec7d5dfd Revert "Remove use of the deprecated AccessibilityNodeInfo boundsInPa… (flutter/engine#16355) 2020-02-04 11:43:03 -08:00
George Wright
726dfa2685 Refactor of Vulkan GPUSurface code (flutter/engine#16224)
Co-authored-by: David Worsham <arbreng@gmail.com>
2020-02-04 10:44:35 -08:00
Matt Carroll
672995657d Added API guards to flags in PlatformPlugin that were introduced after Flutter's min SDK version. (flutter/engine#13965) 2020-02-03 16:25:27 -08:00
stuartmorgan
3d5bb2ac20 Fix delete of entire selection in macOS text input (flutter/engine#16276)
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
2020-02-03 15:22:44 -08:00
Dan Field
532034e27a Change NSLog to FML_DLOG (flutter/engine#16331) 2020-02-03 10:07:59 -08:00
Dan Field
9a992f900b Revert "Modifies accessibility bridge to populate new node fields in semantic… (#15116)" (flutter/engine#16323)
This reverts commit 3235e60fb2f8eedbf35406335b40820f6930feab.
2020-01-31 23:31:27 -08:00
Chinmay Garde
426c48aaac Remove all uses of the redundant flutter_root variable. (flutter/engine#16311)
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.
2020-01-31 21:49:48 -08:00
Michael Klimushyn
ce5a855501 Deprecated FlutterView v1 points to FlutterView v2 (flutter/engine#16304)
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.
2020-01-31 15:06:52 -08:00
Chinmay Garde
2a949ca345 Isolate and move common portable ELF loading from fixtures into //flutter/testing. (flutter/engine#16305)
Also update all known test harnesses to use this and fixes the broken shell_unittests harness.

Fixes https://github.com/flutter/flutter/issues/49853
2020-01-31 12:52:00 -08:00
Jason Simmons
5453ed7721 Ensure that Android embedding initialization always uses an application context (flutter/engine#16204)
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
2020-01-31 12:09:38 -08:00
George Wright
2ac9db0623 Use static constexpr for iphone_xs_times (flutter/engine#16264) 2020-01-31 10:04:39 -08:00
gaaclarke
78f0324c21 Started coalescing updates to viewport metrics after foregrounding the app. (flutter/engine#16270) 2020-01-31 09:31:27 -08:00
George Wright
baf04d4ca5 Revert "Migrate flutter_runner from flutter_runner::{Thread,Loop} to fml::{Thread,MessageLoop} (#15118)" (flutter/engine#16277)
This reverts commit 33999d4bc3ee47928ef959d910d4bbfb42b963fd.
2020-01-30 17:19:13 -08:00
Matt Carroll
122e9dda72 Notify PlatformViewsController within FlutterEngine when a hot restart occurs. (#48518) (flutter/engine#16230) 2020-01-30 12:58:41 -08:00
Chinmay Garde
275ecda4d6 Remove buggy test to check if tasks can be posted on all native threads recursively from the emebdder. (flutter/engine#16214)
This was never thread safe to shutdown of the concurrent message loop.
2020-01-29 18:16:09 -08:00
Chinmay Garde
e95df2d3af In the test harness, don’t attempt to load AOT snapshots from non-existent dylibs. (flutter/engine#16210)
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
2020-01-29 15:49:29 -08:00
Alexander Brusher
3235e60fb2 Modifies accessibility bridge to populate new node fields in semantic… (flutter/engine#15116) 2020-01-29 10:38:21 -08:00
Jonah Williams
60d4636c9e Allow --enable-service-port-fallback as a whitelisted arg (flutter/engine#16167) 2020-01-29 09:17:45 -08:00
Chris Yang
56929f0ee2 Revert "Always make gpu thread different from platform thread regardless of platform view (#16068)" (flutter/engine#16161)
This reverts commit f979af16ec379f268468015c7cb555849783ec21.
2020-01-28 15:12:25 -08:00
Chris Yang
f979af16ec Always make gpu thread different from platform thread regardless of platform view (flutter/engine#16068) 2020-01-28 11:36:43 -08:00
Francisco Magdaleno
a4fe86b745 Gets the DPI for all awareness mode and older Windows versions (flutter/engine#15951) 2020-01-27 18:48:03 -08:00
Chinmay Garde
87beaf3a9b Hold a mutex when updating all CanPostTaskToAllNativeThreads::Captures members. (flutter/engine#16085)
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.
2020-01-27 18:37:20 -08:00
Chinmay Garde
ec873f14d7 Fix flake by making thread ID tracking in CanPostTaskToAllNativeThreads thread safe. (flutter/engine#16081) 2020-01-27 17:34:56 -08:00
Chinmay Garde
80367b5298 Remove buggy assertion in EmbedderTest::CanPostTaskToAllNativeThreads. (flutter/engine#16071)
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.
2020-01-27 16:00:34 -08:00
Chinmay Garde
ef31000576 Allow embedders to schedule a callback on all engine managed threads. (flutter/engine#15980)
`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.

Fixes flutter/flutter#49551
Fixes b/143774406
Fixes b/148278215
Fixes b/148278931
2020-01-27 13:49:39 -08:00
Chinmay Garde
93d67baf2b Move tonic into //flutter/third_party. (flutter/engine#15895)
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.
2020-01-25 17:01:56 -08:00
Michael Klimushyn
f3ec835234 Register plugins at the right time, once (flutter/engine#15979)
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.
2020-01-25 00:34:52 -08:00
Chris Bracken
d96d9de930 Eliminate unused import in Android embedding (flutter/engine#15975)
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.
2020-01-24 16:19:00 -08:00
Matt Carroll
10e5d6d7b5 Prevent duplicate plugin registration in FlutterEnginePluginRegistry. (#49365) (flutter/engine#15956) 2020-01-24 15:57:51 -08:00
Kaushik Iska
024a753078 [fuchsia] Expose view_ref as part of dart:fuchsia initialization (flutter/engine#15958)
fixes https://github.com/flutter/flutter/issues/47178
2020-01-24 13:42:19 -08:00
George Wright
2d2da1dd64 Refactor ShellTest to allow for different ShellTestPlatformViews (flutter/engine#15972)
This paves the way for us to have shell_unittests backed by different rendering APIs (e.g. OpenGL, Vulkan, Metal).
2020-01-24 13:29:12 -08:00
Dan Field
62a99c60c5 the the fix (flutter/engine#15973) 2020-01-24 12:43:32 -08:00
George Wright
33999d4bc3 Migrate flutter_runner from flutter_runner::{Thread,Loop} to fml::{Thread,MessageLoop} (flutter/engine#15118) 2020-01-23 18:54:49 -08:00
Wu Zhong
9e59686653 Fixes FlutterCallbackInfomation leaks (flutter/engine#15089)
See: flutter/flutter#46750
2020-01-23 16:33:26 -08:00
Wu Zhong
cf8b9d5e1a Fixes oc leaks in platform plugin (flutter/engine#15041)
Some objc objects are not released in the iOS embedder. This fixes a
subset of those leaks in FlutterPlatformPlugin.mm.
2020-01-23 16:32:31 -08:00
Miguel
497dc90ab7 [fuchsia] Add LogSink to flutter_[jit & aot]_product_runner (flutter/engine#15697) 2020-01-23 15:15:33 -08:00
Wu Zhong
907f05a6ee Fixes labelPrefix memory leak in FlutterEngine (flutter/engine#14674) 2020-01-23 14:07:51 -08:00
Matt Carroll
fbd6f7a1f9 Release TextureView surface within FlutterTextureView when disconnected. (#48535) (flutter/engine#15899) 2020-01-23 13:19:42 -08:00
Kaushik Iska
74cbca7c98 [fuchsia] Timeline events in profile mode to observatory (flutter/engine#15900)
This is to address fxb/44063

In all the other modes they will be sent to the systrace
2020-01-23 11:53:03 -08:00
George Wright
7d26c109c8 Revert "Migrate flutter_runner from flutter_runner::{Thread,Loop} to fml::{Thread,MessageLoop} (#15118)" (flutter/engine#15903)
This reverts commit efe18ad9a6b59a3f7b43e0e4e1cfe8dad94f8e16.
2020-01-22 20:35:41 -08:00
Brian Osman
ea2edc9a40 Implement new SkCanvas virtuals in testing canvases (flutter/engine#15893) 2020-01-22 15:52:46 -05:00
Dan Field
03fcc31f8c errant log (flutter/engine#15891) 2020-01-22 11:18:03 -08:00