3051 Commits

Author SHA1 Message Date
liyuqian
663eb4db1a Disable OnServiceProtocolGetSkSLsWorks in Fuchsia (flutter/engine#17361) 2020-03-30 14:31:03 -07:00
Jason Simmons
807361feff Use the private presentation window type for platform view windows (flutter/engine#17385) 2020-03-30 14:26:10 -07:00
wqyfavor
1000f22660 Fix FlutterView's _delegate is not declared as ivar but a global variable. (flutter/engine#17206) 2020-03-30 14:26:03 -07:00
Gary Qian
317c96c3ce Partially revert Samsung keyboard force-update workaround (flutter/engine#17391) 2020-03-29 15:46:39 -07:00
Emmanuel Garcia
2656509ba5 Reland unobstructed platform views (flutter/engine#17336) 2020-03-27 16:39:29 -07:00
Brian Osman
913a683352 Guard SkCanvas bitmap virtuals for deprecation and removal (flutter/engine#17371) 2020-03-27 13:28:03 -04:00
wqyfavor
eff3cb31a1 Fix problem that using multi-engines, sometimes OpenGL would crash be cause of invalid EAGLContext (flutter/engine#17366) 2020-03-27 02:40:56 -07:00
Chinmay Garde
25d419a729 Disable ShellTest.OnServiceProtocolGetSkSLsWorks. (flutter/engine#17367)
Re-enabling tracked in https://github.com/flutter/flutter/issues/53399.
2020-03-27 01:10:15 -07:00
liyuqian
10824995dd Rename GPU thread to raster thread in code comments (flutter/engine#17329)
1. Simple "GPU thread" to "raster thread" replacement.

2. Regex replace "GPU([\n\r\s]+//+ thread)" with "raster$1".

3. Regex replace "// gpu$" with "// raster".

4. Simple test change.

5. Run ci/format.sh
2020-03-25 22:49:59 -07:00
renyou
bf6347ceef Android change to match the Google internal changes. (flutter/engine#17331)
* Android change to match the google internal changes.

* Fix format.

* Revert format change, add super call.

* Remove comment for API version.
2020-03-25 18:02:46 -07:00
Filip Filmar
36404497fe [runner] Corrects logging of close() status (flutter/engine#16698)
close() returns a nonzero in case of an error.  Old code had it log
only when *no* error happens on close, which is exactly the opposite
of what we want.
2020-03-25 16:31:46 -07:00
Emmanuel Garcia
2913102440 Revert unobstructed platform views (flutter/engine#17326) 2020-03-25 14:36:10 -07:00
Drew Fisher
abfe606076 fuchsia: remove use of replace_as_executable (second try) (flutter/engine#17313)
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
are 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).  It wasn't abundantly clear
whether .cmx files for tests were used purely in AOT runtime
environments or also saw JIT usage, so I left those as-is.

For context: this is a second attempt at #16690, which was reverted
because it broke the Dart JIT runner.  The primary difference is that
this time around, we correctly handle absolute vs relative paths,
depending on whether library loading bottoms out in `fdio_open_fd` or
`fdio_open_fd_at`.  I've added additional assertions to help ensure any
new usages use the correct shape of path.

Testing: I verified locally that the flutter product runner works on
Astro, and also successfully ran the Dart JIT example test (which was
the thing blocking the google3 roll with the previous attempt at this
patchset).

Co-authored-by: Drew Fisher <zarvox@google.com>
2020-03-25 13:17:28 -07:00
Kaushik Iska
60f620b4b2 [metrics] Record the frame target time on the layer tree (flutter/engine#17281)
This lets us measure stats on when the frame was
scheduled to be rendered vs when it finished rasterizing.

Note: This isn't propagated to the FrameTimings struct yet,
that is to be followed.
2020-03-24 22:00:21 -07:00
liyuqian
d968e224ca Add service protocol to get SkSLs (flutter/engine#17300)
Fixes https://github.com/flutter/flutter/issues/53114
2020-03-24 21:42:12 -07:00
Emmanuel Garcia
11d0020dd6 Flush background canvas before allocating a new surface (flutter/engine#17308) 2020-03-24 20:10:10 -07:00
Robert Ancell
71d631160f Add a Linux Shell that uses GTK for rendering. (flutter/engine#16977) 2020-03-24 13:26:02 -07:00
Chinmay Garde
929fb3f825 Remove checks for the always true using_fuchsia_sdk flag in all GN files. (flutter/engine#17261) 2020-03-23 18:31:02 -07:00
mikejurka
8bb493406e [Fuchsia] Move physical shape layer compositing to Flutter (flutter/engine#17005)
* [fuchsia] Add labels to Scenic nodes.

* [fuchsia] Skip creating Scenic nodes for identity Transforms.

* [fuchsia] Assign elevation to Scenic nodes based on paint order.

* [fuchsia] Create Scenic OpacityNodes at leaf nodes.

* [fuchsia] Composite PhysicalShapeLayers using Skia, except when they need to float above child views.

In that case, they will still need to be pulled
into separate Scenic nodes to be composited on top
of the child view[s].

* [fuchsia] Add tests for Fuchsia-specific layer behavior.

Inspect commands going to Scenic and make sure
they match what is expected.

Also, restructure code to need less member variables,
and other cleanups based on review feedback.
2020-03-23 16:38:07 -07:00
gaaclarke
57a8860d57 Removed a text input trait that causes VoiceOver to be incorrect when tapping a text input. (flutter/engine#17203) 2020-03-23 12:57:15 -07:00
gaaclarke
574c0a75ed added missing mock to MockEngine for iOS unit tests (flutter/engine#17273) 2020-03-23 11:38:42 -07:00
stuartmorgan
bac62dd12e Add DartProject for Windows embedding API (flutter/engine#17210)
This is a step toward aligning the API with macOS, and will make it easier to add the precompiled library later for release mode (since it can just be added to the project directory, without any code changes required for wrapper clients).

At the C API, uses a struct instead of individual arguments, mirroring a change that was already made on the Linux side to make the C API cleaner.

Functional changes in addition to the restructuring:

adds relative path support, as was recently added for GLFW
Uses wstring, rather than string, for paths; the conversion to UTF-8 is actually a potential problem on Windows, so pushing it into the embedding allows us the possibility of removing it later (if we can figure out a good solution at the embedder.h layer) without API breakage.
The old APIs used by the standard runner are left in place for now to avoid breaking the template on an engine roll. Once the framework template has been updated, the old API paths will be removed.
2020-03-23 10:46:10 -07:00
gaaclarke
24b2425483 Added a log message when sharing a FlutterEngine across multiple FlutterViewControllers. (flutter/engine#17186) 2020-03-23 10:44:53 -07:00
Chinmay Garde
44f93dddb7 Allow external texture sources when using the Metal backend. (flutter/engine#17154) 2020-03-22 22:36:03 -07:00
Chinmay Garde
09be477a9f Don’t depend on an implicit transaction when no external view embedder is present. (flutter/engine#17258)
All Metal layers have their presentsWithTransaction property set to true.
However, when an external view embedder is not present, there is no mechanism to
ensure that the command buffer commit is within transaction scope. This works in
most cases as there there is usually an implicit (possibly nested) transaction
in place during rendering. However, when there isn’t, rendering will look paused
at an incorrect size. This code now works similar to OpenGL but will be
refactored for ease of understanding and consistency between the various
backends.
2020-03-22 19:16:21 -07:00
Emmanuel Garcia
fa2f49dbcb Reland: Implement unobstructed Platform Views on iOS (flutter/engine#17237) 2020-03-20 18:58:55 -07:00
Emmanuel Garcia
3c04f343d3 Revert "Implement unobstructed Platform Views on iOS (#17049)" (flutter/engine#17233)
This reverts commit a1f7b10dfac894be08bd6e8fa2a65063cb8b5277.
2020-03-20 14:46:09 -07:00
Emmanuel Garcia
a1f7b10dfa Implement unobstructed Platform Views on iOS (flutter/engine#17049) 2020-03-20 12:38:58 -07:00
Chris Yang
574170b7a8 Replace Pipeline's ProduceToFront with ProduceIfEmpty to handle thread merging. (flutter/engine#17122) 2020-03-20 11:04:47 -07:00
stuartmorgan
6ff2789212 Fix copy/paste mistake in GLFW asset path resolution (flutter/engine#17208)
Fixes a regression from #16944
2020-03-19 11:04:43 -07:00
Jonah Williams
5d5ed5e321 Remove unused PackagesUri rpc param in OnServiceProtocolRunInView (flutter/engine#17195)
This is not actually used by hot reload since we've switched to compilation from kernel.
2020-03-18 13:41:41 -07:00
George Wright
1b5254e49a Truncate error messages for the crash reporter to the maximum length permitted by the FIDL call (flutter/engine#17189) 2020-03-18 13:08:54 -07:00
Wu Zhong
1be8cd8b2d Fixes comments typo in FlutterPlatformViews (flutter/engine#17094) 2020-03-17 21:38:53 -07:00
stuartmorgan
8c89674d93 Allow relative resource paths in GLFW embedding (flutter/engine#16944)
Currently every Linux runner has this code to allow relative resource paths; this moves it into the framework so that any embedder can get this behavior without that code needing to be in the template.

Rolls buildroot to pick up std::filesystem support in our libc++
2020-03-17 19:04:18 -07:00
gaaclarke
391e9553fc Made it so you can whitelist what events you want to listen to (flutter/engine#17108) 2020-03-16 11:00:03 -07:00
Chinmay Garde
9a90d55554 Update the Metal backend selection to use iOS 10.0 and A7 as the version floor. (flutter/engine#17162)
Fixes https://github.com/flutter/flutter/issues/52356
2020-03-15 14:35:48 -07:00
Emmanuel Garcia
257b799767 Migrate embedding to AndroidX (flutter/engine#17075) 2020-03-13 21:19:24 -07:00
Chinmay Garde
86378d9180 Document texture registry threading requirements. (flutter/engine#17149) 2020-03-13 18:55:58 -07:00
xster
ea2cb63687 Make a pass through all the embedding javadocs (flutter/engine#17109) 2020-03-13 16:34:34 -07:00
Brian Osman
ac523daa3d Canvas: Remove some unused virtuals, and prepare for signature change (flutter/engine#17135)
* Canvas: Remove some unused virtuals, and prepare for signature change

* Better vertices fix

* Add empty placeholders for old signature
2020-03-13 15:25:01 -04:00
Nathan Rogers
63bc5eaf8e [fuchsia] Change vsync trace name back to "vsync callback" on Fuchsia (flutter/engine#17118)
Fuchsia benchmarks depend the name being precisely "vsync callback".
Since this is causing immediate build issues, change it back to "vsync
callback" on Fuchsia.  Stronger testing for this in the long run is
currently under discussion.

b/150902962
2020-03-12 14:57:50 -07:00
Emmanuel Garcia
c6e300a3de Fix link in readme (flutter/engine#17119) 2020-03-12 13:59:31 -07:00
Emmanuel Garcia
4a30d786c6 Define embedding dependencies in Gradle (flutter/engine#17116) 2020-03-12 13:49:46 -07:00
Chinmay Garde
8f5f888826 Use the standard [[nodiscard]] attribute instead of an FML macro. (flutter/engine#17100) 2020-03-11 13:36:01 -07:00
Chinmay Garde
a483f24165 Remove the unused method on iOS surface to make the resource context current. (flutter/engine#17084) 2020-03-11 00:46:02 -07:00
Chinmay Garde
22312c8790 Disable Embedder11yTest::A11yTreeIsConsistent to unblock LUCI. (flutter/engine#17081)
See https://github.com/flutter/flutter/issues/52372
2020-03-10 18:48:23 -07:00
Chinmay Garde
6349c95def Implement asynchronous texture uploads when using the Metal backend on iOS. (flutter/engine#17046)
This moves the Metal `GrContext` creation utilities from `GPUSurfaceMetal` into
a separate `IOSContext` object subclass. An analogue of this object was used in
the GL regime for the management of onscreen and offscreen contexts that were
not tied to the lifecycle of the `GPUSurface`. This pattern has now been
generalized for use with all backends that need a resource context
(`IOSContextGL` and `IOContextMetal`).

The platform views controller management in the `ExternalViewEmbedder` interface
implementation was repeated three times for [Metal][metal], [OpenGL](opengl) and
[Software](software) rendering. This repetition has been removed and a single
implementation present in the base `IOSSurface` and used on all platforms.
Addition of new client rendering APIs should not affect how the engine renders
into the platform view interleaving levels.

All rendering API selection logic has been moved into a single set of utilities
in `rendering_api_selection.h`. This enables the removal of a lot of code blocks
guarded by `FLUTTER_SHELL_ENABLE_METAL`. The remaining uses of this will be
removed when unified builds are enabled.

The Metal backend now also adds traces similar to the GL backend.

The `IOGLContext` has been renamed to `IOContextGL` to be more in line with the
convention used in this library.

Fixes https://github.com/flutter/flutter/issues/41827
Adds https://github.com/flutter/flutter/issues/52150

[metal]: 46dbf3a761/shell/platform/darwin/ios/ios_surface_metal.mm (L55)
[opengl]: 46dbf3a761/shell/platform/darwin/ios/ios_surface_gl.mm (L95)
[software]: 46dbf3a761/shell/platform/darwin/ios/ios_surface_software.mm (L146)
2020-03-10 16:01:53 -07:00
Chinmay Garde
52e75cba16 Use the ELF loader to setup AOT symbols in benchmark runner. (flutter/engine#17051)
We no longer package AOT artifacts as discrete blobs. The portable ELF loader
from the testing library may be used instead.

Fixes https://github.com/flutter/flutter/issues/52263
2020-03-10 12:28:24 -07:00
gaaclarke
46c52ba051 doxygen tooling updates and doxygen for FlutterCodecs.h (flutter/engine#16947)
- added tools to help us document Flutter.framework for iOS
- filled in FlutterCodecs.h's missing documentation
2020-03-06 16:06:06 -08:00
gaaclarke
991d11ca02 documented fluttertexture.h (flutter/engine#16950) 2020-03-06 14:28:56 -08:00