1360 Commits

Author SHA1 Message Date
gaaclarke
1121fda40a
Added class docstrings for classes inside of shell/common. (#9303)
Added class docstrings for classes inside of shell/common.
2019-06-13 16:15:10 -07:00
Francisco Magdaleno
96a592b6e9
[macos] Adds clipboard string read/write support to macOS (#9313) 2019-06-13 15:15:20 -07:00
Jason Simmons
031c2dc987
Only build embedder unit tests for host builds (#9315)
Linux target builds for non-x86/x64 platforms were failing due to the
dependency on SwiftShader
2019-06-13 12:49:10 -07:00
Jenn Magder
1caff8d073
Decorate UIApplicationDelegate wrappers with matching UIKit deprecation (#9304) 2019-06-13 10:16:42 -07:00
Jason Simmons
209250da1b
When running in AOT modes create a flutter_assets directory that can be used as the bundle path (#9306)
The engine RunBundleAndSnapshotFromLibrary API expects a bundle path directory
containing the application's assets.  If the Android embedding is using
AOT ELF library packaging and does not need to extract assets, then create an
empty directory at the bundle path.

Fixes https://github.com/flutter/flutter/issues/34287
2019-06-12 17:34:02 -07:00
Chinmay Garde
7bb5b9aea5
Wire up Swiftshader based OpenGL ES unit-tests on hosts. (#9264)
Currently, all our host unit-tests that have rendering concerns use the software backend because of OpenGL ES availability and stability issues on the various platforms where we run host tests. Unfortunately, entire subsystems are disabled (and not tested) when rendering with the software backend. This patch pulls in SwiftShader and via pending patches in the buildroot, configures the host unit-tests to optionally use OpenGL ES in a stable manner without relying on the OpenGL drivers being present (and functional).

I have wired up the embedder test fixture in this patch to use the SwiftShader based OpenGL ES driver. I will update the shell and runtime unittests in a subsequent patch as well. The on and offscreen surfaces are configured as 1x1 pbuffer surface because we should be able to write pixel tests using OpenGL directly wihout having to deal with surfaces.
2019-06-12 12:32:09 -07:00
Zachary Anderson
0a2e28d797
Revert tracing changes (#9296)
* Revert "[fuchsia] Fix alignment of Fuchsia/non-Fuchsia tracing (#9289)"

This reverts commit f80ac5f571479053b134e60bca77603269b2ce2a.

* Revert "Align fuchsia and non-fuchsia tracing (#9199)"

This reverts commit 78265484623037c6544dfd5380367bca29fa27b0.
2019-06-12 10:25:49 -07:00
Dan Field
9baf589d19
[iOS] [a11y] Don't allow scroll views to grab a11y focus (#9282) 2019-06-11 18:02:47 -07:00
Matt Carroll
4fc95ebb29
Fixed memory leaks within FlutterFragment and FlutterView (#34268, #34269, #34270). (#9288) 2019-06-11 17:01:20 -07:00
liyuqian
de350c4cbb
Report timings faster (100ms) in profile/debug (#9287)
This should satisfy the low-latency need of DevTools.

Test added:
* ReportTimingsIsCalledSoonerInNonReleaseMode
* ReportTimingsIsCalledLaterInReleaseMode
2019-06-11 16:51:20 -07:00
stuartmorgan
6dc4d6ca09
Add refresh callback to GLFW shell (#9280)
In some cases, the window needs to be redrawn without a resize. This
adds a callback for that case to trigger a repaint.

Since there's no embedding API for repainting, trigger it with a window
metrics event using the current window size.

Fixes https://github.com/flutter/flutter/issues/30731
2019-06-11 16:16:14 -07:00
Matt Carroll
2d2cfc0884
Expose a hasRenderedFirstFrame() method in FlutterView (#34275). (#9285) 2019-06-11 15:47:04 -07:00
Matt Carroll
8040117420
Fix TextInputPlugin NPE caused by PlatformViewsController ref in new embedding (#34283). (#9283) 2019-06-11 15:21:55 -07:00
stuartmorgan
95f9b3db6e
Fix crash on minimize with GLFW shell (#9278)
Fixes a divide-by-zero in pixel density computation.
2019-06-11 11:50:19 -07:00
Jason Simmons
4d6847466d
Load AOT compiled Dart assets only from ELF libraries (#9260)
Previously AOT compiled Dart code would be packaged as a group of assets
within the APK.  This has been replaced by a single ELF library containing
the same data.
2019-06-11 10:10:45 -07:00
Chinmay Garde
3e9ffe1137
Whitelist the —enable_mirrors flag to fix regression in existing embedder. (#9266) 2019-06-11 10:09:16 -07:00
Dan Field
7cde42cc17
Unbreak internal rolls (#9270)
Adds back constructor for Rasterizer temporarily
2019-06-11 08:52:41 -07:00
Matt Carroll
2d0103a8fe
Removed VIRTUAL_KEYBOARD check in TextInputPlugin because it's blocking Espresso work and its purpose is unknown. (#9238) 2019-06-10 13:30:39 -07:00
liyuqian
b622d43c39
Make flow layers' attributes immutable (#9176)
For https://github.com/flutter/flutter/issues/33807

We still need to make layers' children immutable for full immutability.
That will require us to change the SceneBuilder API to build the layer
bottom up instead of top down (post-order traversal instead of pre-order
traversal).
2019-06-10 13:09:37 -07:00
Amir Hardon
259d334e05
Reland "Keyboard support for embedded Android views. (#9203) (#9257)
#9203 broke the keyboard_resize integration test(see more details in flutter/flutter#34085 (comment)).

This re-lands @9203 and fixes the issue the integration test uncovered by always allowing to hide the keyboard.

The difference from the original change is 07d2598
2019-06-10 12:56:35 -07:00
Wu Zhong
2091467418 Correct typo (#9244) 2019-06-09 09:06:43 -07:00
Jonah Williams
ddd36e8338
Revert "Keyboard support for embedded Android views. (#9203)" (#9239) 2019-06-07 18:21:57 -07:00
Dan Field
069e38a0b9
Document AccessibilityBridge.java (#9237) 2019-06-07 16:00:38 -07:00
Ben Konyi
99240b7ad6
Remove unnecessary whitelisted flags for --dart-flags (#9233) 2019-06-07 14:43:43 -07:00
Amir Hardon
e80df363d2
Keyboard support for embedded Android views. (#9203)
Generally what this PR is doing is setting up a delegation mechanism
for Android's onCreateInputConnection.

It works by letting the framework know when an embedded view gets loses
focus(within the virtual display), the framework maintains a focus node
for each Android view that is kept in sync with the focus state of the
embedded view.

The TextInputPlugin is extended to allow for 2 type of text clients a
"framework client"(what we had before) and a "platform view client".
When the AndroidView's focus node in the framework is focused the
framework sets a "platform view text client" for the TextInputPlugin,
which will result in the TextInputPlugin delegating
createInputConnection to the platform view.

When a platform view is resized, we are detaching it from a virtual
display and attaching it to a new one, as a side affect a platform view
might lose an active input connection, to workaround that we "lock" the
connection when resizing(by caching it and forcing the cached copy until
the resize is done).

Additional things worth calling out in this PR:

To properly answer which views are allowed for input connection
proxying we compare a candidate view's root view to the set of root
views of all virtual displays.
We also preserve a view's focus state across resizes.
Note that this PR only wires text for the io.flutter.view.FlutterView
For the new Android embedding some additional plumbing is necessary.

Corresponding framework PR: flutter/flutter#33901

flutter/flutter#19718
2019-06-06 21:58:04 -07:00
Jason Simmons
99e84a9cfa
Update Engine::ReportTimings to use the new FML_TRACE macros (#9215) 2019-06-06 10:58:59 -07:00
liyuqian
9f088c65ee
Add onReportTimings and FrameRasterizedCallback API (#8983)
Using it, a Flutter app can monitor missing frames in the release mode, and a custom Flutter runner (e.g., Fuchsia) can add a custom FrameRasterizedCallback.

Related issues:
https://github.com/flutter/flutter/issues/26154
https://github.com/flutter/flutter/issues/31444
https://github.com/flutter/flutter/issues/32447

Need review as soon as possible so we can merge this before the end of May to catch the milestone.

Tests added:
* NoNeedToReportTimingsByDefault
* NeedsReportTimingsIsSetWithCallback
* ReportTimingsIsCalled
* FrameRasterizedCallbackIsCalled
* FrameTimingSetsAndGetsProperly
* onReportTimings preserves callback zone
* FrameTiming.toString has the correct format

This will need a manual engine roll as the TestWindow defined in the framework needs to implement onReportTimings.
2019-06-06 10:42:48 -07:00
Amir Hardon
647a8524b0
Revert "Switch PlatformViewsController from Activity ref to Application ref. (#9193)" (#9211)
This reverts commit 5ea125eaf9e15a3e4eefe89b13cb86b0ba820d8f.
2019-06-06 09:29:10 -07:00
Dan Field
7826548462
Align fuchsia and non-fuchsia tracing (#9199) 2019-06-05 15:14:27 -07:00
Matt Carroll
5ea125eaf9
Switch PlatformViewsController from Activity ref to Application ref. (#9193) 2019-06-05 14:24:16 -07:00
Greg Spencer
bf15bd0803
Add the key event source, vendorId, and productId from Android (#9186)
This adds the key event source from Android so that the framework can differentiate between keyboard events and game controller events. Also added vendor and product ids so that Flutter code can decide to do special processing based on the kind of device, if desired.
2019-06-04 16:46:23 -07:00
Ben Konyi
12f48f7601
Allow for whitelisted flags to be passed to the Dart VM (#9148)
* Allow for whitelisted flags to be passed to the Dart VM

Fixed part of https://github.com/flutter/flutter/issues/32176
2019-06-04 14:51:29 -07:00
Amir Hardon
86aa01442b
Fix platform views channel regression (#9185)
This regression was introduced in #7847.

The PlatformViewsChannel method call handler was always setting the result to `notImplemented` even after handling a result, this resulted in a "Reply already submitted" exception being thrown.
Note that the method channel code is swallowing this exception and logging an error, so we didn't crash instead we were logging an error(this is why the integration test didn't fail).

Filed https://github.com/flutter/flutter/issues/33863 to make sure tests fail when such exceptions are thrown.

This PR also cleans up an unused `NoSuchPlatformViewException` that was introduced in #7847.

https://github.com/flutter/flutter/issues/33866
2019-06-04 12:38:38 -07:00
Emmanuel Garcia
05365c4c32 Revert change by mistake: extract resources (#9180) 2019-06-03 23:44:46 -07:00
Emmanuel Garcia
f4d92c1f0c
Use shared library when libapp.so is found (#9172) 2019-06-03 16:23:28 -07:00
Chris Yang
2fcd4e799b
Do nothing if the params didn't change when compositing iOS platform views. (#8999) 2019-06-03 13:08:29 -07:00
Matt Carroll
008090b8ab
Extracted PlatformViewsChannel from PlatformViewsController. (#7847) 2019-06-03 11:04:33 -07:00
stuartmorgan
4c6253cdd6
Copy the macOS podspec during builds (#9158)
The podspec must be copied to the build output root, otherwise
--local-engine won't work in projects containing plugins.

Mirrors the iOS podspec copy rule.
2019-05-31 17:22:09 -07:00
Kevin Lindkvist
69ebe5fb28 Remove references to Fuchsia's ContextWriter (#9157) 2019-05-31 16:12:07 -07:00
Dan Field
79c6ce19a1
Preserve safe area (#8848)
Preserve safe area on Window regardless of insets.
2019-05-31 09:24:38 -07:00
Jason Simmons
e8db5dfd52
Always run the resource extractor in FlutterMain (#9149)
FlutterMain.findAppBundlePath is using the presence of the flutter_assets
directory as a signal that the app is initialized.  For consistency,
FlutterMain will run the resource extractor at startup and create
flutter_assets even if no resources need to be extracted.
2019-05-30 16:50:31 -07:00
Jason Simmons
e87326dd7d
Suppress an unchecked cast warning in ShimPluginRegistry (#9145) 2019-05-30 13:10:03 -07:00
stuartmorgan
ba6cc8c93c
Fix type mismatches in C++ standard codec (#9112)
There were some implicit casts in the standard codec implementation that
didn't show up on Linux, but do on Windows.
2019-05-30 10:17:08 -07:00
Chris Yang
49b6de8c5c
Dynamically add certain iOS AppDelegate methods. (#8843) 2019-05-30 09:06:49 -07:00
Matt Carroll
e8aa120482
New Plugin API PR5: Integrates plugin lifecycle control with FlutterFragment. (#9083) 2019-05-29 20:46:07 -07:00
Matt Carroll
8b1199c4dd
Implemented Log proxy that only logs in BuildConfig.DEBUG (#25391). (#9122) 2019-05-29 20:19:29 -07:00
Dan Field
fa9b5bd0e2
Reduce pipeline depth when GPU and Platform are same thread (#9132) 2019-05-29 19:45:02 -07:00
Kaushik Iska
d4794122ab
Change the virtual display size restriction to warning (#9110)
* Change the virtual display size restriction to warning

- Fixes: https://github.com/flutter/flutter/issues/33290

- This is so we don't block usecases where users show the platform
  view partially.

- https://github.com/flutter/flutter/issues/31990 should address this
  issue more broadly.

* Fix error message
2019-05-30 08:07:41 +05:30
Matt Carroll
4c4c0f8282
Add plugin shim to facilitate old plugins in new embedding (#33478). (#9120) 2019-05-29 18:39:15 -07:00
Matt Carroll
e8c2b17873
Added support for transparent FlutterActivitys (#32740). (#9115) 2019-05-29 18:34:53 -07:00