4980 Commits

Author SHA1 Message Date
Chinmay Garde
8116ea14c7 [Impeller] Enable vulkan validations via a flag on Android. (flutter/engine#40792)
[Impeller] Enable vulkan validations via a flag on Android.
2023-03-30 20:07:51 +00:00
luckysmg
de2ccc20e3 Revert "[iOS] Send connectionClosed message when resignFirstResponder to ensure framework focus state is correct. (#40703)" (flutter/engine#40777)
Revert "[iOS] Send connectionClosed message when resignFirstResponder to ensure framework focus state is correct."
2023-03-30 08:11:57 +00:00
luckysmg
9b3ea55c61 [iOS] Send connectionClosed message when resignFirstResponder to ensure framework focus state is correct. (flutter/engine#40703)
[iOS] Send connectionClosed message when resignFirstResponder to ensure framework focus state is correct.
2023-03-30 05:30:17 +00:00
hangyu
f53c064783 [macOS]Support SemanticsService.announce (flutter/engine#40585)
[macOS]Support SemanticsService.announce
2023-03-30 01:37:05 +00:00
Reid Baker
48259c2b4d Supress warning for missing super call onBackPressed cl/516851539 (flutter/engine#40757)
Suppress warning for missing super call onBackPressed cl/516851539
2023-03-29 19:20:28 +00:00
Chris Bracken
0bb0c9686f Revert "Listen to WM_CLOSE message on Windows to allow framework to cancel exit (#40493)" (flutter/engine#40739)
This caused regressions for two internal customers.

Issue: https://github.com/flutter/flutter/issues/123654
Internal issue: b/275565297.

This reverts commit d7059df4ebe468913480f84d9d88832e89fc87d2.
2023-03-29 09:50:37 -07:00
Loïc Sharma
2686501928 [macOS] Use the new update semantics embedder API (flutter/engine#40584)
[macOS] Use the new update semantics embedder API
2023-03-28 20:18:50 +00:00
Chris Bracken
787ed3f63c [macOS] Eliminate explicit main window init() (flutter/engine#40695)
[macOS] Eliminate explicit main window init()
2023-03-28 01:31:20 +00:00
Brandon DeRosier
5b4b920911 [Impeller] Fix Impeller Metal wide gamut (flutter/engine#40671) 2023-03-27 13:26:34 -07:00
Filip Filmar
c68289bb76 Remove timezone from flutter (flutter/engine#40588)
Remove timezone from flutter
2023-03-27 17:08:05 +00:00
Chinmay Garde
753e03413a [Impeller] More sundry fixes to the Vulkan backend. (flutter/engine#40603)
* Fix mip-map generation in unit-tests where the command buffer was not
  submitted.
* Cleanup descriptor counts being always 1 in Vulkan code-gen.
* Reworked capabilities. Platforms can add to the base capability set.
* Vulkan backend picks between more available color and stencil formats.
* Descriptor pools are dynamically sized.
* Layout transitions are more explicit. Both allocated and swapchain images
  track their own layouts and redundant transitions are avoided.
* Objects active in a pending command buffer are collected but the waits happen
  on a separate fence waiter. Thread is named
  "io.flutter.impeller.fence_waiter".
* Added queue and command buffer instant markers for better traces.
* Command pools and their buffers are now thread local. Fixes sync validation
  failure.
* Debug reports are now more readable and command buffer and queue breadcrumbs
  will be displayed on a validation report.
* Staging buffers are back.
* Pipeline caches have been wired up. After 50 frames, the current Vulkan
  pipeline cache will be written out to disk for subsequent launches. Writes
  will happen on a background worker.
* Runtime stages have been wired up. But the build rules to provide the right
  stages are still remaining.

Fixes https://github.com/flutter/flutter/issues/121536
Fixes https://github.com/flutter/flutter/issues/121627
Fixes https://github.com/flutter/flutter/issues/121632
Fixes https://github.com/flutter/flutter/issues/120499
2023-03-25 13:40:19 -07:00
Dan Field
96773d7c04 Avoid implicit conversions to floats in dart:ui (flutter/engine#40098)
Avoid implicit conversions to floats in dart:ui
2023-03-24 21:36:41 +00:00
yaakovschectman
c5156e2370 Revert "Unregister the FlutterWindowsView on its destruction (#39824)" (flutter/engine#40607)
Revert "Unregister the FlutterWindowsView on its destruction"
2023-03-24 19:26:34 +00:00
Loïc Sharma
cbee4256c0 [Windows] Use the new update semantics embedder API (flutter/engine#40072)
[Windows] Use the new update semantics embedder API
2023-03-24 18:29:26 +00:00
yaakovschectman
d7059df4eb Listen to WM_CLOSE message on Windows to allow framework to cancel exit (flutter/engine#40493)
* Intercept WM_CLOSE

* Messy but framework is in place

* Test exit and cancel

* Try to test for windows

* Check for parent HWND

* Move string to PlatformHandler class

* Rename lifecycle manageR

* Change condition for headless

* Move window proc to lambda

* Formatting and licenses

* Encode JSON dart values

* Clean up lifecycle

* PR feedback

* Update shell/platform/windows/platform_handler.h

Co-authored-by: Chris Bracken <chris@bracken.jp>

* Update shell/platform/windows/windows_lifecycle_manager.cc

Co-authored-by: Chris Bracken <chris@bracken.jp>

* Update shell/platform/windows/windows_lifecycle_manager.cc

Co-authored-by: Chris Bracken <chris@bracken.jp>

* Static cast enum to int

* Formatting

* Update shell/platform/windows/testing/engine_modifier.h

Co-authored-by: Loïc Sharma <737941+loic-sharma@users.noreply.github.com>

* Update shell/platform/windows/windows_lifecycle_manager.cc

Co-authored-by: Loïc Sharma <737941+loic-sharma@users.noreply.github.com>

* Update shell/platform/windows/platform_handler.cc

Co-authored-by: Loïc Sharma <737941+loic-sharma@users.noreply.github.com>

* Update unit tests

* PR Feedback

* PR Feedback

* Constexpr

* Formatting

* Wparam

---------

Co-authored-by: Chris Bracken <chris@bracken.jp>
Co-authored-by: Loïc Sharma <737941+loic-sharma@users.noreply.github.com>
2023-03-24 12:44:42 -04:00
Zachary Anderson
d9cec91611 Read the FLTEnableImpeller flag from the right bundle (flutter/engine#40535) 2023-03-22 15:42:26 -07:00
Loïc Sharma
3ab31ad593 [Embedder API] Introduce new update semantics callback (flutter/engine#39807)
[Embedder API] Introduce new update semantics callback
2023-03-22 00:07:21 +00:00
yaakovschectman
6e01d06951 Add Windows exit requests and responses (flutter/engine#40400)
* Communicate exit request

* Unit test exit message

* Comments

* Formatting

* Move exit code

* Formatting
2023-03-21 08:48:05 -04:00
Jim Graham
37317c5984 restructure DL sources into sub-directories and new file naming conventions (flutter/engine#40157)
restructure DL sources into sub-directories and new file naming conventions
2023-03-21 02:34:48 +00:00
Greg Spencer
28a810a5b2 Rename setters for lifecycle state (flutter/engine#40462)
Rename setters for lifecycle state
2023-03-20 21:16:21 +00:00
Alexander Aprelev
6a2019ca61 Roll dart to 01350005aab7a7bfe2dc98066cb7acc95a811f7a (flutter/engine#40455)
Roll dart to 01350005aab7a7bfe2dc98066cb7acc95a811f7a
2023-03-20 19:57:15 +00:00
Chris Yang
63569eee26 Revert "Revert "[ios_platform_view] MaskView pool to reuse maskViews." (#39608)" (flutter/engine#40456)
Reland "[ios_platform_view] MaskView pool to reuse maskViews" (#39608)"
2023-03-20 19:51:17 +00:00
Michael Goderbauer
9258a58a33 add final class modifiers to fix dart roll (flutter/engine#40434) 2023-03-20 10:10:55 -07:00
Jim Graham
f9918c006e Reland "Sequester all Skia<->DL interactions into the skia sub-module" (flutter/engine#40435)
Reland "Sequester all Skia<->DL interactions into the skia sub-module"
2023-03-19 22:59:17 +00:00
Chinmay Garde
5efbf9ae44 [Impeller] Remove work queues. (flutter/engine#40429)
[Impeller] Remove work queues.
2023-03-18 23:42:34 +00:00
Zachary Anderson
6abd95a53b Provisional iOS impeller flag flip (flutter/engine#40405) 2023-03-17 20:35:36 -07:00
Loïc Sharma
3e5a3fa15e [macOS] Remove a single accessibility root assumption (flutter/engine#40316)
[macOS] Remove a single accessibility root assumption
2023-03-17 20:53:39 +00:00
Chris Bracken
1404722d05 Add doc comment to Pipeline (flutter/engine#40388)
Add doc comment to Pipeline
2023-03-17 20:38:55 +00:00
Jason Simmons
7598fa32e5 Wrap the iOS platform message handler in an autorelease pool block (flutter/engine#40373)
Wrap the iOS platform message handler in an autorelease pool block
2023-03-17 19:15:47 +00:00
Zachary Anderson
d39891c432 Un-bitrot impeller_unittests; disable failing tests; disable non-metal backends (flutter/engine#40339) 2023-03-16 19:34:57 -07:00
Loïc Sharma
25727539bb [Windows] Fix crash if clipboard is set to null (flutter/engine#40238)
Currently, the framework allows setting the clipboard to `null`. [Platforms handle this case inconsistently](https://github.com/flutter/flutter/issues/121976#issuecomment-1464721716), and we will update the framework to disallow setting the clipboard's data to `null`.

In the meantime, this change makes the Windows embedder resilient to unexpected clipboard messages. If your clipboard data's text is unexpected, you will now get an error instead of crashing your app.

Part of https://github.com/flutter/flutter/issues/121976
2023-03-16 16:52:27 -07:00
Greg Spencer
0efa11abc1 Handle error more gracefully, add test for same (flutter/engine#40361)
Handle error more gracefully, add test for same
2023-03-16 21:38:47 +00:00
Robert Ancell
84c69f7df9 Fix incorrect usage of fl_method_error_response_new in documentation example (flutter/engine#40288) 2023-03-17 10:23:24 +13:00
Chris Bracken
753bf93b11 [macOS] Eliminate unnecessary dynamic declaration (flutter/engine#40327)
Since `view` is a property of `NSViewController`, it's unnecessary for
us to declare `@dynamic view` in `FlutterViewController`'s
implementation.
2023-03-16 13:19:42 -07:00
Jim Graham
eb3a75ef78 Revert "Reland "Sequester all Skia<->DL interactions into the skia sub-module" (#40319)" (flutter/engine#40357)
Revert "Reland "Sequester all Skia<->DL interactions into the skia sub-module""
2023-03-16 19:55:51 +00:00
yaakovschectman
c1df0b8413 Pass parameters by value to StreamHandlerError (flutter/engine#40311)
* Pass by value/rvalue

* Test pass by value

* Formatting

* Test nullptr

* Formatting
2023-03-16 14:00:30 -04:00
Michael Goderbauer
dcc4b1b535 Reland: Bump lower Dart SDK constraints to 3.0 (flutter/engine#40318)
* WIP

Bump to 3.0.0-0

* fix lints

* drop web_ui

* opt pointer_converter.dart out of dart 3

* Revert "drop web_ui"

This reverts commit b97a015d5cd0d7e0380a4231be4c31aad36671f1.
2023-03-16 08:07:39 -07:00
Chris Bracken
ec1d7bae5d [macOS,Windows] Use static casts where possible (flutter/engine#40334)
[macOS,Windows] Use static casts where possible
2023-03-16 01:25:08 +00:00
Robert Ancell
c411d37046 Add fl_texture_get_id, so textures can be passed to Flutter (flutter/engine#40290)
Add fl_texture_get_id, so textures can be passed to Flutter
2023-03-16 01:10:07 +00:00
Chris Bracken
970c2c031a [macOS] Rename FlutterViewController.id to viewId (flutter/engine#40323)
[macOS] Rename FlutterViewController.id to viewId
2023-03-15 22:57:55 +00:00
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
Dan Field
1de9bf9581 Make the context current before accessing GL in MakeSkiaGpuImage (flutter/engine#40208)
Make the context current before accessing GL in MakeSkiaGpuImage
2023-03-11 00:39:04 +00:00