2020 Commits

Author SHA1 Message Date
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
Dan Field
f6881297d2 [fuchsia] HitTesting for fuchsia a11y (flutter/engine#15570) 2020-01-22 01:12:37 -08:00
Michael Goderbauer
0ad44285bd Remove unused Imports and private method (flutter/engine#15872) 2020-01-21 17:53:02 -08:00
stuartmorgan
d45eb4bed2 Add missing include in GLFW and Windows embeddings (flutter/engine#15867) 2020-01-21 17:48:03 -08:00
Nathan Rogers
9404aa2e5e Add size parameters to Vulkan surface functions (flutter/engine#15748)
Add "width" and "height" trace parameters to
|VulkanSurfacePool::GetCachedOrCreateSurface| and
|VulkanSurfacePool::CreateSurface|.  Also add an "allocationSize"
parameter to the "vkAllocateMemory" event.
2020-01-21 11:46:10 -08:00
Nathan Rogers
f8c3d8d3aa [fuchsia] Support Skia tracing arguments (flutter/engine#15745)
When running on Fuchsia, respect the argument values that Skia passes
into the Flutter implementation of the |SkEventTracer| interface.

Bug: https://github.com/flutter/flutter/issues/48864
2020-01-21 10:00:11 -08:00
xster
f40ec20a24 Reduce default verbosity of Android embedding (flutter/engine#15164) 2020-01-18 23:49:05 -08:00
Gary Qian
a6de6785ef Samsung fix duplication on punctuation: Update keyboard on finish compose. (flutter/engine#15701) 2020-01-16 18:04:58 -08:00
Greg Spencer
100eb51f4f Fix hardware keyboard enter so it triggers an action. (flutter/engine#15568)
This changes the InputConnectionAdaptor so that it will execute an IME action when ENTER is pressed. Prior to this, pressing ENTER on a hardware keyboard did nothing.
2020-01-15 11:13:39 -08:00
Tan Jay Jun
fb813ff05c Use iOS 13 dark content status bar style (flutter/engine#13119) 2020-01-15 11:07:28 -08:00
dnicoara
cbff03ae1e Fix embedder mutation order (flutter/engine#15566)
The mutator list sent to the embedder is in reverse order from the
MutatorsStack. The root display transformation then needs to be appended
at the end of the list.

Given that these transforms are applied to a layer in display space the
list needs to be reversed as well such that transforms can be applied in
the right order to get from display space to surface space.

Bug: b/143612326
2020-01-15 10:35:15 -08:00
Kirill Nikolaev
b47557705d Add --lazy_async_stacks to the set of whitelisted VM flags. (flutter/engine#15602)
This flags was added in d5dbf10672.
2020-01-15 19:21:08 +01:00
Ben Konyi
0bd7ad2ab0 Roll src/third_party/dart 83fba7bd54..fe666ce592 (3 commits) (flutter/engine#15619)
fe666ce Report unused public static members of private classes by Sam Rawlins · 14 hours ago
43ceb5c Revert "De-dup js_util between ddc and dart2js" by Vijay Menon · 15 hours ago
04e2c97 NNBD preview: Fix the position of the navigation by Sam Rawlins · 17 hours ago
83fba7b [ VM ] Move vmservice_io code from runtime/bin to dart:_internal/vm/bin by Ben Konyi · 18 hours ago
c0b1a0a Switch analyzer perf to using analyzer Packages. by Konstantin Shcheglov · 18 hours ago
5b391ba [tests] Break the monolithic async* tests into multiple files by Nicholas Shahan · 19 hours ago
980a200 [vm/vmservice] Make sure writing service info file is awaited by Alexander Markov · 19 hours ago
7997162 Fix getHover test on Windows. by Konstantin Shcheglov · 19 hours ago
301a3a2 Fix incorrect .packages files in DAS tests. by Konstantin Shcheglov · 19 hours ago
c41812b Incremental work in the completion_metrics.dart file. by Jaime Wren · 19 hours ago
5169a52 Use @patch for List.of factory constructor by Stephen Adams · 20 hours ago
2a7789d De-dup js_util between ddc and dart2js by Vijay Menon · 20 hours ago
aaaaa47 [dartjs] Remove unsound `contains` method from AbstractValueDomain. by Mayank Patke · 20 hours ago
fd9d3f9 relevance test re-structure by pq · 20 hours ago
5d96b23 [dartdevc] Fix analysis error in runtime library by Nicholas Shahan · 20 hours ago
2c121e4 Migration: modify pass through edit plans to integrate up the tree stepwise. by Paul Berry · 21 hours ago
6669849 Initial commit with some work starting the metrics collection around code completion metrics gathering. by Jaime Wren · 21 hours ago
c6d6eed Include type arguments when converting to a stateful widget (issue 40095) by Brian Wilkerson · 22 hours ago
b9c5798 Support latest analyzer in analyzer_plugin by Simon Binder · 22 hours ago
16f07ea Revert "Use nullable context type for operand of null-check operator." by Konstantin Shcheglov · 23 hours ago
c8f2683 Add a reason to the MakeNullable change and plumb it through to the AtomicEdit by Brian Wilkerson · 23 hours ago
5357052 [vm/compiler] Fix handling of function types in type tests for type parameters by Alexander Markov · 23 hours ago
8a1a4e7 Add flag to specify which null-safety semantics to use for codegen by Sigmund Cherem · 23 hours ago
b3c6af3 [vm/compiler] Introduce base class for instance calls in IL by Alexander Markov · 24 hours ago
67f3cf3 Revert "[vm, gc] Sweep non-executable large pages concurrently." by Ryan Macnak · 24 hours ago
00a6b52 Test that invocation of a method on a nullable interface type prefers nullable extension. by Konstantin Shcheglov · 24 hours ago
b5f4351 Move ABSTRACT_SUPER_MEMBER_REFERENCE tests. by Konstantin Shcheglov · 25 hours ago
ca31f1d Refactor FunctionExpressionInvocationResolver to support Never. by Konstantin Shcheglov · 25 hours ago
4495c2b [vm, gc] Run weak processing in parallel for old-space GCs. by Ryan Macnak · 26 hours ago
2dd37b6 Add findPackagesFrom(). by Konstantin Shcheglov · 27 hours ago
abe7c1a When NNBD, use nullable iterable type for null-aware spreads. by Konstantin Shcheglov · 27 hours ago
6f1bcee Extract ifNull resolution in BinaryExpressionResolver. by Konstantin Shcheglov · 27 hours ago
9c9c283 [vm, gc] Remove dead allocation stats code. by Ryan Macnak · 27 hours ago
a4207fd [vm/aot] Avoid loading the code register (in bare-AOT) and zeroing IC data reg (in AOT) for closure calls by Martin Kustermann · 33 hours ago base
4cb8816 [gardening] Also ignore OSError in verify_http_timeline_test. by Teagan Strickland · 34 hours ago
d1e11f0 Enable prefer_final_fields in three packages by Brian Wilkerson · 2 days ago
856a270 Use nullable context type for operand of null-check operator. by Konstantin Shcheglov · 2 days ago
da6696b Use analyzer Packages. by Konstantin Shcheglov · 2 days ago
5b1065a Enable avoid_init_to_null in analysis_server by Brian Wilkerson · 2 days ago
99cdbee Use getDisplayString() for hover. by Konstantin Shcheglov · 2 days ago
04b5bd9 Extract null check in PostfixExpressionResolver. by Konstantin Shcheglov · 2 days ago
ac8a2a6 Enable avoid_init_to_null in analyzer_plugin by Brian Wilkerson · 2 days ago
f1c81da Add a fix for unnecessary_null_in_of_null_operators by Brian Wilkerson · 2 days ago
9254683 Remove packageMap and hasFlutterDependency from Workspace interface. by Konstantin Shcheglov · 2 days ago
ecebc29 Do negation resolution in one method. by Konstantin Shcheglov · 2 days ago
489c0be Extract PostfixExpressionResolver. by Konstantin Shcheglov · 2 days ago
113f034 completion manager test harness by pq · 2 days ago
7ed7bff Fix some hints caused by previous CL and add some failing tests by Brian Wilkerson · 3 days ago
2020-01-14 12:06:56 -08:00
stuartmorgan
2b685ee536 Implement HWND access for Windows plugins (flutter/engine#15378)
plugin_registrar_windows.h was never fully updated for the Win32 switch,
and didn't actually compile. This introduces FlutterView (parallel to
the GLFW wrapper's FlutterWindow) as a ways of holding view-specific
functionality to expose via the plugin registrar, and moves HWND access
from the FlutterViewController to the FlutterView so that it's
available to plugins. This allows the implementation of plugins that need
access to the native HWND (e.g., moving or resizing the top-level window).

Adds simple unit tests of the new wrapper functionality, ensuring that the
files actually compile, and that the passthroughs work as expected.

This is a breaking change for Windows runners due to moving
GetNativeWindow() in the wrapper. It's not being done as a multi-stage
change (addition + deprecation + later removal) since this API is explicitly
unstable.
2020-01-13 19:04:17 -08:00
Jason Simmons
364bff1c1b Change the value of EXTRA_INITIAL_ROUTE to match the value used by the old embedding and flutter_tools (flutter/engine#15569) 2020-01-13 17:19:31 -08:00
Jason Simmons
353d4aa572 Add a type parameter to SavedState.Creator in the new embedding (flutter/engine#15563) 2020-01-13 15:26:32 -08:00
Gary Qian
9d4e65e8a5 Trivial typo fix to kick tests. (flutter/engine#15557) 2020-01-13 13:37:49 -08:00
sjindel-google
51357bd501 Re-land "Use ELF for Dart AOT snapshots on Fuchsia. #13896" (flutter/engine#15360)
The bug in the original CL was that we were not running replace_as_executable in OpenVmo if the namespace was not provided.

This was a divergence in behavior for MappedResource::LoadFromNamespace compared to the current implementation.
2020-01-10 14:34:59 +01:00
Wu Zhong
06b81e9f3a Fixes leak of url in FlutterObservatoryPublisher (flutter/engine#14822) 2020-01-09 18:08:03 -08:00
Miguel
3b09b3866a [fuchsia] Add diagnostics directory to the remote dirs and ensure entry exists (flutter/engine#15258)
This reverts commit 866b257d21b1df2e2342459da71312d19a30c581.

Once https://fuchsia-review.googlesource.com/c/topaz/+/351729 lands, the
diagnostics directory will be present, this would be safe to do and the
roller won't be blocked again.
2020-01-09 17:28:16 -08:00
Chris Bracken
7ae74235a1 Revert "Add support for on/off switch labels when built on iOS 13. (#12467)" (flutter/engine#15370)
Broke a fake implementation of Accessibility features in the framework.
While this change is unlikely to break any users in the wild, this is a
breaking change by the standards set out in our documentation and
should follow the breaking change announcement process. Details can be
found at https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes.

The error in question:

    Missing concrete implementation of 'getter AccessibilityFeatures.onOffSwitchLabels' • packages/flutter_test/test/window_test.dart:252:7 • non_abstract_class_inherits_abstract_member

This reverts commit 4fa39f86cb7de95e5a58152f4957c3476469eb9f.
2020-01-09 10:33:51 -08:00
Matt Carroll
2d86c18a75 Make BackgroundMode public. (#45747) (flutter/engine#14673) 2020-01-08 21:41:34 -08:00
chunhtai
1571512735 Add shell api to set default for windows data (flutter/engine#14002) 2020-01-08 19:36:10 -08:00
brandondiamond
4fa39f86cb Add support for on/off switch labels when built on iOS 13. (flutter/engine#12467) 2020-01-08 18:26:44 -08:00
Chris Bracken
5500747f71 Add missing super.onNewIntent() call (flutter/engine#15328)
From the onNewIntent docs:

    If you are handling new intents and may be making changes to the
    fragment state, you want to be sure to call through to the
    super-class here first. Otherwise, if your state is saved but the
    activity is not stopped, you could get an onNewIntent() call which
    happens before onResume() and trying to perform fragment operations
    at that point will throw IllegalStateException because the fragment
    manager thinks the state is still saved.
2020-01-08 18:07:36 -08:00
Jenn Magder
50a48df729 Revert "Add a deprecation javadoc note to the old FlutterActivity (#15156)" (flutter/engine#15331)
This reverts commit 542c671358e0982acd2ed7f38574b2a50aad83c4.
2020-01-08 18:04:49 -08:00
gaaclarke
01cd18efc9 Made it so you can specify the old gen heap size. (flutter/engine#15259) 2020-01-08 10:20:52 -08:00
xster
542c671358 Add a deprecation javadoc note to the old FlutterActivity (flutter/engine#15156) 2020-01-08 10:06:58 -08:00
stuartmorgan
b5a0d966f7 Add plugin_registrar_windows.h to published wrapper (flutter/engine#15265) 2020-01-07 21:33:02 -08:00
George Wright
efe18ad9a6 Migrate flutter_runner from flutter_runner::{Thread,Loop} to fml::{Thread,MessageLoop} (flutter/engine#15118) 2020-01-07 19:24:45 -08:00
Francisco Magdaleno
3bd371abd5 Revert "Use ELF for Dart AOT snapshots on Fuchsia. (#13896)" (flutter/engine#14823)
This reverts commit 5152ffa2bd64ca2c6980e6b017dafb0a6b2de87e.
2019-12-27 16:15:24 -08:00
Dan Field
159a0bc76f View ref pair (flutter/engine#14602) 2019-12-20 15:55:02 -08:00