4122 Commits

Author SHA1 Message Date
Emircan Uysaler
8a3da8a9d5 [flatland] Update bug numbers. (flutter/engine#37880) 2022-11-23 16:14:48 -08:00
Loïc Sharma
b9a416eb8d [Windows] Refactor PlatformHandler's tests (flutter/engine#37820)
* Start

* Add missing line

* Order

* Clean up includes

* Feedback

* Tweak
2022-11-22 23:41:42 +00:00
gaaclarke
633e238909 Made platform message responses threadsafe for macos. (flutter/engine#37607) 2022-11-22 22:22:04 +00:00
Emircan Uysaler
326622e3f1 Set nested clip nodes (flutter/engine#37850) 2022-11-22 17:07:36 -05:00
cfontas
02f77a716e fix pixel ratio (flutter/engine#37268) 2022-11-22 16:32:20 -05:00
Bruno Leroux
ed7aea9a05 [Linux] Synthesize modifier keys events on pointer events (flutter/engine#37491)
Co-authored-by: Bruno Leroux <bruno.leroux@gmail.com>
2022-11-21 20:34:41 +00:00
Chris Bracken
d094a6a0f5 [macOS] Add explicit weak/strong/copy annotations (flutter/engine#37768)
This adds explicit strong/copy Objective-C property annotations where
they were previously implied on NSObject properties and fixes on case
where it was previously improperly specified.
2022-11-21 10:53:18 -08:00
Zachary Anderson
2a9bcb43d1 [Impeller] Present Impeller contents in a transaction when there is a platform view (flutter/engine#37809) 2022-11-21 09:45:26 -08:00
Dan Field
6be3cc1572 [Impeller] Format shader sources. (flutter/engine#37770)
* Update format.dart to include glsl, format repo

* format more
2022-11-21 17:21:02 +00:00
Chris Bracken
a48a0bc388 [macOS] Use consistent filenames for tests (flutter/engine#37755)
Previously there were two conventions for test filenames in the macOS
embedder: some ended in Unittests.mm and others eneded in Test.mm. This
applies a consistent naming convention, which is also consistent with
the iOS and common Darwin tests. Stock C++ unittests should continue to
use the _unittests.cc convention.
2022-11-18 13:40:00 -08:00
gaaclarke
1ac0bf4389 Made FlutterTextField that outlive FlutterTextPlatformNode not crash (flutter/engine#37735)
* Made FlutterTextField that outlive FlutterTextPlatformNode not crash.

* added test
2022-11-18 13:08:01 -08:00
Jonah Williams
8a1834c4d8 [Impeller] register modern shaders on Vulkan too (flutter/engine#37757) 2022-11-18 20:57:32 +00:00
Jonah Williams
667b6c0816 [Impeller] use SSBOs for gradients where supported (metal/vulkan) (flutter/engine#37654)
* [Impeller] use uniform array for more efficient small gradients

* ++

* Make this work on Android

* ++

* ++

* ++

* compiler support and basic feature detection

* ++

* ++

* rename to ssbo_fill, move to context

* ++

* ++

* ++

* tests

* ++

* ++
2022-11-18 19:02:20 +00:00
Alexander Brusher
42fb1ed9d7 [fuchsia][a11y] Set explicit hit regions in flatland embedder (flutter/engine#37338) 2022-11-18 18:16:14 +00:00
Chris Yang
6eb43b7697 iOS PlatformView only sets a maskView when necessary (flutter/engine#37434)
* only clip when necessary

tests

fix tests

format

review

fix

add scenario tset

more scenario tests

add docs and comments

use offset.zero

* remove mistakenly checked-in code
2022-11-18 02:43:50 +00:00
Chris Bracken
861b1223ec [macOS] Cleanup unnecessary references to Metal (flutter/engine#37733)
Removes a few unncessary references to Metal in the macOS embedder. Now
that Metal is the only supported rendering implementation for the macOS
embedder, specifying a class as a Metal variant is redundant.

Issue: https://github.com/flutter/flutter/issues/108304
Issue: https://github.com/flutter/flutter/issues/114445
2022-11-17 17:00:35 -08:00
Chris Bracken
5a3f2e36e7 [macOS] Merge FlutterBackingStore implementations (flutter/engine#37730)
Now that OpenGL support has been removed from the macOS embedder, we
merge FlutterRenderBackingStore and its only implementing subclass,
FlutterMetalRenderBackingStore, and similarly
FlutterRenderBackingStoreProvider and its only implementing subclass
FlutterMetalRenderBackingStoreProvider.

Issue: https://github.com/flutter/flutter/issues/108304
Issue: https://github.com/flutter/flutter/issues/114445
2022-11-17 17:00:16 -08:00
Jason Simmons
0010be93cd Add semantics constants to the exported symbols list for the embedder library (flutter/engine#37526)
Fixes https://github.com/flutter/flutter/issues/114657
2022-11-17 21:50:04 +00:00
Jenn Magder
3085f214f9 Turn on clang tidy error for underscores in Google tests (flutter/engine#37700) 2022-11-17 21:13:11 +00:00
Tong Mu
d3c69d6108 [Multiwindow] Renderers receive view IDs as argument (flutter/engine#36593)
* Impl

* Format

* TODO comments

* Fix compile

* Better empty indication

* Change invalid ID to -1

* fix doc

* Change to default view

* Better doc

* Update doc of FlutterFrameInfo

* Change to ID

* Address comment

* Fix comment

* To assertion

* Fix compile
2022-11-17 20:11:53 +00:00
Chris Bracken
0b728cbf70 [macOS] Merge FlutterSurfaceManager and impls (flutter/engine#37701)
Previously, FlutterSurfaceManager was a protocol with two concrete
implementations: FlutterGLSurfaceManager and FlutterMetalSurfaceManager.
Most of the implementation was in a shared superclass,
FlutterIOSurfaceManager, which called into the OpenGL or Metal-specific
subclass when backend-specific operations (such as allocating textures)
was required. It did so via a delegate pattern, wherein the subclasses
both implemented the FlutterIOSurfaceManagerDelegate protocol that
exposed the backend-specific functionality.

Now that only the Metal implementation remains, the delegate code can be
inlined into the calling functions, and the class hierarchy can be
squashed into a single concrete implementation class,
FlutterSurfaceManager, similar to how it was originally implemented in
https://github.com/flutter/engine/pull/21525 before we had two backends.

Issue: https://github.com/flutter/flutter/issues/108304
Issue: https://github.com/flutter/flutter/issues/114445
2022-11-17 11:46:27 -08:00
Chris Bracken
468e714771 [macOS] Consolidate external texture classes (flutter/engine#37703)
Previously, external textures were modelled in the macOS embedder by a
top-level FlutterMacOSExternalTexture protocol with a single textureID
getter, and two implementations: FlutterExternalTextureGL and
FlutterExternalTextureMetal.

With the removal of OpenGL support from the macOS embedder, the only
remaining external texture implementation is Metal. This patch squashes
this set of types into a single FlutterExternalTexture class.

Issue: https://github.com/flutter/flutter/issues/108304
Issue: https://github.com/flutter/flutter/issues/114445
2022-11-17 10:44:01 -08:00
Chris Bracken
aee7b74c33 [macOS] Merge FlutterRenderer and implementation (flutter/engine#37696) 2022-11-17 09:28:40 -08:00
Kaushik Iska
5d5a04b2b3 Fix potential null-point references (flutter/engine#37678) 2022-11-16 22:08:04 +00:00
yaakovschectman
adc79c3cf3 Add back tooltip to Embedder (flutter/engine#37676)
* Add back tooltip to Embedder

* Test inclusion of tooltip data

* Change to constexpr

* Lint
2022-11-16 17:02:09 -05:00
stuartmorgan
7bbe571f14 Fix resize crash in Android virtual display (flutter/engine#37329)
In the Virtual Display codepath for Android platform views, resize
completes asynchronously. Currently it is attempting to access the
Context in the completion handler, but there is no guarantee that it
is still present at that point, leading to possible null pointer
crashes.

This adds a check for the current state of the Context, and uses a
fallback if it's not available.

Fixes https://github.com/flutter/flutter/issues/114095
2022-11-16 19:06:30 +00:00
Josh Gargus
a1255b6105 [fuchsia] Fix shader warmup. (flutter/engine#37662)
Before, ~VulkanSurface() invokes a potentially empty std::function.
Now, checks if it is empty before invoking it.
2022-11-16 13:35:13 -05:00
Chris Bracken
c26cb23881 [macOS] Merge FlutterMetalCompositor, superclass (flutter/engine#37648)
Now that OpenGL support in Flutter on macOS has been removed, the only
FlutterCompositor implementation is the Metal-based compositor. This
patch merges it into the FlutterCompositor base class since there's no
longer any reason to keep the interface separate from its implementation.

This patch will be followed by similar patches for the renderer, surface
manager, and external textures.

Issue: https://github.com/flutter/flutter/issues/108304
Issue: https://github.com/flutter/flutter/issues/114445
2022-11-16 09:56:22 -08:00
Chris Johnson
b8f5767b7f Remove usage of deprecated Fuchsia event source (flutter/engine#37641)
This capability is being removed by the Fuchsia platform (https://fuchsia-review.git.corp.google.com/c/fuchsia/+/758606), but is currently blocked on this usage.

This change simply removes the capability from this tests, where it doesn't seem to be used at all.
2022-11-15 15:53:26 -08:00
Alex Wallen
a97421b8bd Place native callback registration before running engine (flutter/engine#37600)
Co-authored-by: a-wallen <stephenwallen@google.com>
2022-11-15 14:46:58 +00:00
Tong Mu
4c499bb24a [Multiwindow, macOS] FlutterCompositor::Present receives view_id (flutter/engine#37391)
* Impl and test

* Change to default view
2022-11-14 16:03:13 -08:00
Callum Moffat
0ea43fbe3e Fix unexpected masked action (flutter/engine#37584) 2022-11-14 19:34:42 +00:00
Dan Field
8dc723b758 Revert "Fix wrong VSYNC event (#36775)" (flutter/engine#37589)
This reverts commit 491f827ea84dae3c63e50493a3a25e378c7cf441.
2022-11-14 19:09:02 +00:00
Loïc Sharma
f2400b138c [macOS] Move to new update semantics embedder API (flutter/engine#37404) 2022-11-14 18:56:46 +00:00
Callum Moffat
e0108b3d66 Fix inertia cancel event on macOS Ventura (flutter/engine#37067)
* Fix inertia cancel event on macOS Ventura

* Increase allowed time delay on event to 50 ms

* Address feedback
2022-11-13 03:11:27 +00:00
Brandon DeRosier
0a11bb12d7 Add more raster traces (flutter/engine#37510) 2022-11-11 17:05:25 -08:00
Chris Bracken
4a517513ff [macOS] Eliminate macOS 10.14 availability check (flutter/engine#37490)
Now that the macOS embedders have all been updated to use a minimum
macOS SDK of 10.14, eliminate the remaining @available checks dependent
on that version.

Issue: https://github.com/flutter/flutter/issues/114445
2022-11-10 21:11:29 +00:00
Naud Ghebre
318ac378b8 mouse-input-view nit and add mouse-input-test to integration test script (flutter/engine#37441)
* Use fuchsia_component

* [mouse-input] mouse-input-view doc nits and add mouse-input-test to the run_integration_test.sh script

Co-authored-by: Erik <erkln@google.com>
2022-11-10 21:10:06 +00:00
fzyzcjy
3ac82e66e3 Eliminate duplicated code when dealing with pointer data (flutter/engine#36822)
* add methods

* add empty test

* add unit test

* Update licenses_flutter

* add const

* size -> get length

* add boundary checks

* add tests

* remove death test since it says "Death tests use fork(), which is unsafe particularly in a threaded context."
2022-11-10 21:05:20 +00:00
杨加康
9084e780a0 Update FlutterView.java (flutter/engine#37312) 2022-11-10 19:52:29 +00:00
gaaclarke
85a6c86d8f Turned on performance-move-const-arg everywhere. (flutter/engine#37482)
Turned on performance-move-const-arg everywhere.
2022-11-10 09:12:33 -08:00
Jason Simmons
cc36b52002 Fix a race in the EmbedderA11yTest.A11yTreeIsConsistent tests (flutter/engine#37488) 2022-11-10 06:40:11 +00:00
Kaushik Iska
83c4708ccf Include AndroidSurfaceVulkanImpeller behind a flag (flutter/engine#37486)
This is to enable building in google3.

See also: b/258506856
2022-11-10 00:54:20 +00:00
gaaclarke
643e801f2c Implemented threadsafe platform channel replies on windows (flutter/engine#36909)
* Implemented threadsafe platform channel replies on windows

* added unit test

* added docstrings

* implemented glfw

* added comments

* made glfw messenger unable to be copied

* stuart feedback 1

* stuart feedback 2: replaced the shared_ptr

* stuart feedback 3

* stuart feedback: remove error log

* Moved FlutterDesktopMessenger to its own file.

* updated licenses

* stuart feedback
2022-11-09 22:59:00 +00:00
gaaclarke
af036b8857 Turned on performance-unnecessary-value-param everywhere. (flutter/engine#37447)
* Turned on performance-unnecessary-value-param everywhere.

* linux host additions

* ios patch

* reverted bad fix

* revert bad fix

* another ios patch

* removed lint fix printer
2022-11-09 20:55:13 +00:00
Naud Ghebre
ffbedf21c4 [sdk_roll_failure] add facet to allowlist test_manager and other packages. (flutter/engine#37479) 2022-11-09 20:00:52 +00:00
Chris Bracken
57d02219ab [macOS] Remove OpenGL rendering backend (flutter/engine#37448)
In flutter/buildroot#648 (rolled to the engine in flutter/engine#37380)
the minimum macOS SDK was bumped from 10.13 to 10.14. As of macOS 10.14,
Metal is available for all users. This eliminates the macOS OpenGL
rendering support code.

Note that this only removes the GL-specific code in the embedder. A
followup patch will land refactorings to clean up the remaining code,
for example, cases where a parent interface exists only because we had
both a GL and a Metal implementation. This is being does in two patches
in order to keep review clear and simple and to simplify rebases of any
outstanding patches that also touches this code.

Issue: https://github.com/flutter/flutter/issues/114445
2022-11-09 15:39:48 +01:00
gaaclarke
8fed30cc77 Revert "Sdk roll failure - add facet to allowlist test_manager and other packages. (#37395)" (flutter/engine#37449)
This reverts commit 1b143c26e9e748d682326bbf35172dfaa1b24e21.
2022-11-08 14:44:17 -08:00
Naud Ghebre
1b143c26e9 Sdk roll failure - add facet to allowlist test_manager and other packages. (flutter/engine#37395)
* Use fuchsia_component

* [fuchsia-sdk-roll] Hermetic packaging is flipped on by default. Add
test_manager package to the tests facets.

Co-authored-by: Erik <erkln@google.com>
2022-11-08 21:58:02 +00:00
Erik
fd9e9ccd63 [fuchsia] embedding-flutter test (flutter/engine#37052)
* Add embedding-flutter test

* Lint CC files

* GN formatting

* Remove changes to embedder

* Minor refactor

* Remove unused dependencies

* Lint CC files

* Remove comments

* Rename pubspec
2022-11-07 22:04:58 +00:00