2091 Commits

Author SHA1 Message Date
Kaushik Iska
a16d97e507
Revert "fuchsia: remove use of replace_as_executable (#16690)" (#16829)
This reverts commit ff921cd608efaf3aecd3e3e0feb14bb540cc22ed.
2020-02-27 10:13:26 -08:00
Kaushik Iska
060a7733a6
Roll fuchsia/sdk/core/linux-amd64 from QU3ft... to 94el1... (#16821) 2020-02-26 15:44:59 -08:00
stuartmorgan
52070e3df7
Fix handler unregistration in C++ channels (#16794)
MethodChannel and BasicMessageChannel in the C++ wrapper didn't have the
expected semantics that passing a null handler would remove any existing
handler. This was inconsistent with other platforms and with the
lower-level object APIs in this wrapper, and made unregistration in
cases where that's desirable more difficult due to needing to keep other
object references.

Adds tests for this functionality, and some backfill of missing tests
for basic handler behavior.

See https://github.com/flutter/flutter/issues/51207
2020-02-25 14:09:58 -08:00
Drew Fisher
ff921cd608
fuchsia: remove use of replace_as_executable (#16690)
On Fuchsia, we can now get executable VMOs from trusted backing
filesystems.  This allows us to remove the use of replace_as_executable
in favor of opening files with `fdio_open_fd_at` with the
`OPEN_RIGHT_EXECUTABLE` flag and getting VMOs by calling
`fdio_get_vmo_exec`.

By moving the responsibility for executability into the filesystem, we
should be able to remove deprecated-ambient-replace-as-executable from
component manifests for non-JIT runners (the JIT runners still call
replace_as_executable in Dart's allocator).

Test: verified locally that this works on Astro on a _user build with
the runtime allowlist tightened.
2020-02-25 13:24:07 -08:00
Dan Field
888a62cf22
Revert "Enable lazy-async-stacks by-default in all modes (#16556)" (#16781)
This reverts commit fdabcaddf45deaf93a5238c99c2acbeb25a3a027.
2020-02-24 20:04:40 -08:00
Chinmay Garde
92abb22c64
Reland "Lift restriction that embedders may not trample the render thread OpenGL context in composition callbacks." (#16711)
This reverts commit ef9e7b1a1365c07ab0df2e2016c4442c3963c2c7 with the following changes to accommodate an embedder for whom the original optimizations caused issues:

* Ensure stable order in the backing stores presented to the embedder. This is a pessimization that will be reverted when the embedder migrates. Tracked in  https://github.com/flutter/flutter/issues/51228
* Forego the optimization where the unused layers would be collected before allocation of new layers needs to happen. This is a pessimization that will be reverted when the embedder migrates. Tracked in  https://github.com/flutter/flutter/issues/51229

More context in b/146142979.
2020-02-24 11:48:32 -08:00
Filip Filmar
38dc2ea67c
[i18n] Deprecates fuchsia.timezone.Timezone (#16700)
The FIDL interface `fuchsia.timezone.Timezone` does not exist for quite
a while now.  Instead, a transitional `fuchsia.timezone.Timezone` should
be used.

Fixes flutter/flutter#51087
2020-02-24 11:44:30 -08:00
Chris Bracken
1aef7a4369
Delete FlutterAppDelegate_Internal.h (#16772) 2020-02-24 11:11:03 -08:00
Miguel Beltran
d0c2418dfe
Add support for Increase Contrast on iOS (#15343) 2020-02-22 14:04:04 -08:00
Ryan Macnak
930a80ac86
Fix some compiler warnings in newer versions of Clang. (#16733) 2020-02-21 12:57:06 -08:00
George Wright
8eb727ec3d
Flush the SkCanvas when submitting a frame in ShellTestPlatformViewVulkan::OffscreenSurface (#16717) 2020-02-20 15:18:36 -08:00
freiling
bc4a27fc2f
[shell tests] Integrate Vulkan with Shell Tests (#16621)
This change creates a test only implementation of flutter::Surface backed by an
offscreen Vulkan GrContext. Much of the code in this test Surface was lifted
from flutter::VulkanWindow which I was unable to use without extricating it
from the VkSurface/VkSwapchain code which we do not want to use in offscreen
tests. I would recommend refactoring VulkanWindow to separate GrContext
creation and VkSwapchain creation in order to promote greater code reuse
between onscreen and offscreen vulkan paths.

This change is excersised thoroughly by the shell tests and was manually
tested against these tests on Fuchsia on Intel.
2020-02-20 11:37:00 -08:00
Justin McCandless
02aa865da3
Fix the newline on some keyboards (#16560) 2020-02-20 10:36:03 -08:00
Martin Kustermann
fdabcaddf4
Enable lazy-async-stacks by-default in all modes (#16556)
This was already enabled by-default in AOT mode in [0] - which made the
gen_snapshot invocations use "--lazy-async-stacks --no-causal-async-stacks".

See go/dart-10x-faster-async for more information.

[0] https://github.com/flutter/flutter/commit/347823234fd
2020-02-20 18:31:26 +01:00
xster
1b73784945
fix param (#16694) 2020-02-19 15:06:06 -08:00
Chinmay Garde
ef9e7b1a13
Revert "Lift restriction that embedders may not trample the render thread OpenGL context in composition callbacks. (#16653)" (#16674)
This reverts commit 110c1c9adf0f580d16c8252e3b37992af93e9cea.
2020-02-18 18:59:21 -08:00
Chinmay Garde
110c1c9adf
Lift restriction that embedders may not trample the render thread OpenGL context in composition callbacks. (#16653)
During the implementation of custom compositor integration, the embedder gets
callbacks on the render thread to prepare render targets (framebuffers,
textures, etc) for the engine to render into, callbacks to present these render
targets along with platform managed contents, and, callbacks to collect render
targets once they can no longer be recycled by the engine in subsequent frames.
During these callbacks, the engine mandates the OpenGL state on the render
thread be preserved. This restriction has been the source of hard to isolate
issues where the embedder trampled on the OpenGL bindings state in the callback
but failed to restore state before control went back to the engine. Due to the
nature of the OpenGL API, such errors are easy to make and overlook. This patch
lifts the restriction from the embedder. Embedders may now freely work with the
OpenGL state in custom compositor callbacks and the engine will make sure to
disregard OpenGL bindings when control flows back to it.

Disregarding current OpenGL state has a certain performance penalty and the
majority of this patch handles refactoring various engine embedder components
such that this happens only once per frame. The most trivial version of this
patch would reset context bindings on every transition of control flow from the
embedder to the engine. However, that naive approach would have necessitated
more than 50 binding resets in existing unit-test cases (depending on the number
of platform view interleaving levels and render target recycling hit rates). In
this implementation, bindings will be reset only once per frame and this does
not depend on the number of platform views in the scene.

The majority of this patch is a refactoring of engine subsystems used in
`ExternalViewEmbedder::SubmitFrame` which is thoroughly documented with each
opportunity for the embedder to invalidate OpenGL state tagged.

The refactoring also enables the implementation of the following optimizations
to engine behavior which should aid in reducing the memory needed for the
creation of render targets. These optimization include:
* The engine will only ask the embedder for render targets in which it expects
  to render into. This was a quirk in the way in which root and non-root render
  targets were handled. The engine could require the embedder to create a render
  target but then realize it didn’t have anything to render into it. In the
  presentation callback, it would skip that render target. But the embedder
  still had to allocate that extra render target. This will no longer be the
  case and should reduce memory use.
* The engine may now skip always realizing (via the embedder render target
  creation callback) and presenting the root render target. This was also a side
  effect of the same quirk. Previously, the engine would always ask the embedder
  to present the root render target even if it was empty. Since this is no
  longer the case, few render targets should be allocated which will reduce
  memory consumption.
* The engine will now ask the embedder to collect unused render targets before
  it asks it to create new ones. The previous behavior was to ask the embedder
  for new targets and then collect old ones. This would cause spikes in memory
  use when the size of the render targets would change. These memory use spikes
  should now be troughs.
* The previous render target cache also considered the platform view ID in cache
  viability considerations (instead of just the size of the render target). This
  was a bug which has been fixed. This should lead to better cache utilization
  in some situations.

These optimizations are now codified in unit-tests and the updated test
expectations are a result of these optimizations now being in place.

* Fixes https://github.com/flutter/flutter/issues/50751
* Fixes https://github.com/flutter/flutter/issues/46911
* Fixes https://github.com/flutter/flutter/issues/43778
* Fixes b/146142979
2020-02-18 12:51:49 -08:00
George Wright
400ed7cebc Revert "[shell tests] Integrate Vulkan with Shell Tests"
This reverts commit 594f6608276cbcb7be2b89defcfb6eef03321fad.
2020-02-14 13:02:38 -08:00
Forrest Reiling
594f660827 [shell tests] Integrate Vulkan with Shell Tests
This change creates a test only implementation of flutter::Surface backed by an
offscreen Vulkan GrContext. Much of the code in this test Surface was lifted
from flutter::VulkanWindow which I was unable to use without extricating it
from the VkSurface/VkSwapchain code which we do not want to use in offscreen
tests. I would recommend refactoring VulkanWindow to separate GrContext
creation and VkSwapchain creation in order to promote greater code reuse
between onscreen and offscreen vulkan paths.

This change is excersised thoroughly by the shell tests and was manually
tested against these tests on Fuchsia on Intel.
2020-02-14 12:56:16 -08:00
Matt Carroll
f39bc73d6a
Exposes FlutterSurfaceView, and FlutterTextureView to FlutterActivity and FlutterFragment. (#41984, #47557) (#16552) 2020-02-12 19:21:00 -08:00
Gary Qian
c4c6ef6719
Samsung keyboard duplication workaround: updateSelection (#16547) 2020-02-12 19:51:40 -05:00
Michael Klimushyn
7c67573896
Fix multiline Javadoc code blocks (#16565)
The formatter didn't understand what was going on here and broke the
text. Changed these to use `<pre>{@code }</pre>` instead.
2020-02-12 15:07:16 -08:00
Chris Yang
5fb0116d62
iOS platform view gesture blocking policy. (#15940) 2020-02-11 15:34:59 -08:00
Matt Carroll
ca02b9197e
Prevent long flash when switching to Flutter app. (#47903) (#16527) 2020-02-11 15:26:27 -08:00
Matt Carroll
270421c103
Fix ensureInitializationCompleteAsync callback when already initialized. (#39675) (#16503) 2020-02-11 15:25:58 -08:00
Gityuan
5041ff1b1e
support endless trace buffer (#16520) 2020-02-11 15:08:03 -08:00
Francisco Magdaleno
c3b5072486
Expose DPI helper functions for Runner apps to use (#16313) 2020-02-11 15:03:03 -08:00
Kaushik Iska
539f64f56a
[fuchsia] Disable retained layers (#16548)
Retained surfaces are being prematurely recycled.
Temporarily disabling them until they are reworked.
2020-02-11 14:15:31 -08:00
George Wright
c477c06446
Enable verbose logging for shell unittests on Fuchsia (#16526) 2020-02-10 14:39:03 -08:00
Dan Field
826b2d46ef
Apply lints from internal roll (#16509) 2020-02-10 13:53:04 -08:00
Michael Klimushyn
077918dcfd
Apply Google Java format (#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
9443518f62
Fix safe area reporting with transparent FlutterActivitys. (#46060) (#16208) 2020-02-07 14:57:06 -08:00
Alexander Brusher
537eb77379
Update node fields fix (#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
1a4f4e3943
Fix unused import in Android embedder (#16494)
android.os.Parcelable was added in commit
6d5aaa090abe19ff0f08eb28f6663173750fd80c but never used.
2020-02-07 12:26:50 -08:00
Dan Field
d589ddea68
Fix text range logic for a11y (#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
eb8691f2ad
Code cleanup on destructors (#16481) 2020-02-06 16:53:02 -08:00
George Wright
d2aab27b4f
Enable shell_unittests on Fuchsia with Vulkan dependencies. (#16376)
This also adds a dependency on SwiftShader's Vulkan frontend.
2020-02-06 15:07:01 -08:00
stuartmorgan
03f639e12c
Add noexcept annotations to EnableValue moves (#16478)
Fixes a warning when compiling in Visual Studio on Windows.
2020-02-06 14:28:31 -08:00
stuartmorgan
9ad81dae16
Wrap strdup to use compliant name on Windows (#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
28e663726a
Add explicit casts to printing of function pointers (#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
473f55940f
Suppress some deprecation warnings on Windows (#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
f25d325b1e
[fuchsia] change kMaxFramesInFlight to 3 (#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
76b291a659
Added a plugin method that gets called when the engine is about to be deleted (#16336) 2020-02-05 16:12:16 -08:00
stuartmorgan
925c60b38b
Fix Windows embedding issues caught by clang (#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
11b770489f
[fuchsia] Migrate flutter runner to use Present2 (#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
036c370c34
Copied Apple's semantics for switches, made checkboxes the same. (#16211) 2020-02-05 10:13:31 -08:00
Dan Field
e24ec598e0
Fuchsia a11y actions (#16321) 2020-02-04 19:01:19 -08:00
Jonah Williams
7e1d1440a3
Expose enable-service-port-fallback switch (#16366) 2020-02-04 12:00:58 -08:00
Amir Hardon
7f6149cbdd
Revert "Remove use of the deprecated AccessibilityNodeInfo boundsInPa… (#16355) 2020-02-04 11:43:03 -08:00
George Wright
677b563b9a
Refactor of Vulkan GPUSurface code (#16224)
Co-authored-by: David Worsham <arbreng@gmail.com>
2020-02-04 10:44:35 -08:00