2617 Commits

Author SHA1 Message Date
Matt Carroll
d7902954e9 Fix ensureInitializationCompleteAsync callback when already initialized. (#39675) (flutter/engine#16503) 2020-02-11 15:25:58 -08:00
Gityuan
520e35acb2 support endless trace buffer (flutter/engine#16520) 2020-02-11 15:08:03 -08:00
Francisco Magdaleno
a3722df46e Expose DPI helper functions for Runner apps to use (flutter/engine#16313) 2020-02-11 15:03:03 -08:00
Kaushik Iska
acd3965ba4 [fuchsia] Disable retained layers (flutter/engine#16548)
Retained surfaces are being prematurely recycled.
Temporarily disabling them until they are reworked.
2020-02-11 14:15:31 -08:00
George Wright
e2e15d08e4 Enable verbose logging for shell unittests on Fuchsia (flutter/engine#16526) 2020-02-10 14:39:03 -08:00
Dan Field
c8507b069f Apply lints from internal roll (flutter/engine#16509) 2020-02-10 13:53:04 -08:00
Michael Klimushyn
2ad0c2ebe7 Apply Google Java format (flutter/engine#16501)
This shouldn't result in any logical changes. I've done a quick smoke
test by building a local Android engine and running Flutter gallery, no
compile errors or other obvious issues.

Applied by running `/ci/format.sh | patch -p0` with the altered script
added in flutter/engine#16500. I did locally modify the script slightly
further so it would run against all Java files in the repo instead of
just modified ones.
2020-02-07 16:10:46 -08:00
Matt Carroll
7a8e698211 Fix safe area reporting with transparent FlutterActivitys. (#46060) (flutter/engine#16208) 2020-02-07 14:57:06 -08:00
Alexander Brusher
82ffcd8ee8 Update node fields fix (flutter/engine#16428)
* Modifies accessibility bridge to populate new node fields in semantics API.

* Adds additional UTs and fixes logic for breaking up updates for nodes with large values.

* Chaged tests to set node flags using bitwise-or instead of addition.

* Address bug in update size arithmetic.

* Fixes issue in TruncatesLargeValue unit test causing unexpected deletes.

* Fixes expected number of updates in BatchesLargeMessages unit test to reflect expected values now that node states are populated.
2020-02-07 13:24:36 -08:00
Chris Bracken
b9545c70c0 Fix unused import in Android embedder (flutter/engine#16494)
android.os.Parcelable was added in commit
177353d759452c998879b3ac7a05d9dc6e437466 but never used.
2020-02-07 12:26:50 -08:00
Dan Field
21f6cef10b Fix text range logic for a11y (flutter/engine#16496)
Make sure that a text range at the end of the string is still valid.
2020-02-07 12:20:30 -08:00
Francisco Magdaleno
40c7f488e9 Code cleanup on destructors (flutter/engine#16481) 2020-02-06 16:53:02 -08:00
George Wright
69e635c0fc Enable shell_unittests on Fuchsia with Vulkan dependencies. (flutter/engine#16376)
This also adds a dependency on SwiftShader's Vulkan frontend.
2020-02-06 15:07:01 -08:00
stuartmorgan
f9ebc8e2dc Add noexcept annotations to EnableValue moves (flutter/engine#16478)
Fixes a warning when compiling in Visual Studio on Windows.
2020-02-06 14:28:31 -08:00
stuartmorgan
9c3b20b923 Wrap strdup to use compliant name on Windows (flutter/engine#16372)
A number of POSIX methods were renamed on Windows to match standards
requirements, giving deprecation warnings when calling strdup on Windows.
This adds a wrapper, to allow calling _strdup on Windows instead.

Part of #16256
2020-02-05 22:32:56 -08:00
stuartmorgan
91424efae5 Add explicit casts to printing of function pointers (flutter/engine#16370)
Compiling with clang on Windows fails here with a warning about implicit
cast from function pointer to object pointer. Rather than disable that
warning, this makes it an explicit cast. Since this is just test output,
it's not critical that this be a completely safe operation.

Part of #16256
2020-02-05 22:31:22 -08:00
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