3988 Commits

Author SHA1 Message Date
Marcel Kirchhoff
4be91c61de Support opacity layers for platform-views using hybrid-composition (flutter/engine#30264) 2022-01-20 15:10:09 -08:00
Kaushik Iska
66bbb434e5 [macos] Enable macOS platform views only for Metal (flutter/engine#30853) 2022-01-20 15:01:41 -08:00
Rulong Chen(陈汝龙)
f65004e7c5 Check weak pointer to avoid potential use-after-free crash (flutter/engine#30396) 2022-01-20 14:00:11 -08:00
fzyzcjy
37cc235a2b Fixing bug when ListenableEditingState is provided initialState with a valid composing range, android.view.inputmethod.BaseInputConnection.setComposingRegion(int, int) has NPE (flutter/engine#30916) 2022-01-20 13:10:12 -08:00
ColdPaleLight
5efc2ba8d0 Change visibility of FlutterView when onStop/onStart (flutter/engine#30897) 2022-01-20 13:05:15 -08:00
George Wright
c225edfb0a Remove extraneous release of the MTLTexture in EmbedderTestBackingstoreProducer (flutter/engine#30955) 2022-01-20 12:35:52 -08:00
Alexander Aprelev
b8a5513fbb Prefix dart:ffi import to prevent name conflicts. (flutter/engine#30950)
https://dart.googlesource.com/sdk/+/85a87ca7ae6c9f028a0cbf6d8de3563b9a19b8e7 introduced Size to dart:ffi which conflicts with the one from dart:ui. See https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8824501487884216129/+/u/build_host_debug/stdout .

This will unblock dart->engine roll with that change.
2022-01-20 10:19:27 -08:00
Matej Knopp
549e82fec6 Enable partial repaint for Android/OpenGL (flutter/engine#29591) 2022-01-20 18:22:18 +01:00
Jia Hao
a6d7e507e8 Minor doc improvements to BinaryMessenger (flutter/engine#30923)
Co-authored-by: gaaclarke <30870216+gaaclarke@users.noreply.github.com>
2022-01-20 08:58:38 -08:00
Rulong Chen(陈汝龙)
8fda497245 Remove the unused FlutterImageView from FlutterView to avoid leaks (flutter/engine#30873) 2022-01-19 17:30:02 -08:00
ColdPaleLight
b64598bef6 Refactor type of deadline in the method NotifyIdle to fml::TimePoint (flutter/engine#30737) 2022-01-19 17:25:09 -08:00
Tong Mu
0fecfd79eb [Win32, Keyboard] Correctly process modifier events in IME mode (flutter/engine#30919) 2022-01-19 16:05:08 -08:00
Rulong Chen(陈汝龙)
205398943b Export |ExclusiveAppComponent<Activity>| from FlutterActivity/FlutterFragment class (flutter/engine#30864) 2022-01-19 16:00:11 -08:00
moko256
9bafc06dc5 cleanup #28013 (flutter/engine#29500) 2022-01-18 16:13:19 -08:00
Emircan Uysaler
7ebf6b3106 [fuchsia] Set blending mode on flatland images (flutter/engine#30890) 2022-01-18 10:50:11 -08:00
gaaclarke
7723377a79 disabled ios 13.4+ tests on earlier devices (flutter/engine#30887) 2022-01-14 15:27:43 -08:00
gaaclarke
7fde4fef98 Started updating the native switch if it isn't enabled. (flutter/engine#30882) 2022-01-14 12:25:10 -08:00
Mouad Debbar
f111c9f844 [web] Move ui files to lib/ (flutter/engine#30051) 2022-01-14 11:20:10 -08:00
Emmanuel Garcia
470d1581e9 Revert "Remove usages of deprecated setSystemUiVisibility()" (flutter/engine#30880) 2022-01-14 11:05:09 -08:00
Tong Mu
45f496761f [Windows, Keyboard] Lift key event redispatching to KeyboardManagerWin32 (flutter/engine#30702) 2022-01-13 19:08:21 -08:00
Jason Simmons
e9dffcbe05 Ensure that PlatformViewIOS does not call into Shell semantics APIs during destruction (flutter/engine#30835) 2022-01-13 18:40:02 -08:00
Camille Simon
6e22c1fb87 Remove usages of deprecated setSystemUiVisibility() (flutter/engine#29493) 2022-01-13 12:40:10 -08:00
Alexander Biggs
116fe9190a [fuchsia] Switch from core-jit to core snapshots. (flutter/engine#30744) 2022-01-13 11:05:33 -08:00
ColdPaleLight
03e2fe4a87 Only creates 'onscreen_surface_' when it's not available in 'AndroidSurfaceGL::CreateSnapshotSurface' (flutter/engine#30590)
* Only creates 'onscreen_surface_' when it's not available in 'AndroidSurfaceGL::CreatePbufferSurface'

* Rename the function and add some unit tests

* Update android_surface_gl.h

Co-authored-by: Dan Field <dfield@gmail.com>
2022-01-13 10:17:01 -08:00
ColdPaleLight
af5e4cf7f4 Add a trace to GpuSurfaceMetal around canvas flushing (flutter/engine#30667) 2022-01-13 09:31:42 -08:00
Darren Chan
84aebe8bb6 Roll Fuchsia Linux SDK from DS-3oCidC... to 35I2K_Bou... (flutter/engine#30829)
* Roll Fuchsia Linux SDK from DS-3oCidC... to 35I2K_Bou...

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine
Please CC kaushikiska@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

* Use zircon/rights.h instead of zx/cpp/fidl.h.

This helps us avoid namespace clashes, unblocking the SDK roll.

Co-authored-by: skia-flutter-autoroll <skia-flutter-autoroll@skia.org>
2022-01-12 19:53:59 -05:00
ColdPaleLight
ca35fae4bd Remove obsolete 'PlatformView::size_' member variable (flutter/engine#30812) 2022-01-12 16:35:09 -08:00
Tong Mu
400ee783e3 [Win32, Keyboard] Migrate FlutterWindowWin32 keyboard tests to keyboard_win32_unittests (flutter/engine#30808)
* Until AltLeft

* Alt right

* Meta keys

* Remove tests

* Format
2022-01-12 15:10:23 -08:00
ColdPaleLight
fdcc6befe9 Use the correct Settings in Engine::Spawn (flutter/engine#30741)
* Use the correct Settings in Engine::Spawn

* Add unit tests
2022-01-12 10:31:28 -08:00
Chris Bracken
9bca9234dc Win32: Fix Korean text input (flutter/engine#30805)
Fixes an issue with Korean IMEs wherein a text input state update may be
sent to the framework that misleads the framework into assuming that IME
composing has ended.

When inputting Korean text, characters are built up keystroke by
keystroke until the point that either:
* the user presses space/enter to terminate composing and commit the
  character, or;
* the user presses a key such that the character currently being
  composed cannot be modified further, and the IME determines that the
  user has begun composing the next character.

The following is an example sequence of events for the latter case:

1. User presses ㅂ. GCS_COMPSTR event received with ㅂ. Embedder sends
   state update to framework.
2. User presses ㅏ. GCS_COMPSTR event received with 바. Embedder sends
   state update to framework.
3. User presses ㄴ. GCS_COMPSTR event received with 반. Embedder sends
   state update to framework.
4. User presses ㅏ. At this point, the current character being composed
   (반) cannot be modified in a meaningful way, and the IME determines
   that the user is typing 바 followed by 나. GCS_RESULTSTR event
   received with 바, immediately followed by GCS_COMPSTR event with 나.

In step 4, we previously sent two events to the framework, one
immediately after the other:
* GCS_RESULTSTR triggers the text input model to commit the current
  composing region to the string under edit. This causes the composing
  region to collapse to an empty range.
* GCS_COMPSTR triggers the text input model to insert the new composing
  character and set the composing region to that character.

Conceptually, this is an atomic operation. The fourth keystroke causes
the 반 character to be broken into two (바 and ㄴ) and the latter to be
modified to 나. From the user's point of view, as well as from the IME's
point of view, the user has NOT stopped composing, and the composing
region has simply moved on to the next character.

Flutter has no concept of whether the user is composing or not other
that whether a non-empty composing region exists. As such, sending a
state update after the GCS_RESULTSTR event misleads the framework into
believing that composing has ended. This triggers a serious bug:

Text fields with input formatters applied do not perform input
formatting updates while composing is active; instead they wait until
composing has ended to apply any formatting. The previous behaviour
would thus trigger input formatters to be applied each time the user
input caused a new character to be input. This has the add-on negative
effect that once formatting has been applied, it sends an update back to
the embedder so that the native OS text input state can be updated.
However, since the GCS_RESULTSTR event is _immediately_ followed by a
GCS_COMPSTR, the state has changed in the meantime, and the embedder is
left processing an update (the intermediate state sent after the
GCS_RESULTSTR) which is now out of date (i.e. missing the new state from
the GCS_COMPSTR event).

Since GCS_RESULTR events are always immediately followed by a subsequent
GCS_COMPSTR (in the case where composing continues) or a
WM_IME_ENDCOMPOSITION (in the case where composing is finished), and
because the event handlers for both of those send updated state to the
framework, this change eliminates sending the (intermediate) state in
response to GCS_COMPSTR events.

Issue: https://github.com/flutter/flutter/issues/96209 (full fix)
Issue: https://github.com/flutter/flutter/issues/88645 (partial fix)
2022-01-12 10:00:58 -08:00
gaaclarke
1724b4f192 Reland: iOS Background Platform Channels (#29665) (flutter/engine#30697)
* iOS Background Platform Channels (#29665)

* added test that passes before this change, and fails after it

* started supporting backwards compatible usage of setting handlers
2022-01-12 09:57:29 -08:00
Matej Knopp
59414a9cd2 Only provide frame damage to rasterizer if partial repaint is enabled (flutter/engine#30704) 2022-01-12 15:19:01 +01:00
Chris Yang
a50ebf3955 Variable Refresh Rate Display (flutter/engine#30223) 2022-01-11 10:55:10 -08:00
ColdPaleLight
06addee8ac Remove unused setPersistentIsolateData function (flutter/engine#30795) 2022-01-11 10:25:10 -08:00
ColdPaleLight
975d330db0 Implemented library uri support for FlutterFragmentActivities (flutter/engine#30790) 2022-01-11 09:33:17 -08:00
gaaclarke
379651ad4f Implemented library uri support for FlutterFragments and FlutterActivities (flutter/engine#30726)
* Implemented library uri support for FlutterFragments and FlutterActivities.

* added docstrings

* emmanuel feedback
2022-01-10 14:21:21 -08:00
eggfly
ea4b23242b [android] Remove the FlutterView casting, add a @NonNull and fix code style (flutter/engine#30734) 2022-01-10 12:50:10 -08:00
Emmanuel Garcia
d81c472076 Remove glitch when displaying platform views (flutter/engine#30724) 2022-01-10 11:25:06 -08:00
Chase Latta
0f99fadcf2 Allow additional expose_dirs in flutter_runner (flutter/engine#30749)
Users can add an expose_dirs entry to the program field in a
component's cml file to optionally expose extra directories
from their out/ directory.

BUG: fxbug.dev/89690
2022-01-10 10:44:21 -08:00
LongCatIsLooong
db6f967f47 [iOS Text Input] Always forward press events to the view controller (flutter/engine#30580) 2022-01-07 13:15:03 -08:00
ColdPaleLight
99ae1b775f Remove AOT specific gates for isolate groups (flutter/engine#30743) 2022-01-07 10:05:10 -08:00
Alexander Biggs
a42101ccc6 [fuchsia] Add logging for when fdio_get_vmo fails. (flutter/engine#30742) 2022-01-07 10:00:10 -08:00
utzcoz
3e3ec2f1c7 Bump Robolectric to 4.7.3 (flutter/engine#30437) 2022-01-06 18:25:09 -08:00
Chase Latta
0d51ef6307 Fix aot builds in the dart_runner for fuchsia (flutter/engine#30722)
The dart_runner was crashing in aot builds. These changes allow the
dart_runner to run aot builds in fuchsia.
2022-01-06 16:45:53 -08:00
Tong Mu
adb05f30f7 Migrate keyboard_key_handler_unittests to keyboard_win32_unittests (flutter/engine#30615)
* Refactor to MockKeyResponseController (ATP)

* Implement LateResponding and move GetEngine in (ATP)

* RespondValue

* DisorderlyRepliedEvents

* SlowFrameworkResponse

* NeverRedispatchShiftRightKeyDown

* Migrate AltGr event. (ATP)

* Correctly handle sys messages.

* Remove SendInputInfo

* Comment and format
2022-01-05 17:19:14 -08:00
Alexander Biggs
3b0bf783c6 [fuchsia] Fix failing SDK roll. (flutter/engine#30675) 2022-01-05 14:32:08 -08:00
Kaushik Iska
41819f25e7 Revert "Only provide frame damage to rasterizer if partial repaint is enabled (#30461)" (flutter/engine#30696) 2022-01-05 14:14:31 -08:00
freiling
bec2463034 [fuchsia][shader warmup] fix for fxbug.dev/90387 (flutter/engine#30482)
Warmup surface was being initialized on the platform thread rather than
the raster thread which was causing races in the skia cache, this change
just moves the warmup surface intiialization to the raster thread.

This change also addresses another minor problem where invoking shader
warmup with 0 skps would drop the callback on the floor and that would
cause the dart future to hang forever. Simply invoke the dart future if
no SKP's are provided.
2022-01-05 14:08:23 -08:00
godofredoc
edb4651636 GN targets for generating release artifacts (flutter/engine#30679) 2022-01-05 12:10:02 -08:00
Tong Mu
4cfe108309 [Win32, Keyboard] TextInputPlugin is no longer a KeyboardHandlerBase (flutter/engine#30456)
* Impl

* format

* Comment
2022-01-05 04:09:32 -08:00