3891 Commits

Author SHA1 Message Date
Chris Bracken
105625bb77 [Windows] Shut down VM on shutdown of last engine (flutter/engine#35251)
All Flutter engines in the same process share a common Dart VM, which is
launched with the start of the first engine in the process and should be
terminated when the last engine in the process has been deallocated.

Formerly, it was not possible to cleanly shut down and restart the VM in
a process, but this was resolved in the Dart SDK and a flag exposed in
flutter/engine#10652. Since some embedders take advantage of the fact
that the VM remains running after engine shutdown, this flag is not
enabled by default, however it should be enabled for the Windows
embedder, which we control.

No tests added since this is not testable via any API to which the
Windows embedder has access. The behaviour of this flag is tested in the
embedder API tests in `EmbedderTest.VMShutsDownWhenNoEnginesInProcess`
in shell/platform/embedder/tests/embedder_unittests.cc.

Issue: https://github.com/flutter/flutter/issues/109191
2022-08-09 17:44:40 +01:00
Chris Bracken
f935a6d1d9 [Windows] Fix dllimport issue in unit tests (flutter/engine#35246)
In flutter/engine#35106, I landed a parameter type fix for the
declaration of FlutterDesktopEngineGetTextureRegistrar in our public
Windows C API. I also added a unit test that called this function.

That function (and all others) in our public Windows API is marked
FLUTTER_EXPORT, which resolves to __declspec(dllexport) or
__declspec(dllimport) depending on whether FLUTTER_DESKTOP_LIBRARY is
defined. It can be defined by adding the following build config:
//flutter/shell/platform/common:desktop_library_implementation

If the function is marked as an import, we get linker warnings that
we're importing a function that's defined in the same executable image.
This patch resolves this by marking the functions as export.

An alternative fix would be to support a third macro resolution that
resolves to nothing in the presence of some definition like
FLUTTER_NO_EXPORT; however, since flutter_export.h is a public header,
I'd prefer not to complicate it further, and this is a unit test that
can't be linked against either way.

Issue: https://github.com/flutter/flutter/issues/109184
Original issue: https://github.com/flutter/flutter/issues/86617

See: https://github.com/flutter/engine/blob/main/shell/platform/common/public/flutter_export.h
See: 61c0051a63/shell/platform/common/BUILD.gn (L8-L10)

No new tests since this simply fixes a link warning message in unit tests.
2022-08-09 01:04:40 +01:00
Loïc Sharma
a015114478 [Embedder API] Add next frame callback (flutter/engine#35244) 2022-08-08 23:19:04 +00:00
Zachary Anderson
ab33453a89 Roll mac clang, ignore spurious lints (flutter/engine#35196) 2022-08-05 15:50:08 -07:00
Dwayne Slater
86d2aa6f59 Fix handling of external texture transforms on Android (flutter/engine#24888) 2022-08-05 00:12:04 +00:00
Jim Graham
1413379354 Embedders use DisplayListBuilder for compositing (flutter/engine#35170) 2022-08-04 22:23:04 +00:00
J-P Nurmi
bacc6eb5cc [Linux] remove AtkText stub implementation (flutter/engine#34839)
When Orca has "Speak object under mouse" enabled, it tries to get the
text range extents for any object that implements the AtkText interface
and gets a bit confused by our AtkText stub implementation that merely
returns null for `get_text`.

Removing the stub implementation helps to avoid the issue that Orca
would try to call `atk_text_get_range_extents()` with `start_offset=0`
and `end_offset=0`:

> Atk-CRITICAL **: atk_text_get_range_extents: assertion 'start_offset >= 0 && start_offset < end_offset' failed
2022-08-04 11:33:55 -07:00
Nayuta403
e46b6ee859 Make FlutterEngineGroup support more params (#107394) (flutter/engine#34663) 2022-08-04 03:43:04 +00:00
Chris Bracken
3e485ec15e [Windows] Add missing testing namespace (flutter/engine#35131)
flutter_windows_unittests.cc had its tests inside the flutter namespace
rather than the flutter:testing namespace. This adds the missing
namespace and makes one namespace-related cleanup in one of the key
event unit tests as well.

This is a post-landing cleanup for PR:
https://github.com/flutter/engine/pull/35106

Issue: https://github.com/flutter/flutter/issues/86617
2022-08-03 20:26:44 +01:00
Chris Bracken
66e6cd880d [Windows] Fix incorrect public C API argument type (flutter/engine#35106)
FlutterDesktopEngineGetTextureRegistrar is used to get the texture
registrar associated with an engine object and therefore should take a
FlutterDesktopEngineRef parameter.

This bug was initially identified and fixed by @knopp in:
https://github.com/flutter/engine/pull/27522

This patch replaces that one and adds the simplest possible unit test to
get it landed.

This also adds an initial unit test for the public Windows C API used to
implement the C++ client wrapper. In order to fully test this API, we'll
want to support test fixtures similar to what we do in the embedder API
tests. See: https://github.com/flutter/flutter/issues/87299

Fixes: https://github.com/flutter/flutter/issues/86617
2022-08-03 01:09:48 +01:00
Jim Graham
74e390f3d4 fix typos buider -> builder (flutter/engine#35104) 2022-08-02 22:58:03 +00:00
Camille Simon
f428a1aa1f Delete splash screen guidance with old APIs (flutter/engine#35014) 2022-08-02 21:51:04 +00:00
Xilai Zhang
6effb999a6 [gn] entitlement config for macos framework zip (flutter/engine#34987) 2022-08-02 15:51:08 +00:00
Jia Hao
8de3c46804 Javadoc for background platform chnanels (flutter/engine#34774) 2022-08-01 22:43:04 +00:00
Chinmay Garde
6a65c72d43 Don't insist on modules when attempting to include the Flutter umbrella header. (flutter/engine#35060) 2022-08-01 22:09:04 +00:00
Chinmay Garde
2bd509563a [Impeller] Remove redundant GN flags. (flutter/engine#35062) 2022-08-01 21:54:03 +00:00
Tong Mu
1f64120a78 [Window, Keyboard] Fix repeat events of modifier keys (flutter/engine#35046) 2022-08-01 21:41:03 +00:00
Tong Mu
b5c58a0a9b [macOS, Keyboard] Fix Khmer layout crashing (flutter/engine#35044)
Fix test

Impl
2022-08-01 13:58:29 -07:00
Chris Bracken
f33f5c486e [Windows] Merge PlatformHandlerWin32 to superclass (flutter/engine#35056)
With the removal of the UWP embedder, we can merge Win32-specific
implementation classes with their abstract superclasses where those
superclasses existed only to support both UWP and Win32.

No new tests since this is purely a restructuring of existing code
within the Win32 embedder, with no expected change in behaviour.
Covered by existing tests in task_runner_unittests.cc.

Issue: https://github.com/flutter/flutter/issues/108386
2022-08-01 21:12:36 +01:00
Chris Bracken
374899e94b [Windows] Merge TaskRunnerWin32 into TaskRunner (flutter/engine#35029)
With the removal of the UWP embedder, we can merge Win32-specific
implementation classes with their abstract superclasses where those
superclasses existed only to support both UWP and Win32.

No new tests since this is purely a restructuring of existing code
within the Win32 embedder, with no expected change in behaviour.

Issue: https://github.com/flutter/flutter/issues/108386
2022-08-01 20:09:01 +01:00
Jaeheon Yi
392af31793 [fuchsia] Convert Gfx PlatformView to use modern TouchSource API (flutter/engine#35018)
Original PR: #32877

Revert of #32877: commit 6a1def3db7da00641f9fabab3d09d7326a7bdfd6 (#33471)

*This* patch: Revert of #33471

fxbug.dev/85125
2022-08-01 12:06:23 -07:00
Chris Bracken
75fbd93951 [Windows] Merge SettingsPluginWin32 and superclass (flutter/engine#35019)
This merges SettingsPluginWin32 into SettingsPlugin.

With the removal of the UWP embedder, we can merge Win32-specific
implementation classes with their abstract superclasses where those
superclasses existed only to support both UWP and Win32.

No new tests since this is purely a restructuring of existing code
within the Win32 embedder, with no expected change in behaviour.

Issue: https://github.com/flutter/flutter/issues/108386
2022-07-30 19:07:20 +01:00
Chris Bracken
4d4da408e0 Eliminate Win32 suffixes in KeyboardManager (flutter/engine#35008)
This renames KeyboardManagerWin32 to KeyboardManager and updates all
usage sites and tests.

This is a followup to 89bbfcc, which applied most of the straightforward
renamings of FooWin32 to Foo (or where a superclass Foo exists,
FooWindows) to the Windows embedding. In that patch I missed
KeyboardManagerWin32, as well as two straightforward file renames:
* keyboard_win32_common.{h,cc} -> keyboard_utils.{h,cc}
* system_utils_win32.cc -> system_utils.cc

No new tests since this is a rename with no semantic change intended.

Issue: https://github.com/flutter/flutter/issues/108386
2022-07-29 13:51:36 -07:00
Chris Bracken
8372fc6a32 Eliminate redundant Win32 suffix in Windows embedder (flutter/engine#34983)
Now that we've removed the UWP embedder, eliminate remaining Win32
suffixes on identifiers and _win32 suffixes from filenames.

This renames all files and types ending in _win32/Win32 that don't
require further rework/merging/simplification. All remaining files/types
ending in _win32/Win32 are less straightforward and will be submitted
class by class.

Issue: https://github.com/flutter/flutter/issues/108386
2022-07-29 10:16:55 -07:00
Matej Knopp
5c9df63ade [macOS] Remove isComposing workaround (flutter/engine#33838) 2022-07-29 09:21:12 +02:00
xster
3ddada0be5 We should delete this old embedding class, but fixing an urgent issue b/240230736 to unblock Android rolls inside Google (flutter/engine#34980) 2022-07-28 21:26:15 -07:00
Wu Zhong
42f499b4f0 [iOS] Fixes SplashScreenView crash when remove from view hierarchy (flutter/engine#34496) 2022-07-29 02:11:04 +00:00
gaaclarke
645ac3c239 optimized IncomingMessageDispatcher::HandleMessage a bit (flutter/engine#34954)
* optimized IncomingMessageDispatcher::HandleMessage a bit.

* removed std::string ref
2022-07-28 14:12:57 -07:00
Filip Filmar
e4a2f48892 [fuchsia] Support multi-line text editing (flutter/engine#34410)
Multi-line text editing and actions other than DONE were
never implemented in Flutter on Fuchsia.  This change
implements the feature, by plumbing the desired action
through to Fuchsia proper, and back, as Fuchsia's text
editing API expects.

Tested: the new behavior was verified by Fuchsia-side
integration tests.

Issue: https://github.com/flutter/flutter/issues/106905
2022-07-28 13:33:11 -07:00
Wu Zhong
2452603d31 [iOS API breaking change] Make splashScreenView of FlutterViewController nullable (flutter/engine#34743) 2022-07-27 20:13:03 +00:00
Chris Bracken
97e03b7033 [Windows] Rename WindowWin32 to Window (flutter/engine#34920)
With the removal of the UWP embedder, there's no longer any need to call
out that a given class is Win32-specific, since the Win32 embedder is
now our only embedder.

Issue: https://github.com/flutter/flutter/issues/108386
2022-07-27 18:51:03 +01:00
Alexander Biggs
57ffd65615 [fuchsia] Add comment explaining config-data. (flutter/engine#34940) 2022-07-27 13:37:45 -04:00
Naud Ghebre
5bacb7c662 Add config-data storage for the dart runners. (flutter/engine#34939) 2022-07-27 13:10:48 -04:00
WenJingRui
f6335c330f [iOS] Add iOS live text input engine side support (flutter/engine#34751) 2022-07-27 07:30:05 +00:00
Jenn Magder
469fb0ac1f Remove availability and fallbacks for iOS 11 and macOS 10.13 (flutter/engine#34919) 2022-07-27 03:34:03 +00:00
Jia Hao
b6b0494834 Fix incorrect size for message.Release() (flutter/engine#34906) 2022-07-27 02:34:03 +00:00
Zachary Anderson
352bf98b3f Remove the OpenGL backend on iOS (flutter/engine#34913) 2022-07-26 12:13:41 -07:00
Yang Chao
29320bfd1e Fix an issue that deleting an emoji may crash the app (flutter/engine#34508) 2022-07-25 16:59:03 +00:00
Shivesh Ganju
6e77f13db8 [fuchsia][scenic] Accept Uint64 values in timestamp for pointerinjector. (flutter/engine#34888) 2022-07-25 16:38:04 +00:00
Zachary Anderson
8cd062be3c Remove FragmentProgram.compile() (flutter/engine#34855) 2022-07-22 18:30:54 -07:00
Tong Mu
56194cd690 [Android] Synchronize incorrect metaState using post-synchronization (flutter/engine#34827) 2022-07-21 18:16:23 -07:00
Callum Moffat
c2b7e18d55 Scroll inertia cancel for macOS (flutter/engine#34451) 2022-07-21 13:05:02 -07:00
Maurice Parrish
12074f2332 Use PorterDuff blend mode when below Android 29 (flutter/engine#34800) 2022-07-21 17:11:04 +00:00
Wu Zhong
309a65a183 [iOS] Remove deprecated metal texture cache and commandqueue (flutter/engine#34688) 2022-07-19 10:07:47 +08:00
Kaushik Iska
c4498028d7 Fix data race in VerifyB143464703WithSoftwareBackend (flutter/engine#34722) 2022-07-18 20:54:04 +00:00
Hannes Winkler
6c940139ae Support configurable pixel formats for the embedder API sofware rendering backend (flutter/engine#26995)
- add sw rendering pixel format support
- add new backing store type that contains struct_size and pixel format
- add new public pixel format enum with the common pixel formats supported by skia
2022-07-18 08:22:48 -04:00
Qixing Cao
d58858e242 Windows: Reimplement ForceRedraw() using the ScheduleFrame embedder API (flutter/engine#34656) 2022-07-18 13:37:55 +02:00
巢鹏
4b0da8fac2 [Fuchsia] Support scroll_*_physical_pixel fields (flutter/engine#34325)
* [WIP][Fuchsia] Support scroll_physical_pixel fields

* add test

* update

* update

* update

* update

* update

* update

* update

* update

* use scroll_delta instead of pan

* use kMouse

* use kMouse

* Update shell/platform/fuchsia/flutter/pointer_delegate.cc

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>

* Update shell/platform/fuchsia/flutter/pointer_delegate.cc

Co-authored-by: Callum Moffat <smartercallum@gmail.com>

* format

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
Co-authored-by: Callum Moffat <smartercallum@gmail.com>
2022-07-15 14:51:59 -07:00
Shivesh Ganju
271b59d7a6 [fuchsia][scenic] Reland Move pointer injector to embedder. (flutter/engine#34692)
This PR moves the pointer injector library from fuchsia views library
present in fuchsia.git to the flutter embedder.

Test: ffx test run "fuchsia-pkg://fuchsia.com/flutter_runner_tests#meta/flutter_runner_tests.cm"
2022-07-15 17:27:00 -04:00
Qixing Cao
3dfca9f974 [Windows] Fix GDI resource leaks in the software fallback path (flutter/engine#34574)
Updates `FlutterWindowWin32::OnBitmapSurfaceUpdated` to release the device context using `ReleaseDC`.

Fixes: https://github.com/flutter/flutter/issues/107368
2022-07-15 13:40:40 -07:00