942 Commits

Author SHA1 Message Date
Dan Field
df2e9393a2
load default splash screen when not init with engine (#6925) 2018-11-21 15:06:08 -08:00
Chris Bracken
1e37b99ac0
Add basic validation on loading from kernel list (#6921)
Adds a check/error message for the case where running from kernel list,
but application_kernel_list_asset is left unset (or empty).

Adds a check/error message for the case where we fail to load the
application_kernel_list_asset specified in the settings.
2018-11-21 10:31:32 -08:00
Jason Simmons
3978f07530
Keep a copy of each engine's description that can be accessed outside the engine's UI thread (#6885)
The service protocol's ListViews method needs to return description data for
each engine in the process.  Previously ListViews would queue a task to each
UI thread to gather this data.  However, the UI thread might be blocked from
executing tasks (e.g. if the Dart isolate is paused), resulting in a deadlock.

This change provides a copy of the engine's description data to the
ServiceProtocol's global list of engines, allowing ListViews to run without
accessing any UI threads.

Fixes https://github.com/flutter/flutter/issues/24400
2018-11-16 14:47:40 -08:00
Dan Field
c02dd8f935
Don't load a splash screen by default (#6883) 2018-11-16 12:43:18 -08:00
Jason Simmons
d8b52ef896
Reland "Clean up stale cache entries in Skia's GrContext" (#6867)
Check for software rendering modes that do not have a GrContext
2018-11-15 14:24:36 -08:00
Michael Goderbauer
e6f22b74e6
Fix license headers (#6868)
These sneaked in between https://github.com/flutter/engine/pull/6757 and https://github.com/flutter/engine/pull/6759.
2018-11-15 14:12:57 -08:00
Dan Field
699f328df5
Revert "Clean up stale cache entries in Skia's GrContext (#6859)" (#6866)
This reverts commit 2c6be93fa98aeb0dd3c1efa2db201232eb8eefba.
2018-11-15 11:41:53 -08:00
Michael Klimushyn
093b2fea8a
Disable the persistent cache (#6835)
Fixes flutter/flutter#24058
Reopens flutter/flutter#14028
2018-11-15 09:26:08 -08:00
Jason Simmons
2c6be93fa9
Clean up stale cache entries in Skia's GrContext (#6859)
Fixes https://github.com/flutter/flutter/issues/24160
2018-11-14 14:21:17 -08:00
Ben Konyi
f23862b259
Added delegate forwarding for didReceiveLocalNotification and willPresentNotification (#6858) 2018-11-14 11:39:47 -08:00
Dan Field
110a5f320c
Reset a11y bridge state on hot restart (#6857) 2018-11-14 11:13:39 -08:00
Dan Field
114d33d3ca
Set and unset accessibility flags even when re-entrant (#6853)
* Make sure to not unset a11y flags on reentrant calls to API
2018-11-13 23:54:45 -08:00
Michael Goderbauer
1e7e676e4d
Remove unused import (#6854) 2018-11-13 23:31:56 -08:00
Dan Field
0d0287780e
Avoid a never-disappearing splash screen if the engine came from somewhere else on iOS (#6834)
* Ignore multiple attemps to set splash screen, print warning
2018-11-13 16:04:09 -08:00
Michael Goderbauer
09ef73ff6e
Fix code smells reported by chrome's clang plugin (#6833) 2018-11-12 19:59:29 -08:00
Dan Field
ea4bbbd440
Avoid announcing text field when it lacks a11y focus (#6830)
* Avoid announcing text field when it lacks a11y focus
2018-11-12 16:08:59 -08:00
Amir Hardon
266b0986de
Release the surface texture entry when the platform view is disposed. (#6829)
We were leaking the texture after the view was disposed.
2018-11-12 14:23:25 -08:00
Jason Simmons
faabf0ced3
Fix MakeRenderContextCurrent to handle software rendering (#6827) 2018-11-12 11:20:49 -08:00
Jason Simmons
4dbdf94aaf
Ensure that the EGL rendering context is bound to the GPU thread in Rasterizer::MakeRasterSnapshot (#6816)
Fixes https://github.com/flutter/flutter/issues/24083
2018-11-09 17:05:05 -08:00
Dan Field
799ce8742d
fix log (#6817) 2018-11-09 16:46:49 -08:00
Amir Hardon
21c265cce4
Synchronize Flutter's rendering with CA. (#6807)
Right now we do it whenever the platform views preview flag is on.
This is less efficient, filed
https://github.com/flutter/flutter/issues/24133 to only do this when
there's a platform view in the tree.
2018-11-09 12:10:09 -08:00
Amir Hardon
f5e5d81eed
Move the embedded view preview flag check to a common function. (#6813) 2018-11-09 11:24:14 -08:00
Amir Hardon
316f6365a6
Fix wrong flutter/platform_views protocol implementation on iOS. (#6803)
The `id` parameter of onDispose is passed as the method argument and not as
part of a map.
2018-11-09 10:21:44 -08:00
Amir Hardon
099b4eeada
Support platform view overlays with GL rendering (#6769)
Moved the frame buffer specific logic from IOSGLContext to IOSGLRenderTarget.

use recording canvases for overlays

Support platform view overlays with gl rendering.

This also changes the overlay canvases (for both software and gl
rendering) be recording canvases, and only rasterize them after
finishing the paint traversal.
2018-11-08 19:52:43 -08:00
Amir Hardon
a0efb94191
Make the FlutterPlatformViewFactory create FlutterPlatformViews. (#6782)
Handing a UIView refererence directly to the engine makes it challenging
for plugin authors to retain a controller for that UIView (e.g the
controller that talks over the platform channel) for as long as the
embedded view is needed.

We instead make the factory return a FlutterPlatformView which is a
wrapper around the UIView that the engine retains as long as the
platform view instance is needed. This allows plugin authors to keep
their control logic in the FlutterPlatformView and know that the engine
is responsible for retaining the reference.
2018-11-08 11:21:55 -08:00
Dan Field
7ed4909fc8
Fix mDNS publishing for iOS simulator (#6789)
* Don't block the platfrorm thread on simulator mDNS publishing
2018-11-08 11:18:59 -08:00
Amir Hardon
18ca035cfd
Discard embedded UIViews on hot restart. (#6772) 2018-11-08 09:32:01 -08:00
Amir Hardon
387ca2ef86
Add an internal_nodes_canvas to PaintContext. (#6728)
When we visit a PlatformViewLayer during the paint traversal it replaces
the PaintContext's canvas with a new one that is painted ontop of the
embedded view.
We need to make sure that operations applied by parent layers are also
applied to the new canvas.

To achieve this we collect all the canvases in a SkNWayCanvas and use
this canvas by non leaf nodes. Leaf nodes still paint only to the "current"
canvas.

This PR moves the overlay canvas creation from the paint phase to the
preroll phase, collects them into a SkNWayCanvas and set it in
PaintContext.

To keep this PR focused, I only used the internal_nodes_canvas in the
tranform_layer.
Will followup with a PR that changes all internal layers to use the
internal_nodes_canvas.
2018-11-08 09:31:40 -08:00
Dan Field
09ff6dc479
avoid overreleasing FlutterView (#6791) 2018-11-07 21:19:14 -08:00
Mehmet Fidanboylu
94dd7165ef
Skia Cleanup (#6786) 2018-11-07 15:29:52 -08:00
Michael Goderbauer
70a1106b50
Unify copyright lines (#6757) 2018-11-07 12:24:35 -08:00
Todd Volkert
4cdddbac42
Fix String comparison as if Java were Dart. (#6781)
This also removes unused imports and sorts imports correctly
2018-11-07 09:59:51 -08:00
Dan Field
177e043b53
fix setInitialRoute (#6774)
* fix setInitialRoute
2018-11-06 17:15:11 -08:00
Amir Hardon
5006ce5748
fix type in embedded views preview flag name (#6767) 2018-11-06 10:35:01 -08:00
Amir Hardon
fa4c01ee6a
Add an Info.plist flag to enable the embedded iOS views preview. (#6756)
When the flag is true, we currently use a single thread configuration,
and disabled the raster cache for opacity layers.

The flag's name is 'io.flutter_embedded_views_preview'.
2018-11-05 20:08:25 -08:00
Amir Hardon
124f20f404
Clear the on-screen surface every frame. (#6753)
We are currently clearing the offscreen surface before rasterizing, but
as we draw the image snapshot of the offscreen surface into the onscreen
surface transparent pixels are blended with the current contents of the onscreen surface instead of replacing them. This is
particularly noticeable when embedding platform views.
2018-11-05 15:08:07 -08:00
Stanislav Baranov
b5758d0d38
Propagate positions of secondary pointers in UP events on Android (#6716) 2018-11-02 10:51:35 -07:00
Amir Hardon
9e1f546a85
Add an overlay surface on top of embedded UIViews. (#6726)
The overlay surfaces are going to be the same IOSSurface implementation
with the platform views controller set to null (so these are surfaces
that don't support embedding platform views to them).

  * Adds a FlutterOverlayView which is a UIView that's showing an
    overlay surface.
  * Creates an overlay surface for each embedded UIView (done in
    FlutterPlatformViewsController).
  * Changes CompositeEmbeddedView to return a new canvas.
  * Makes the PlatformViewLayer replace the PaintContext's canvas with
    the canvas for the overlay view.
  * Changed canvas in PaintContext to be a pointer so it can be changed.

TBD in following PRs:
  * Copy the current canvas state when replacing a canvas in PaintContext.
  * Make FlutterOverlayView work with a GL backend (currently it only
    works with software rendering)
2018-11-01 17:45:16 -07:00
Amir Hardon
c79faed71c
Decode UIView's creation parameters and pass them to the view factory. (#6715) 2018-10-31 16:15:42 -07:00
Amir Hardon
0ec3b7d437
Apply changes to the embedded UIView tree when presenting a frame (#6712)
Also tracks the order of embedded views from frame to frame, and only
removes and reattaches subviews if there is a structural change to the
UIView hierarchy.
2018-10-31 14:56:59 -07:00
Amir Hardon
92944f72fb
Move FlutterPlatformViewsController into FlutterEngine. (#6709)
This PR breaks PlatformViewsController's construction dependency on FlutterView,
which allows making FlutterEngine its owner instead of
FlutterViewController.

Also renamed the FlutterScreenshotDelegate to FlutterViewEngineDelegate
which is FlutterView's delegate to the engine, and expanded it to
provide a view embedder.
2018-10-31 13:02:44 -07:00
Amir Hardon
059876ea9a
Delay embedded UIViews touch events until the framework says so. (#6665)
This allows the framework to decide whether and when a touch event
sequence arrives to the embedded view. Which gives the framework the
ability to manage hit testing and gesture disambiguation for embedded
UIViews.

We achieve this by wrapping each embedded UIView with another UIView that has
a custom UIGestureRecognizer that delays touch events from being
delivered, and another UIGestureRecognizer that makes sure to let
Flutter know of events that are hit tested to the embedded view.
2018-10-30 20:16:56 -07:00
Dan Field
d8672baaa2
Ensure Simulator publishes mDNS records (#6696)
* Ensure Simulator publishes mDNS records on loopback interface.
2018-10-30 18:04:18 -07:00
Dan Field
91a019cfd3 Fix popSystemNavigator (#6691) 2018-10-29 16:36:28 -07:00
Gary Qian
3b17cfb684
Flutter tester default locales (#6689) 2018-10-29 14:06:04 -07:00
Amir Hardon
cc686d7aeb
Don't populate the external view embedder in PaintContext. (#6686)
The platform views embedding is still WIP, and until we dynamically
merge the gpu and platform threads based on the presence of an embedded
view in the scene fetching the view embedder is not thread safe.

This PR essentially disables iOS platform views embedding, we will
re-enable once dynamic thread merging is supported.
2018-10-29 10:38:04 -07:00
Mehmet Fidanboylu
a1d7cad70c
Fix inconsistent include syntax (#6680) 2018-10-28 11:40:26 -07:00
Chinmay Garde
ba8f6aa71c
Handle Windows headers defining ERROR to 0 in log levels. (#6677) 2018-10-26 16:47:14 -07:00
Dan Field
55e12993a0
Update FlutterPlugin.h docs, suppress warning for older API (#6672)
* Update FlutterPlugin.h docs, suppress warning for older API
2018-10-26 14:54:33 -07:00
Amir Hardon
f7970048dd
Attach and position embedded UIVIews (#6614) 2018-10-26 14:45:17 -07:00