4793 Commits

Author SHA1 Message Date
Jim Graham
eb615c6cc4 delete include of private GrMtlTypes header (flutter/engine#38783) 2023-01-11 19:57:47 +00:00
gaaclarke
85eaa970e2 removed forbidden skia include (flutter/engine#38761)
* removed forbidden skia include

* jason feedback
2023-01-10 20:33:31 -08:00
yaakovschectman
717c8724c6 Mark nodes as kIsLineBreakingObject by default, TODO further distinctions (flutter/engine#38721)
* Line breaks

* Formatting

* Update shell/platform/common/accessibility_bridge.cc

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

* Test line breaking object

* Formatting

* Format

Co-authored-by: Loïc Sharma <737941+loic-sharma@users.noreply.github.com>
2023-01-10 11:13:44 -05:00
Kate Lovett
be9ae4793d Undo axes flip on Mac when shift+scroll-wheel (flutter/engine#38338)
* Undo axes flipping when using scroll wheel with shift key

* Formatting

* ++

* Fix test

* Fix for test

* Update shell/platform/darwin/macos/framework/Source/FlutterViewControllerTest.mm

* ++

* Fix format

* Review feedback
2023-01-10 00:18:12 +00:00
Loïc Sharma
5e35f2ab74 Revert "Add CI builder for windows-arm64. (#38394)" (flutter/engine#38729)
This reverts commit 35810a873b59c8d738f1f3661854572cc3aa2215.
2023-01-09 22:35:13 +00:00
Pierrick Bouvier
35810a873b Add CI builder for windows-arm64. (flutter/engine#38394)
* Generate zip archives for Windows following target platform.

* Add CI builder for windows-arm64.

All packages can be cross compiled from an x64 machine.
Unittests are disabled, as they require an arm64 machine.

* Add windows-arm64 to CI.
2023-01-09 21:51:12 +00:00
JiaJian
5a17cf21d2 iOS FlutterTextureRegistry should be a proxy, not the engine itself (flutter/engine#37666)
* feat: add texture registry relay.

* fix: add test.

* fix: format

* fix: add comment.

* fix: remove useless import.

* fix: remove

* fix: file name order.

* fix.

* add test for retain cycle.

* fix compile

* Add comments.

* remove relay.

* add FlutterTextureRegistryRelay in gn

* add golden files.

* add

* add comments.
2023-01-09 18:51:13 +00:00
Jaeheon Yi
0720c7f6dc [fuchsia][scenic] Use infinite hit region (flutter/engine#38647)
fxbug.dev/118729
2023-01-09 15:40:51 +00:00
yaakovschectman
c2d59665dd Limit selection change to focused node on Windows (flutter/engine#38634)
* Limit selection change to focused node on Windows

* Focus fix

* Test document selection change

* Comment

* Formatting

* Update shell/platform/windows/accessibility_bridge_windows.cc

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

Co-authored-by: Loïc Sharma <737941+loic-sharma@users.noreply.github.com>
2023-01-06 16:36:11 -05:00
Erik
010e710512 Remove strict equality check for SkMatrix comparison (flutter/engine#38665)
* Remove strict equality check for SkMatrix comparison

* Address PR comments
2023-01-05 21:44:50 +00:00
Kevin Lubick
ecd5ad9c7c SkBudgeted -> skgpu::Budgeted (flutter/engine#38660)
* SkBudgeted -> skgpu::Budgeted

* colon

* format

* fix GN rules

* undo includes
2023-01-05 21:42:34 +00:00
Nayuta403
4ebc681b23 Reduce the size of Overlay FlutterImageView in HC mode (flutter/engine#38393)
* intersect

* add

* test fix

* fix test

* modify

* typo

* modify

* test
2023-01-05 17:01:55 +00:00
yaakovschectman
2f6724c5bf Update FlutterPlatformNodeDelegate (flutter/engine#38615)
* Update FlutterPlatformNodeDelegate

* Unit test
2023-01-04 10:27:24 -05:00
Jason Simmons
226cf8354c Roll quiver to 3.2.1 (flutter/engine#38617)
Need to roll quiver to a version that doesn't depend on BidirectionalIterator, which is being removed in https://dart-review.googlesource.com/c/sdk/+/276741?tab=checks.
2023-01-04 02:04:38 +00:00
yaakovschectman
6c12d1292d Make AccessibilityBridge a AXPlatformTreeManager (flutter/engine#38610)
* Make Accessibility Bridge a tree manager

* Add FlutterPlatformNodeDelegate::GetPlatformNode

* Add unit test

* Formatting

* PR
2023-01-03 15:18:04 -05:00
Loïc Sharma
757b6d8cb1 [Windows] Make the engine own the cursor plugin (flutter/engine#38570) 2023-01-03 17:26:06 +00:00
Loïc Sharma
fa208d2285 [Windows] Add engine builder to simplify tests (flutter/engine#38546)
* [Windows] Add engine builder to simplify tests

* Format
2022-12-29 21:32:23 +00:00
Emircan Uysaler
8528d4f572 [fuchsia] Add trace flow for Flatland::Present (flutter/engine#38565) 2022-12-29 15:52:09 -05:00
Emircan Uysaler
4667a310d0 [fuchsia] Set presentation interval (flutter/engine#38549) 2022-12-29 13:02:56 -05:00
Brandon DeRosier
52788a1e67 [Impeller Scene] Add ColorSourceContents for drawing a node (flutter/engine#38485) 2022-12-28 20:57:14 -08:00
Alexander Biggs
72c5b1eee5 [fuchsia] Debugging code for crash. (flutter/engine#38518) 2022-12-27 20:26:47 +00:00
Matej Knopp
bc41422fb1 [macOS] Update FlutterView layer scale when backing properties change (flutter/engine#38402) 2022-12-20 01:05:26 +01:00
gaaclarke
a76ec8c965 reland: Started using FlutterEngineGroups by default on Android (flutter/engine#38367)
* Revert "Revert "Started using FlutterEngineGroups by default on Android  (#37822)" (#38351)"

This reverts commit b0a282e0cc7e0ceb22ce75258c2b9c22266b7f47.

* fixed the entrypoint test

* updated old test

* coldpalelight's suggestion

* added entrypoint args
2022-12-19 11:26:36 -08:00
Chris Bracken
cf89f3ff75 Even though the file is pure C code, it's useful to use a C++ or Objective-C++ filename in order to use FML (assertions) in the implementation. (flutter/engine#38365)
Three implementation changes:
* Since the file is now C++, some implicit void* conversions now require
  an explicit cast.
* A malloc/free of a buffer has been replaced with a std::vector.
* An `assert()` was changed to `FML_DCHECK` for consistency with the
  rest of the embedder.

No test changes since there are no semantic changes.

Existing tests are in:
https://github.com/flutter/engine/blob/main/shell/platform/darwin/common/framework/Source/flutter_standard_codec_unittest.mm
2022-12-16 23:28:01 -08:00
Chris Bracken
1571befea8 [iOS, macOS] Migrate from assert to FML_DCHECK (flutter/engine#38368)
Eliminates raw C asserts in the iOS and macOS embedders, replacing them
with FML_DCHECK for consistency with the rest of the codebase.

No semantic change so no changes to tests.
2022-12-16 19:07:16 -08:00
gaaclarke
29c3e97f45 Sped up FlutterStandardCodec writing speed. (flutter/engine#38345)
* Sped up FlutterStandardCodec writing speed.

* added clear division of reader and writer helpers

* updated doxygen comment
2022-12-16 22:43:55 +00:00
Chris Bracken
dc3033d922 Clarify semantics action dispatch id parameter (flutter/engine#38356)
Previously the embedder API documented this as an action ID, but it's
actually the semantics node ID. This fixes the docs and renames the
parameter to clarify its purpose.

This callback is registered in the framework render bindings:
9102f2fe0b/packages/flutter/lib/src/rendering/binding.dart (L43)

Handled by `_handleSemanticsAction`:
9102f2fe0b/packages/flutter/lib/src/rendering/binding.dart (L360-L366)

Which invokes `SemanticsOwner.performAction`, where the node is looked up by ID:
9102f2fe0b/packages/flutter/lib/src/semantics/semantics.dart (L3258-L3277)
2022-12-16 13:40:48 -08:00
Erik
5262e76f26 Port touch-based tests from embedder integration test (flutter/engine#38234)
* Port touch-based tests from embedder integration test

* Remove RegisterTouchScreen and related variables

* Update embedded child view size
2022-12-16 20:54:07 +00:00
Jason Simmons
b0a282e0cc Revert "Started using FlutterEngineGroups by default on Android (#37822)" (flutter/engine#38351)
This reverts commit 91655b80d28ed70adf4e7f4d82a807a9ede8f885.

This commit caused a regression in the entrypoint_dart_registrant test.
2022-12-16 08:22:44 -08:00
gaaclarke
cf3c286780 Sped up reading with FlutterStandardCodec. (flutter/engine#38327)
* Sped up reading with FlutterStandardCodec.

* added missing license diff

* put the IsStandardType in the header so it's closer to where it should change

* added unittest for subclassing codecs

* fixed lints
2022-12-16 01:40:56 +00:00
Matej Knopp
b56271e908 Add missing include to FlutterThreadSynchronizer (flutter/engine#38337) 2022-12-15 15:55:40 -08:00
gaaclarke
91655b80d2 Started using FlutterEngineGroups by default on Android (flutter/engine#37822)
* Started using FlutterEngineGroups by default on Android and making
them accessible to plugins.

* added docstring

* format
2022-12-15 13:50:38 -08:00
LongCatIsLooong
648fe736a7 Migrate iOS text input plugin to use ARC (flutter/engine#38179)
* migrate iOS text input plugin to ARC

* review

* review

* review
2022-12-15 20:02:05 +00:00
Chris Bracken
55911c9c7f [linux] Allow overriding asset, ICU data path (flutter/engine#38296)
Support setting a custom asset directory and ICU data path.

Fixes: https://github.com/flutter/flutter/issues/117103
Issue: https://github.com/flutter/flutter/issues/117102
2022-12-15 08:25:01 -08:00
Bruno Leroux
876852439d [Windows] Synthesize modifier keys events on pointer events (flutter/engine#38138)
Co-authored-by: Bruno Leroux <bruno.leroux@gmail.com>
2022-12-15 07:25:11 +00:00
Chris Yang
b5a39aae41 Revert "Revert "reland "Migrate darwin common "framework_shared" target to ARC #37049" (#37219)" (#37320)" (flutter/engine#37883)
This reverts commit 27186a3bc77361fecf18729f7161c9895457222b.
2022-12-15 00:25:04 +00:00
Matej Knopp
ed9d9bf372 [macOS] Refactor rendering infrastructure (flutter/engine#37789)
* [macos] Refactor rendering process

* Put includes and imports together

* Update shell/platform/darwin/macos/framework/Source/FlutterCompositor.mm

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

* Update shell/platform/darwin/macos/framework/Source/FlutterCompositor.mm

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

* Update shell/platform/darwin/macos/framework/Source/FlutterCompositor.mm

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

* Update shell/platform/darwin/macos/framework/Source/FlutterPlatformViewController.mm

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

* Update shell/platform/darwin/macos/framework/Source/FlutterRenderer.mm

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

* Remove cast

* Do not manually add platform view layer to FlutterView

* Remove unnecesary _Internal header files

* Make surfaceManager a readonly property

* Add comment

* Style nit: Rewrite as a noun phrase.

* Naming nit for consistency with removeSurfaceForSize:

* Write as ternary conditional.

* Fix plural in comment.

* Offset and index are already set to 0.

* Remove FlutterSurfaceManager lookupSurface

And the associate bookkeeping of borrowed (lent) surfaces.

* Update shell/platform/darwin/macos/framework/Source/FlutterThreadSynchronizer.mm

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

* Update shell/platform/darwin/macos/framework/Source/FlutterSurfaceManager.mm

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

* Update shell/platform/darwin/macos/framework/Source/FlutterSurfaceManagerTest.mm

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

* Update shell/platform/darwin/macos/framework/Source/FlutterRenderer.mm

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

* Update shell/platform/darwin/macos/framework/Source/FlutterSurfaceManagerTest.mm

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

* Update shell/platform/darwin/macos/framework/Source/FlutterSurfaceManager.h

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

* Update shell/platform/darwin/macos/framework/Source/FlutterSurfaceManagerTest.mm

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

* Update shell/platform/darwin/macos/framework/Source/FlutterSurfaceManager.h

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

* Update shell/platform/darwin/macos/framework/Source/FlutterSurfaceManager.h

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

* Update shell/platform/darwin/macos/framework/Source/FlutterSurfaceManager.h

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

* Fix build error

* Address nits

* Replace EVent with fml::AutoResetWaitableEvent

* Remove unecessary CATransaction

* Add GetRequiredFrameSize

Co-authored-by: Chris Bracken <chris@bracken.jp>
2022-12-14 20:40:56 +01:00
Victoria Ashworth
61f2e6b757 Fix issues related to keyboard inset (flutter/engine#37719)
* fix keyboard inset not collapsing when expected

* fix some formatting

* fix issue with rotating with undocked and split keyboard

* fix formatting

* fix behavior on slide over view

* fix formatting

* refactor to make logic more clear

* move enum to header file, remove unneeded parameters, syntax fixes, remove rotation logic

* ignore notification if app state is not active, change way it checks if keyboard intersects with screen to accomodate for repeating decimals, format

* fix leaking unit test

* use viewIfLoaded and update tests to fix mocking

* change ignore logic related to application state to be more specific

* add more comments

* add more comments

* change function name to be more clear, add warning log if view is not loaded, update a comment
2022-12-14 18:15:38 +00:00
Jenn Magder
fd06286e6a Always set orientation preferences on iOS 16+ (flutter/engine#38230) 2022-12-13 18:46:06 +00:00
Loïc Sharma
b5f1b4d403 [Windows] Fix headless mode crash (flutter/engine#38173) 2022-12-12 19:50:03 +00:00
Chris Bracken
bd43e9cc99 [embedder] Consistent naming for GL/Metal tests (flutter/engine#38141)
While I've sent a patch to mark the shell/platform/embedder/tests and
fixtures directories as test exempt (since they are tests), by
convention, tests should end in _unittests.* for C++ tests, and _test.*
for Dart tests. This renames for consistency with other tests such as
embedder_a11y_unittests.cc.

Uncovered by https://github.com/flutter/engine/pull/38133

Related: https://github.com/flutter/cocoon/pull/2340
Issue: https://github.com/flutter/flutter/issues/116381
2022-12-08 11:28:52 -08:00
Chris Bracken
354ce9ffe0 [embedder] Expose metal surface from test context (flutter/engine#38133)
This is a minor cleanup that exposes the test metal surface to tests via
EmbedderTestContextMeta::GetTestMetalSurface for parity with the
GetTestMetalContext method which exposes the test metal context. This
eliminates the need for the more specific GetTextureInfo method since
the texture info is accessible via the test context.

This is a test refactoring with no semantic differences to the engine.

Issue: https://github.com/flutter/flutter/issues/116381
2022-12-08 10:23:29 -08:00
Loïc Sharma
8c119e59da [Windows] Add more cursor plugin tests (flutter/engine#38112)
* [Windows] Add more cursor plugin tests

* Tweak

* Add dependency
2022-12-08 00:42:23 +00:00
Chris Bracken
0fab2ea52d [embedder] Ensure destruction called on present (flutter/engine#38078)
This is a followup to flutter/engine#38038.

In that patch, a destruction callback for textures created via the
FlutterRendererConfig callbacks (as opposed to by the FlutterCompositor
callbacks) was added and passed through to the texture info attached to
the SurfaceFrame generated in
GPUSurfaceMetalSkia::AcquireFrameFromMTLTexture (called via
GPUSurfaceMetalSkia::GetMTLTexture, which invokes the
get_next_drawable_callback), however, in order for the destruction
callback to make it to the presented Skia texture, it needs to be passed
through to the present callback here:
960af0a350/shell/gpu/gpu_surface_metal_skia.mm (LL233)

which is invoked by the submit callback passed to Skia:
960af0a350/shell/gpu/gpu_surface_metal_skia.mm (LL239)

The present callback is implemented in EmbedderSurface::PresentTexture,
which invokes the present callback registered in
FlutterMetalRendererConfig.present_drawable_callback. This patch ensures
that the destruction callback is passed through to Skia's present
callback so destruction occurs in the right place.

Issue: https://github.com/flutter/flutter/issues/116381
2022-12-07 20:40:22 +00:00
Camille Simon
374a9b507f [iOS] Change locale format for spell check (flutter/engine#38080)
* Change format

* Add pointer

* Check length

* Add check
2022-12-07 20:09:16 +00:00
fzyzcjy
52668a7252 Reland fix wrong VSYNC event (flutter/engine#37865) 2022-12-07 13:46:06 -05:00
Erik
b7bf0a3155 Full implementation of text-input-test (flutter/engine#37986)
Implements text-input-test, validates that we're able to receive the correct platform messages through the flutter/keyevent channel
2022-12-07 12:17:51 -05:00
Nayuta403
c2290f0a8f Create FlutterActivity/FlutterFragment using light weight engine with FlutterEngineGroup (flutter/engine#36963) 2022-12-07 09:17:03 -08:00
yaakovschectman
a204b24bf5 Preliminary implementation of UIA for A11y on Windows (flutter/engine#37754)
* Initial

* Comment TODOs

* Shim windowsx

* Comment testing

* UIA works at most basic

* Get Native target in win delegate

* Rework events

* FlutterWindowsView unit tests for UIA

* Enable UIA unit tests

* Conditional UIA implementation

* Text selection MSAA event

* License

* PR

* Before change to AccessibilityBridgeWindows

* AccessibilityBridgeWindows in FlutterWindowsEngine

* Use AccessibilityBridgeWindows for AXFragmentRootDelegateWin

* Format

* Remove unneeded windowsx_shim imports

* PR Comment
2022-12-07 11:12:13 -05:00
Siva
aac2690ea4 Roll Dart SDK from 35a9facce191 to e517487c5679 (Dart 3.0) (flutter/engine#38105)
* Remove uses of --no-sound-null-safety in preparation for the Dart 3.0
roll.

* Update quiver package to latest.

* Run Fuchsia engine in null safe mode.

* Run Fuchsia engine in non null safe mode.

* Update Dart version to 3.0

* Address review comments.
2022-12-06 20:38:02 -08:00