2617 Commits

Author SHA1 Message Date
Sebastian Roth
fe3a0c34e6 Fixes typo in android_context_gl.h (flutter/engine#19700) 2020-07-13 21:45:27 +01:00
Tong Mu
a7cf911b7e Linux: Use a hash table to map cursors (flutter/engine#19561)
Refactors the process of looking up system mouse cursor value, so that instead of a linear search it uses a hash table.
2020-07-13 13:32:13 -07:00
Gary Qian
d298a08c85 [Android] Prevent FlutterRenderer listener from calling JNI after detach (flutter/engine#19558) 2020-07-13 06:29:30 -07:00
Andy Weiss
d498287222 Use the main bundle if the App bundle is not found (flutter/engine#18749)
It looks like half the code in this function was updated to use the
main bundle but this one line was still only using the _dartBundle. I am
pretty sure that is a mistake and instead we want to use the mainBundle
as a backup both to find the plist and to find the assets.
2020-07-11 21:08:27 -07:00
Kaushik Iska
a292cb8d21 [android] Pass synthesized eventType to VirtualDisplay platform views and fix memory leak (flutter/engine#19620) 2020-07-09 18:06:02 -07:00
gaaclarke
26774fd70d Added the ability to set properties in interface builder for FlutterViewController. (flutter/engine#19458) 2020-07-09 17:23:32 -07:00
Robert Ancell
7dc1897fba Fix clipboard paste functionality not working (flutter/engine#19489) 2020-07-10 11:34:23 +12:00
Robert Ancell
2c9a7e1cd7 Fix documentation of unset platform view ID (flutter/engine#19320) 2020-07-10 11:17:14 +12:00
Robert Ancell
84ccba79fc Set locale in Linux shell (flutter/engine#19470) 2020-07-10 11:16:50 +12:00
stuartmorgan
f0c88b310c Implement cursor support for Windows (flutter/engine#19459)
Implements the basic engine support for Windows for
https://github.com/flutter/flutter/issues/31952
2020-07-09 11:18:39 -07:00
Justin McCandless
e52d9ab7fc Make DPAD movement consider grapheme clusters (flutter/engine#17420)
Moving the caret with the software Dpad now correctly considers complex characters.
2020-07-08 13:59:58 -07:00
gaaclarke
025b1cf4e9 Changed iOS channels to start cleaning up the accessibility handler when the bridge is deleted (flutter/engine#19556)
Started cleaning up the accessibility handler when the bridge is
deleted and made nilling out channels safer by making sure they don't
overwrite newly setup handlers.
2020-07-08 13:26:29 -07:00
Kaushik Iska
3239b704c3 Propoagate Tap events on Android hybrid views (flutter/engine#19608)
Translate the coordinate from global flutterview to the specific embedded sub-view.
2020-07-08 13:19:17 -07:00
Dan Field
5abad59767 Call Dart_NotifyLowMemory more on iOS (flutter/engine#19289) 2020-07-08 04:44:03 -07:00
Chinmay Garde
91fc6696db Only attempt surface creation in viewDidLayoutSubviews if the application is active. (flutter/engine#19592)
UIKit does not guarantee that the application is in the active state when it
lays out it subviews. However, in `viewDidLayoutSubviews`, Flutter attempts to
create the render surface and wait for the first frame. These operations require
GPU access which is forbidden when in the background on iOS. This layout while
in the background only seems to happen under very specific circumstances as
described in the reproducible test case. Notably, this behavior cannot be
reproduced when the application is just launched with the "Background Fetch"
XCode run scheme. The other instance of invocations to create the rendering
surface have been audited and I can confirm that those are already in the
correct lifecycle callbacks. This was the only instance where the surface
creation was in a non-lifecycle callback.

Fixes https://github.com/flutter/flutter/issues/55969
(This issue has a clear reproducible test case and was used as the basis for
verification.)
Fixes https://github.com/flutter/flutter/issues/57676
(This is significantly harder to reproduce but the issue looks to be the same. I
tried this patch on multiple devices overnight and could not reproduce this.)

This underlying cause here was identified by the enhanced GPU error reporting
introduced in iOS 14. I am not able to submit those patches because the Beta
builders are not available on infra. I will submit those when available so that
issues like this have more actionable error messages in the future.
2020-07-07 17:14:01 -07:00
Chase Latta
cdf666d945 include list_libraries.dart as a snapshot for fuchsia (flutter/engine#19567) 2020-07-07 11:16:50 -07:00
James Clarke
71dafa45b1 Refactor Win32FlutterWindow in preparation for UWP windowing implementation (flutter/engine#18878)
* Add flutter_windows_view and window_binding_handler

Switch input handling infra to FlutterWindowsView

win32_flutter_window implement WindowBindingHandler

Strip unneeded functionality from win32flutterwindow

Fulfill WindowBindingHandler interface in Win32FlutterWindow

Add implementations for missing input handling in Win32FlutterWindow

Cleanup dead code

Correctly hook up rendering again

Fix resizing

clang-format

Fix clipboard

Cleanup

Rename

Add comments

cleanup

* clang-format

* CR Feedback

* clang-format; gn format

* Fix licensing

* CR feedback

* CR feedback

* CR feedback

* Git rid of unnecessar :: prefixes

* Extract WindowBindingHandlerDelegate as an interface

* Missing file

* Extract physical window bounds as a struct

* CR Feedback

* CR feedback

* clang-format

Co-authored-by: Stuart Morgan <stuartmorgan@google.com>
2020-07-07 06:49:51 -07:00
Kaushik Iska
8818677dfd Track motion events for reuse post gesture disambiguation (flutter/engine#19484)
This change makes it so that we track all the motion events encountered by `FlutterView` and all of its subviews in the `MotionEventTracker` class, indexed by a unique `MotionEventId`. This identifier is then passed to the Flutter framework as seen in https://github.com/flutter/flutter/pull/60930. Once the gestures take part in gesture disambiguation and are sent back to the engine, we look-up the original motion event using the `MotionEventId` and dispatch it to the platform.

Bug: https://github.com/flutter/flutter/issues/58837
2020-07-06 22:22:37 -07:00
Emmanuel Garcia
f9ad019129 Resubmit frame when the surface is switched (flutter/engine#19555) 2020-07-06 21:55:52 -07:00
Emmanuel Garcia
ea1c94ff13 Add @Keep annotation to FlutterMutatorsStack (flutter/engine#19560) 2020-07-06 18:23:47 -07:00
Emmanuel Garcia
ecc2f07d06 Switch to FlutterSurfaceView if no Android view is in the frame (flutter/engine#19487) 2020-07-06 14:51:46 -07:00
Chris Yang
cf4d2e25d9 Implement mutator stack on Android hybrid composition platform view (flutter/engine#19426) 2020-07-04 13:03:04 -07:00
renyou
5419a5279c Revert "Add tests & --unopt to build_fuchsia_artifacts (#18625)" (flutter/engine#19494)
This reverts commit 6fd117d1ae77c04d7f7a035d9b3da7b7f7170088.
2020-07-03 13:26:19 -07:00
renyou
244cd97aa1 Revert "fuchsia: Fix profile build (#19399)" (flutter/engine#19493)
This reverts commit 6050fa29e3ac93fbf2f0368685ac7a1abae69838.
2020-07-03 13:26:00 -07:00
Robert Ancell
6d6143c30f Use the X visual from the EGL configuration when making an FlView. (flutter/engine#19438) 2020-07-03 09:37:51 +12:00
Kaushik Iska
0c152b8320 Synthesize touch events for hybrid views (flutter/engine#19427)
Co-authored-by: Kaushik Iska <kaushikiska@google.com>
2020-07-02 12:31:30 -07:00
Kaushik Iska
8b90d16e3c FlutterView will hadle dispatching all touch events to sub-views (flutter/engine#19482) 2020-07-02 12:31:10 -07:00
Guruji Panda
cf740767d5 Fix paths in source and yaml files to minimize changes in google3 (flutter/engine#19414) 2020-07-01 16:13:03 -07:00
Robert Ancell
4ffa68b795 Show EGL configuration debugging when fail to create surface/context (flutter/engine#19397) 2020-07-02 09:35:00 +12:00
Emmanuel Garcia
af66026f31 Revert unintended change (flutter/engine#19435) 2020-06-30 19:48:01 -07:00
Emmanuel Garcia
59e05c0376 Update scenario UI screenshoots (flutter/engine#19421) 2020-06-30 18:38:06 -07:00
Alexandre Ardhuin
2c2e5f362c Operator equals (flutter/engine#19303)
* use Object for operator==

* apply style guide for operator==
2020-06-30 23:16:31 +02:00
Jason Simmons
8a0511cd25 Basic support for resizing overlay surfaces in hybrid composition (flutter/engine#19402) 2020-06-30 14:08:04 -07:00
liyuqian
02f828632c Use FixtureTest to remove duplicate code (flutter/engine#19219)
Fixes https://github.com/flutter/flutter/issues/59109
2020-06-30 10:55:38 -07:00
David Worsham
6050fa29e3 fuchsia: Fix profile build (flutter/engine#19399) 2020-06-29 17:35:35 -07:00
David Worsham
6fd117d1ae Add tests & --unopt to build_fuchsia_artifacts (flutter/engine#18625)
We can build unoptimized code for easier debugging with this flag.
2020-06-29 16:39:15 -07:00
Emmanuel Garcia
23b8e92c47 Implement onDisplayPlatformView (flutter/engine#19344) 2020-06-26 21:08:02 -07:00
David Worsham
1305c3105c Fix broken mac/fuchsia compiles (flutter/engine#19339) 2020-06-26 14:53:54 -07:00
David Worsham
919f8e6a42 Move fuchsia/scenic integration behind #define (flutter/engine#19003)
Additionally create "_next" permutations for all of the test binaries
on Fuchsia, in order to test both code-paths.

Using the #define follow-up CLs can also create a flutter_runner_next
binary that does not contain any legacy integration code.

BUG: 53847
2020-06-26 14:03:18 -07:00
Emmanuel Garcia
a8aa7dd524 Fix hybrid composition bugs (flutter/engine#19325) 2020-06-26 12:33:02 -07:00
Jason Simmons
d720766b64 Fix ImageReader "unable to acquire a buffer item" warnings in FlutterImageView (flutter/engine#19319) 2020-06-26 11:18:03 -07:00
Gary Qian
fa5dca45d5 Android native locale resolution algorithm (flutter/engine#19266) 2020-06-26 02:48:33 -07:00
Robert Ancell
caa886785c Replace GLFW key codes with native Flutter GTK support (flutter/engine#19196)
Fixes https://github.com/flutter/flutter/issues/57603
2020-06-26 13:56:18 +12:00
Sanjay Chouksey
f1286c6356 Add PlatformView support for Fuchsia (flutter/engine#19132)
* Add PlatformView support for Fuchsia

This change allows embedding views provided by fuchsia components into
a flutter app running on Fuchsia. This conforms to Flutters idiomatic
approach to composite PlatformView alongside other rendered layers.

This uses the `view embedder` infrastructure to allow
`PlatformViewLayer`
to hold fuchsia views. This is meant to eventually supplant the legacy
`SceneHost` and `ChildViewLayer` mechanism to embed fuchsia `ChildView`.

To see how this will get used check out:
https://fuchsia-review.googlesource.com/c/experiences/+/398536/6/examples/hello_experiences/lib/fuchsia_view.dart

Includes unittests for platform_view.cc.

Note: This change has no impact on the legacy code to embed fuchsia
views.

* Rename OnCreateViewMethodCall to OnCreateView

Same for OnDestroyViewMethodCall to OnDestroyView

Co-authored-by: Sanjay Chouksey <sanjayc@google.com>
2020-06-25 16:27:39 -07:00
Robert Ancell
7ec9448e36 Add a flag to enable dart:mirrors (flutter/engine#19112)
Fixes https://github.com/flutter/flutter/issues/59233
2020-06-26 11:17:15 +12:00
Jason Simmons
e00aa84aac Position overlay layer views in PlatformViewsController.onDisplayOverlaySurface (flutter/engine#19295) 2020-06-24 20:48:38 -07:00
Jason Simmons
5b8a1cb82e Initial work toward converting the FlutterView to use a FlutterImageView on demand (flutter/engine#19279) 2020-06-24 16:26:03 -07:00
Dan Field
822de89f54 Make Shell::NotifyLowMemoryWarning trace (flutter/engine#19283) 2020-06-24 15:58:02 -07:00
Chris Yang
27e0962427 Android platform view static thread merging (flutter/engine#19242) 2020-06-24 15:13:02 -07:00
Emmanuel Garcia
910b7ed0df EndFrame should be always called by rasterizer (flutter/engine#19257) 2020-06-24 14:02:48 -07:00