4317 Commits

Author SHA1 Message Date
Jim Graham
4107e5a226 Reland "Sequester all Skia<->DL interactions into the skia sub-module" (flutter/engine#40319)
Reland "Sequester all Skia<->DL interactions into the skia sub-module"
2023-03-15 22:56:01 +00:00
Zachary Anderson
32b3e66d7c Revert "Bump lower Dart SDK constraints to 3.0 (#40178)" (flutter/engine#40317)
Revert "Bump lower Dart SDK constraints to 3.0"
2023-03-15 18:53:00 +00:00
Michael Goderbauer
828f3deb86 Bump lower Dart SDK constraints to 3.0 (flutter/engine#40178)
Bump lower Dart SDK constraints to 3.0
2023-03-15 17:57:04 +00:00
Robert Ancell
3c8cac2faa Improve Linux texture examples. (flutter/engine#40289)
Use 'MyTexture' naming to match the Linux shell 'MyApplication'.

Show how to connect up the virtual methods.
2023-03-15 14:09:26 +13:00
Jim Graham
b89acc989c Revert "Reland "Sequester all Skia<->DL interactions into the skia sub-module" (#40243)" (flutter/engine#40283)
This reverts commit bbc993164a0d2f7d5a1b7b052ff884500040acc0.
2023-03-14 15:33:08 -07:00
Jim Graham
bbc993164a Reland "Sequester all Skia<->DL interactions into the skia sub-module" (flutter/engine#40243)
Reland "Sequester all Skia<->DL interactions into the skia sub-module"
2023-03-14 18:53:06 +00:00
Zachary Anderson
8c46471d24 Revert "[Impeller] More sundry fixes to the Vulkan backend. (#40244)" (flutter/engine#40247)
Revert "[Impeller] More sundry fixes to the Vulkan backend."
2023-03-13 15:45:38 +00:00
Chinmay Garde
3ea71b3d11 [Impeller] More sundry fixes to the Vulkan backend. (flutter/engine#40244)
[Impeller] More sundry fixes to the Vulkan backend.
2023-03-13 06:49:22 +00:00
Chris Bracken
761ba30bc7 [macOS] Forward mouseDown/Up to view controller (flutter/engine#40241)
This works around an AppKit bug in which mouseDown/mouseUp events are
not correctly forwarded up the responder chain for views nested inside
an NSPopover if (and only if) the macOS "Reduce Transparency"
accessibility setting is enabled in the System Settings.

When the above conditions are satisfied, the nested NSView receives the
mouseDown:/mouseUp: call but if it delegates to the default
implementation (implemented in NSResponder) mouseDown/mouseUp calls are
triggered on containing views (in our case FlutterViewWrapper) but not
triggered on the view controller and other responders in the responder
chain until we an _NSPopoverWindow class is hit.

A minimal AppKit-only (non-Flutter) repro shows this behaviour repros
with even a minimal NSViewController implementation and an unmodified NSView.
See: https://github.com/cbracken/PopoverRepro

A radar has been filed with Apple and a copy posted to OpenRadar.
See: http://www.openradar.me/FB12050037

In order to work around this bug, we override mouseDown/mouseUp in the
topmost containing view of FlutterView (in our case, FlutterViewWrapper)
to have the behaviour documented as the default behaviour in
NSResponder's mouseDown/mouseUp documentation. In otherwords, to simply
forward the call to self.nextResponder.
See: https://developer.apple.com/documentation/appkit/nsresponder/1524634-mousedown

Because replicating the exact configuration of a FlutterView contained
in an NSPopover and System Settings that have been modified to enable
the "Reduce Transparency" setting is difficult and likely error-prone in
infra, we instead simulate the bug by testing that even if NSResponder's
mouseDown/mouseUp method are swizzled to no-op, these calls are
correctly forwarded to the next responder in the chain.

If, in the future Apple does fix this issue, this workaround can be
removed once Flutter's minimum supported macOS SDK is at least the
version that contains the fix.

Issue: https://github.com/flutter/flutter/issues/115015
2023-03-11 12:49:59 -08:00
Robert Ancell
5c4c343488 Add platform channel System.exitApplication and System.requestAppExit support (flutter/engine#40033)
Add platform channel System.exitApplication and System.requestAppExit support
2023-03-10 14:43:35 +13:00
Adam Perry
e9942f8f52 Reland "[fuchsia] Remove component framework v1 support. (#39732)" (flutter/engine#40198)
Previously reverted in #40104, this should now be safe to reland as
the last dependency has been deleted internally.

This reverts commit 9369c1ed1f33cfdad25ebe9cb809d6b5d6941159.
2023-03-09 15:05:45 -08:00
Chris Yang
bdcc4f6e95 [ios] refactor platform_message_handler_ios (flutter/engine#40182)
[ios] refactor platform_message_handler_ios
2023-03-09 21:27:37 +00:00
Loïc Sharma
89a738d1b7 [Embedder API] Lock nested structs to guarantee ABI (flutter/engine#40069)
[Embedder API] Lock nested structs for ABI stability
2023-03-09 21:09:50 +00:00
Loïc Sharma
85065c29e9 [Desktop] Use references for semantics update (flutter/engine#40167)
[Desktop] Use references for semantics update
2023-03-09 19:44:17 +00:00
gaaclarke
9e0db60c6a Made sure we get the initial route from the intent. (flutter/engine#40148)
Android: Made sure we get the initial route from the intent.
2023-03-09 18:42:51 +00:00
Jason Simmons
bd3381321d Make the Linux GTK widget focusable (flutter/engine#40163)
Make the Linux GTK widget focusable
2023-03-09 15:26:57 +00:00
Jim Graham
bc162fe559 Revert "Reland "Sequester all Skia<->DL interactions into the skia sub-module" (#40114)" (flutter/engine#40161)
Revert "Reland "Sequester all Skia<->DL interactions into the skia sub-module""
2023-03-09 02:41:54 +00:00
Eric Seidel
486cb47593 Add missing inputs declaration (flutter/engine#40133)
inputs = [ "android_exports.lst" ]
was missing from the flutter_shell_native rule, which meant if you edited android_exports.lst it would not notice and would not rebuild/relink.
2023-03-08 13:26:41 -08:00
Jonah Williams
aa6c168e5f [Impeller] Replace FML_OS_PHYSICAL_IOS compile check with runtime capabilties check based on metal GPU family. (flutter/engine#40124)
[Impeller] Replace FML_OS_PHYSICAL_IOS compile check with runtime capabilties check based on metal GPU family.
2023-03-08 03:25:08 +00:00
hellohuanlin
6e08fa0d29 [platform_view]fix regression for addSubview when re-ordering (flutter/engine#40091)
[platform_view]fix regression for addSubview when re-ordering
2023-03-07 23:56:00 +00:00
Robert Ancell
5041a77db3 Use a single FlGLArea (flutter/engine#39473)
Use a single FlGLArea
2023-03-07 20:51:54 +00:00
Greg Spencer
ce70895a30 Fix some more includes (flutter/engine#40122)
Fix some includes missing "flutter/" prefix.
2023-03-07 20:50:12 +00:00
Jim Graham
53a80bdedf Reland "Sequester all Skia<->DL interactions into the skia sub-module" (flutter/engine#40114)
Reland "Sequester all Skia<->DL interactions into the skia sub-module"
2023-03-07 19:03:17 +00:00
Adam Perry
9369c1ed1f Revert "[fuchsia] Remove component framework v1 support. (#39732)" (flutter/engine#40104)
This reverts commit 181ee0e750727f4ef54e9b8421b264a333a0bdfc.
2023-03-07 10:53:16 -08:00
Greg Spencer
c0fbce46f5 Fix imports for FlutterApplication (flutter/engine#40100)
Fix imports for FlutterApplication
2023-03-07 01:26:37 +00:00
Jia Hao
04c31bd554 Optimize search for the default bundle (flutter/engine#39975)
Optimize search for the default bundle
2023-03-07 00:14:48 +00:00
Robert Ancell
ea232f836d Fix incorrect response to platform SystemSound.play (flutter/engine#39992)
* Fix incorrect response to platform SystemSound.play
* Add tests for FlPlatformPlugin
2023-03-07 09:49:49 +13:00
Chris Yang
baee6242e3 [ios] add setting flag to enable embedder api. (flutter/engine#40025)
[ios] add setting flag to enable embedder api.
2023-03-03 23:17:19 +00:00
yaakovschectman
839f6c33d2 Revert UIA (flutter/engine#40062) 2023-03-03 17:17:46 -05:00
Loïc Sharma
6142ea0570 [Windows] Remove accessibility root ID assumption (flutter/engine#39994)
[Windows] Remove another accessibility root ID assumption
2023-03-03 21:35:44 +00:00
Greg Spencer
ddfbc85928 Add platform channel System.exitApplication and System.requestAppExit support (flutter/engine#39836)
Add platform channel `System.exitApplication` and  `System.requestAppExit` support
2023-03-03 19:13:00 +00:00
godofredoc
b6f6101b10 Remove special handling of gtk debug artifact. (flutter/engine#40040)
Remove special handling of gtk debug artifact.
2023-03-03 18:29:11 +00:00
Chris Bracken
f4e2b925c3 [macOS] Add README.md for macOS embedder (flutter/engine#40032)
Describes how to build and test the macOS embedder.
2023-03-02 17:13:56 -08:00
Loïc Sharma
7aff51d95d [Embedder API] Freeze parts of API for ABI stability (flutter/engine#39963)
[Embedder API] Freeze parts of API for ABI stability
2023-03-03 00:28:52 +00:00
Adam Perry
181ee0e750 [fuchsia] Remove component framework v1 support. (flutter/engine#39732)
There are no longer any CMX-based components outside of prebuilts
which are run by existing flutter runner prebuilts.
2023-03-01 20:07:03 -08:00
Robert Ancell
d7dbc85328 Fix FlView self variables using non-standard names. (flutter/engine#39468)
By convention, use `self` for the pointer to the current object. Fixes this inconsistency in FlView.
2023-03-01 16:00:15 -08:00
Robert Ancell
a226775bdc Simplify FlView (flutter/engine#39467)
This PR simplifies the FlView GL interactions. It removes some code paths that were never being used (possibly for future use with platform views?) and complex internal APIs that could be done in a single method call. This is motivated in investigating https://github.com/ubuntu-flutter-community/software/issues/868.

I plan to take this further, since there doesn't seem to be any reason why multiple FlGLArea widgets are used - we can draw all the layers in one widget.

For reviewers - the individual commits aren't particularly interesting, I just did it that way to be sure I wasn't breaking anything along the way and help to diagnose any regressions in the future.

The structural changes that this PR is simplifying came in 0561c75b4d6036e7d2c7e06163a3f0629464db9f.
2023-03-01 12:34:38 -08:00
Loïc Sharma
d61238974c [Embedder API] Add 'array of pointers' guidance (flutter/engine#39804)
[Embedder API] Add 'array of pointers' guidance
2023-02-28 23:04:11 +00:00
Chinmay Garde
605e76a154 [Impeller] Patch up sundry issues in the Vulkan backend. (flutter/engine#39905)
Kaushik already did most of the great work. This patch gets us to a point where
all the playgrounds tests pass and the common performance optimizations are in
place. All known non-compute Impeller features should be implemented. There are
iOS only performance optimizations that haven’t been opted into because these
are behind define guards. These need to be generalized. Without that, the
performance of this backend will lag behind that of the Metal backend but only
because it is not an apples to apples comparison.

The general rubric was to keep the code and concepts as similar to the Metal
backend as possible.

The list of updates, all to the Vulkan Impeller backend:

* MSAA is wired up.
* Depth and stencil attachments and pipeline states are wired up.
* Got rid of Vulkan specific hacks in the inline pass context that were
  preventing clips from working.
* Storage modes for both device buffer and texture allocation are respected.
  This includes optimal usage of tile memory for device transient attachments.
* Host coherent memory for textures is no longer a requirement with explicit
  mapping management and write flushes.
* Texture uploads should be optimized for the UMA case without needing a staging
  buffer. That entire pipeline has been reworked.
* Textures track their current layout and ensure they get to the right layout
  based on usage without redundant transitions.
* Cube textures are now supported.
* Mipmapping has been reworked to correct image layout errors. With the new
  texture layout transition management, blit passes should be a whole lot easier
  to read and reason about.
* Allocator allocations are named using Vulkan debug utilities and the allocator
  (VMA). Comes in handy when chasing leaks. All of which are chased down.
* Left some handy utilities in there to debug resource leaks after context
  shutdown.  These are validation errors.
* Debug groups are pushed around render pass command encoding as well as the
  entire pass contents. This mimics the behavior of the Metal backend and it
  should be easy to map traces using both backends in Xcode and RenderDoc.
* Command buffer submission allows for tracking the life cycles of all resources
  referenced in the command stream and ensuring that the objects stay alive till
  past the submission of the command buffer. All use-after-free issues due to
  this class of issue have been chased down.
* Command pools are now context global instead of being created per pass.
* Descriptor pool are now context global instead of being created per pass.
  Individual descriptor types are now reference counted and returned to the pool
  when not needed. The pool is still fixed size though (and hence relatively
  large).
* All instances of global waitIdle on the device are removed during normal
  operation. The only times a waitIdle may happen is during swapchain recreation
  and context destruction.
* Swapchain adapt to them going out of date with the underlying surface and
  seamlessly resize as necessary on the next drawable acquisition.
* Playgrounds are resizable.
* Pipeline front face and cull modes are respected.
* Clears for all attachments are respected.
* Maximum textures sizes supported on the device are respected instead of
  hardcoding the minimum Vulkan requirement.

Fixes https://github.com/flutter/flutter/issues/112388
Fixes https://github.com/flutter/flutter/issues/112648
Fixes https://github.com/flutter/flutter/issues/112647 and a few other issues...
2023-02-27 21:14:06 -08:00
Xilai Zhang
067d157989 [gn + codesign] add android artifact metadata to legacy build target (flutter/engine#39696)
[gn + codesign] add android artifact metadata to legacy build target
2023-02-28 00:06:46 +00:00
Jaeheon Yi
203ba859ed [fuchsia] Avoid log spam (flutter/engine#39862)
[fuchsia] Avoid log spam
2023-02-27 21:55:15 +00:00
gaaclarke
e52501822b Turned off wide gamut color pixel format for the simulator since it (flutter/engine#39825)
Turned off wide gamut color pixel format for the simulator
2023-02-27 18:19:14 +00:00
yaakovschectman
ae5f401e8c Unregister the FlutterWindowsView on its destruction (flutter/engine#39824)
* Test view destruction

* Test engine view set to nullptr

* Formatting
2023-02-24 14:35:47 -05:00
Jim Graham
0fa8cbec8a Create DlCanvas interface and implement with DisplayListBuilder and SkCanvasAdapter (flutter/engine#39762)
* Create DlCanvas interface and implement with DisplayListBuilder and SkCanvasAdapter
2023-02-23 22:09:35 -08:00
luckysmg
7d62bf9aef [iOS][Text Input] Avoid crash when its UIViewController.view is nil. (flutter/engine#39768)
* [iOS] Avoid handle method calls when host UIViewController.view is nil.

* Modify code.

* ++
2023-02-23 02:46:06 +00:00
Jim Graham
1cf1c0e8d8 save/restore around clipping the (potentially cached) frame canvas (flutter/engine#39797) 2023-02-22 21:41:37 +00:00
chunhtai
ef7d53ae51 Add more log when receiving semantics node not part of update (flutter/engine#39777) 2023-02-22 10:38:42 -08:00
Chris Bracken
827671aaef [common] Use FML macro to prevent copy/assignment (flutter/engine#39786)
Rather than explicitly delete the copy constructor and operator=, use
the standard FML_DISALLOW_COPY_AND_ASSIGN macro used elsewhere across
the codebase. Also ensure that files using this macro #include the
correct FML header directly, rather than relying on a transitive
include.

No test changes/additions since this patch introduces no semantic
changes.
2023-02-22 09:50:06 -08:00
hellohuanlin
a0e967921b [platform_view] fix overlapping platform view not touchable (flutter/engine#39527)
* [platform_view]fix overlapped platform view not touchable

* scenario test

* nit

* actually fix todo
2023-02-21 23:53:20 +00:00
gaaclarke
4be4a44534 Started using bgr10_xr for opaque surfaces. (flutter/engine#39727)
* Started using bgr10_xr for opaque surfaces.

* bdero feedback
2023-02-21 23:31:01 +00:00