2160 Commits

Author SHA1 Message Date
Brian Osman
c9506cb8e9
Finish removing deprecated SkCanvas virtuals (#17445)
API staging is complete - these defines have been removed.
2020-04-01 10:27:50 -04:00
Chinmay Garde
f7c6c6d92a
Use Metal on iOS by default. (#17431)
Fixes https://github.com/flutter/flutter/issues/18208. All Metal for iOS related work items described in https://github.com/orgs/flutter/projects/5 have been completed.
2020-03-31 23:37:04 -07:00
Chinmay Garde
0911a08048
If the application says there is a new texture but does not provide one, reuse the last texture. (#17437)
This matches the behavior of the OpenGL backend.
2020-03-31 22:01:32 -07:00
Robert Ancell
6befd4a804
Update FlDartProject to new path format (#17302)
Matches the structure used on Windows of assuming a directory format.
2020-03-31 15:25:44 -07:00
liyuqian
f003d9b41a
GPU to raster rename, patch 2 (#17428) 2020-03-31 15:16:11 -07:00
Chinmay Garde
6bdbe16760
Fix iOS builds on Xcode 11.4 for new enum values added in iOS 13.4. (#17429)
The following issues have been filed to track the handling of these enum values:

* Handle the UITouchTypeIndirectPointer enum value. https://github.com/flutter/flutter/issues/53696
* Handle the UITouchPhaseRegion enum values. https://github.com/flutter/flutter/issues/53695

No change in functionality. Only makes the iOS engine build on the latest
versions of Xcode and iOS SDK. The enum values cannot be used with the
API_AVAILABLE macro because the buildbots have not been updated yet.
2020-03-31 15:10:05 -07:00
Nathan Rogers
7fc22d118e
[fuchsia] Remove "CreateTraceProvider" trace event (#17423)
Since the trace provider hasn't been created yet, it is not possible to
trace the creation of a trace provider using a TRACE_DURATION event (the
trace enabled and category check will always fail).  While this isn't
causing any urgent problems, remove it to set a good example for other
clients of tracing that might happen to reference this code.
2020-03-31 15:09:38 -07:00
liyuqian
70b12fa181
Strengthen json string comparisons (#17425)
Make the test robust even if the json map reorders its keys.
2020-03-31 15:02:26 -07:00
liyuqian
807ca8543c
More rename from GPU thread to raster thread (#17408)
This PR touches variable names, class names, and file names so it's significantly more risky than its predecessor https://github.com/flutter/engine/pull/17329

Due to file name changes, this PR is expected to change the license files.

We haven't rename `shell/gpu` to `shell/raster` yet. It should be optional but I think it's better to have `raster_surface_software.cc` than `gpu_surface_software.cc`.
2020-03-31 14:05:28 -07:00
liyuqian
193bb355d9
Disable OnServiceProtocolGetSkSLsWorks in Fuchsia (#17361) 2020-03-30 14:31:03 -07:00
Jason Simmons
141d2ea050
Use the private presentation window type for platform view windows (#17385) 2020-03-30 14:26:10 -07:00
wqyfavor
915e63ecb7
Fix FlutterView's _delegate is not declared as ivar but a global variable. (#17206) 2020-03-30 14:26:03 -07:00
Gary Qian
361d5d5320
Partially revert Samsung keyboard force-update workaround (#17391) 2020-03-29 15:46:39 -07:00
Emmanuel Garcia
b716cbba71
Reland unobstructed platform views (#17336) 2020-03-27 16:39:29 -07:00
Brian Osman
662e7804f4
Guard SkCanvas bitmap virtuals for deprecation and removal (#17371) 2020-03-27 13:28:03 -04:00
wqyfavor
82c7ab09a4
Fix problem that using multi-engines, sometimes OpenGL would crash be cause of invalid EAGLContext (#17366) 2020-03-27 02:40:56 -07:00
Chinmay Garde
67e66f7c81
Disable ShellTest.OnServiceProtocolGetSkSLsWorks. (#17367)
Re-enabling tracked in https://github.com/flutter/flutter/issues/53399.
2020-03-27 01:10:15 -07:00
liyuqian
b3075b3091
Rename GPU thread to raster thread in code comments (#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
ba80c0c49a
Android change to match the Google internal changes. (#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
23dff31a38
[runner] Corrects logging of close() status (#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
b235233e9d
Revert unobstructed platform views (#17326) 2020-03-25 14:36:10 -07:00
Drew Fisher
fb841071c2
fuchsia: remove use of replace_as_executable (second try) (#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
f1d8026637
[metrics] Record the frame target time on the layer tree (#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
bb35963050
Add service protocol to get SkSLs (#17300)
Fixes https://github.com/flutter/flutter/issues/53114
2020-03-24 21:42:12 -07:00
Emmanuel Garcia
e2d9c60393
Flush background canvas before allocating a new surface (#17308) 2020-03-24 20:10:10 -07:00
Robert Ancell
c93b67aa81
Add a Linux Shell that uses GTK for rendering. (#16977) 2020-03-24 13:26:02 -07:00
Chinmay Garde
518c9e09cc
Remove checks for the always true using_fuchsia_sdk flag in all GN files. (#17261) 2020-03-23 18:31:02 -07:00
mikejurka
ad8ccf47b1
[Fuchsia] Move physical shape layer compositing to Flutter (#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
6fef0d0a0b
Removed a text input trait that causes VoiceOver to be incorrect when tapping a text input. (#17203) 2020-03-23 12:57:15 -07:00
gaaclarke
9343c5ed28
added missing mock to MockEngine for iOS unit tests (#17273) 2020-03-23 11:38:42 -07:00
stuartmorgan
33a21d1ff8
Add DartProject for Windows embedding API (#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
8a8b298405
Added a log message when sharing a FlutterEngine across multiple FlutterViewControllers. (#17186) 2020-03-23 10:44:53 -07:00
Chinmay Garde
e56b335ade
Allow external texture sources when using the Metal backend. (#17154) 2020-03-22 22:36:03 -07:00
Chinmay Garde
c0deb23612
Don’t depend on an implicit transaction when no external view embedder is present. (#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
f5d25da83c
Reland: Implement unobstructed Platform Views on iOS (#17237) 2020-03-20 18:58:55 -07:00
Emmanuel Garcia
70f6d18bfa
Revert "Implement unobstructed Platform Views on iOS (#17049)" (#17233)
This reverts commit 2627634be807a28f4d56c5d7cd878c3ff6ce07ac.
2020-03-20 14:46:09 -07:00
Emmanuel Garcia
2627634be8
Implement unobstructed Platform Views on iOS (#17049) 2020-03-20 12:38:58 -07:00
Chris Yang
2d42c74a34
Replace Pipeline's ProduceToFront with ProduceIfEmpty to handle thread merging. (#17122) 2020-03-20 11:04:47 -07:00
stuartmorgan
373ebe6430
Fix copy/paste mistake in GLFW asset path resolution (#17208)
Fixes a regression from #16944
2020-03-19 11:04:43 -07:00
Jonah Williams
857859f801
Remove unused PackagesUri rpc param in OnServiceProtocolRunInView (#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
498dc77361
Truncate error messages for the crash reporter to the maximum length permitted by the FIDL call (#17189) 2020-03-18 13:08:54 -07:00
Wu Zhong
3a2cc95533
Fixes comments typo in FlutterPlatformViews (#17094) 2020-03-17 21:38:53 -07:00
stuartmorgan
710f738dd6
Allow relative resource paths in GLFW embedding (#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
fddb0c272e
Made it so you can whitelist what events you want to listen to (#17108) 2020-03-16 11:00:03 -07:00
Chinmay Garde
d8e45f9c14
Update the Metal backend selection to use iOS 10.0 and A7 as the version floor. (#17162)
Fixes https://github.com/flutter/flutter/issues/52356
2020-03-15 14:35:48 -07:00
Emmanuel Garcia
025e2d82dd
Migrate embedding to AndroidX (#17075) 2020-03-13 21:19:24 -07:00
Chinmay Garde
cedddb7075
Document texture registry threading requirements. (#17149) 2020-03-13 18:55:58 -07:00
xster
1ff81bc117
Make a pass through all the embedding javadocs (#17109) 2020-03-13 16:34:34 -07:00
Brian Osman
cf2424bbd2
Canvas: Remove some unused virtuals, and prepare for signature change (#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
29b455d850
[fuchsia] Change vsync trace name back to "vsync callback" on Fuchsia (#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