3051 Commits

Author SHA1 Message Date
Chinmay Garde
02e781f347 Wire up memory warning notifications on iOS. (flutter/engine#3477) 2017-03-14 17:12:29 -07:00
Jason Simmons
b2715565a0 Send an event to signal memory pressure (flutter/engine#3475)
See https://github.com/flutter/flutter/issues/7561
2017-03-14 15:42:30 -07:00
Jakob Andersen
7fbb663617 Fix pod name in Flutter.podspec. (flutter/engine#3473)
Names matter, and I apparently forgot to test after adding ' Engine' to
the name. Names can't contain spaces, and must match the filename.
2017-03-14 15:40:59 +01:00
Mikkel Nygaard Ravn
6afc504feb Flutter channels for iOS (flutter/engine#3470)
Flutter channels now also supported on iOS. Use FlutterMessageChannel or FlutterMethodChannel with binary/string/json/standard codecs.
2017-03-13 23:57:46 +01:00
Chinmay Garde
e3861ff767 Remove deprecated SkyApplication and SkyActivity. (flutter/engine#3464) 2017-03-08 10:47:53 -08:00
Jakob Andersen
fb41fe688d Add podspec to Flutter iOS framework. (flutter/engine#3467)
* Add podspec to Flutter iOS framework.

Flutter iOS apps are already pod-enabled, so we might as well turn the
engine framework into a pod, so we don't have to manually copy the
current Flutter.framework into the app directory on every build, but
rather let Cocoapods wire things up for us.

For that to happen, we need a pod spec for Flutter.framework. This spec
will not be published, but rather downloaded as part of the engine
artifacts, and the app's Podfile will have a local path dependency on
it.

* Update licenses_golden...
2017-03-08 09:00:59 +01:00
Chinmay Garde
aac27e52b3 Use software rendering on iOS simulators without needing a flag. (flutter/engine#3465) 2017-03-06 14:49:25 -08:00
Mikkel Nygaard Ravn
b3b9d628ba Remove usage of JDK7 features not available until Android SDK 19+ (flutter/engine#3462) 2017-03-06 13:22:29 +01:00
Mikkel Nygaard Ravn
895fce4709 FlutterXxxChannel concepts added to support Flutter/Android interop (flutter/engine#3446)
New concepts: FlutterMessageChannel (basic message send/receive superseding existing FlutterView methods), FlutterMethodChannel (method invocation and event streams), pluggable codecs for messages and method calls: unencoded binary, string, json, and 'standard' flutter binary encoding.
2017-03-01 13:54:32 +01:00
Jason Simmons
5683b4d5fc Disable the cache on the GrContext used for decoding images (flutter/engine#3451)
Fixes https://github.com/flutter/flutter/issues/8429
2017-02-27 16:21:21 -08:00
Chris Bracken
f2594cae0f Apply iOS status bar padding to flutter views (flutter/engine#3447)
This change eliminates two previous assumptions:
1. If a Flutter view is embedded in a parent view, that the parent view
   controller would apply any status bar padding necessary.
2. That we should not apply padding unless the flutter view is
   fullscreen.

A simple case where the first assumption fails to hold is a Flutter view
embedded in a UINavigationController with a hidden toolbar. A simple
case where the second assumption fails to hold is a view in a window
whose top overlaps the status bar but isn't fullscreen.
2017-02-24 13:11:10 -08:00
Chinmay Garde
53b2940c6d Remove rarely used GLConnection stuff in flow. (flutter/engine#3440)
I had added this initially as a means of making it easier to deal with OpenGL directly in Flow. However, we are moving away from dealing with the client rendering APIs directly. Instead, delegating everything to Skia. Besides, we only ever used this to log the GPU description in case of context setup failures. This has not proved to be useful so far. Also, having this in place is making it difficult to remove all dependencies on GL in Shell.
2017-02-23 16:02:53 -08:00
Chinmay Garde
0110abf008 Allow plugging in a software backend for rendering in the shell. (flutter/engine#3404) 2017-02-22 15:40:23 -08:00
Chinmay Garde
7e31feadc0 Remove texture image. (flutter/engine#3434) 2017-02-16 16:26:02 -08:00
Dan Rubel
011f142515 add kernel support (flutter/engine#3369) 2017-02-16 10:11:38 -05:00
Chinmay Garde
42d77d6159 Revert ShadowMaskFilter use and roll Skia to 246a3c269d8dc91a47ff27f7b71508bf9e74edf5. (flutter/engine#3409) 2017-02-10 16:01:36 -08:00
Collin Jackson
e5a90fea32 Call the correct super method in FlutterViewController’s viewDidAppear (flutter/engine#3399) 2017-02-08 06:43:45 -08:00
Chris Bracken
e85df21b83 Switch iOS keyboard type if required (flutter/engine#3400)
Ensure that the text input keyboard is reloaded if the view keyboardType
changes.
2017-02-07 18:01:19 -08:00
Chinmay Garde
ea582e5d36 Allow running in debug product mode with checked mode off. (flutter/engine#3398) 2017-02-07 17:01:27 -08:00
Chinmay Garde
eaf7f58f19 Bump up limits on the GrResourceCache used for the main GrContext. (flutter/engine#3394) 2017-02-07 16:04:06 -08:00
Chris Bracken
9c12e3dbd4 Add missing keys from Framework Info.plist (flutter/engine#3393)
Added:
* UIRequiredDeviceCapabilities=[arm64]
* MinimumOSVersion=8.0
2017-02-06 14:51:37 -08:00
Jason Simmons
ad76524c95 Fix some Javadoc warnings (flutter/engine#3391) 2017-02-03 16:25:25 -08:00
Jason Simmons
8259f0a8bb Return the expected exit code if sky_shell sees a compilation error during script loading (flutter/engine#3389) 2017-02-03 12:14:35 -08:00
Chris Bracken
45df428f8e Support status bar taps in FlutterAppDelegate (flutter/engine#3387)
Provide a default status bar tap handler for FlutterAppDelegate.
By default, taps are passed to the key window's rootViewController if
it's a FlutterViewController. Apps with custom app delegates can
customize this behaviour to send the tap to the FlutterViewController(s)
they prefer by overriding touchesBegan:withEvent.
2017-02-02 16:29:22 -08:00
Jason Simmons
b9779778e3 Set Platform.executable and executableArguments for Linux sky_shell (flutter/engine#3378) 2017-02-02 12:28:52 -08:00
Chinmay Garde
cfa2e89fba [iOS] Ensure FlutterMain is called before interacting with the engine in any way. (flutter/engine#3383)
* [iOS] Ensure FlutterMain is called before interacting with the engine in any way.

* Licenses
2017-02-01 13:53:15 -08:00
Jason Simmons
23a36caa6f Fix a race in PlatformView construction (flutter/engine#3380)
The PlatformView superclass constructor was posting a task to the UI thread
that adds the view to the shell's global list.  This could result in UI thread
operations seeing PlatformView instances that are not fully constructed and do
not yet have an engine.

This was happening in https://github.com/flutter/flutter/issues/7735
2017-01-31 17:54:34 -08:00
Chris Bracken
21f38d7a48 Support scroll to top on iOS statusbar touches (flutter/engine#3375)
On iOS, when a tap is detected in the status bar, provide a means to
pass that touch event through to one or more FlutterViewControllers to
trigger a scroll to top. In iOS apps, scroll to top should occur under
the following conditions:

1. There is one and only one UIScrollView visible with
   scrollsToTop == YES.
2. The status-bar is in standard height mode, not in double-height mode.
   In double-height mode, the expected behaviour is to trigger a switch
   to the application associated with the double-height status bar.
3. A tap or a drag gesture occurs that is entirely constrained to the
   status bar frame. (We currently only handle the tap scenario).

Unfortunately, AppDelegates only get touchesBegan events for status bar
taps, though get get touchesBegan and touchesEnded events for drags
within the status bar frame. As such, we currently synthesise the
touchesEnded event for taps.
2017-01-31 13:42:58 -08:00
Chinmay Garde
ea73356841 [iOS] Make FlutterInit redundant and deprecate the same. (flutter/engine#3377) 2017-01-31 12:56:55 -08:00
Jason Simmons
cf7899dde4 Return an exit code from sky_shell representing what kind of error occurred (flutter/engine#3368)
This is intended to match the exit codes returned by the Dart command line tool
2017-01-27 09:59:08 -08:00
Chris Bracken
122ff8528c Deprecate FlutterAppDelegate (flutter/engine#3371)
All samples and the 'flutter create' command now use a project-specifc
app delegate.

Any projects that still rely on FlutterAppDelegate should create an
empty delegate that subclasses UIResponder<UIApplicationDelegate> and
defines:
  @property (strong, nonatomic) UIWindow *window;
2017-01-26 18:20:26 -08:00
Ian Hickson
ee825ea5d7 Make the diagnostic "listening on" message consistent with observatory's (flutter/engine#3370) 2017-01-26 15:51:34 -08:00
Jason Simmons
15df8436d1 Add a flag to sky_shell that keeps the process alive after the Dart script completes (flutter/engine#3363) 2017-01-25 12:06:23 -08:00
Chris Bracken
2caf40dade Apply iOS status bar padding only to fullscreen views (flutter/engine#3362)
* Apply iOS status bar padding only to fullscreen views

Previously padding was applied to account for the status bar, whether in
standard or expanded 'in-call' geometry only if the current view was not
a subview of a containing view. This didn't cover the case of root views
embedded in other windows (e.g. dialogs).

We also ensure that the window is fullscreen to account for cases like
small dialogs centred on the screen.

* Do not apply padding if we're a subview in a containing view
2017-01-25 01:35:55 -08:00
Jason Simmons
4c32d9a960 Exit the non-interactive sky_shell on Linux when the Dart script has completed (flutter/engine#3358)
The script will be finished when the microtask queue has been drained and
Dart_HasLivePorts is returning false for the main isolate
2017-01-24 15:39:30 -08:00
Chris Bracken
5f5db63df3 Handle double-height status bar on iOS (flutter/engine#3357)
* Handle double-height status bar on iOS

In certain cases, iOS displays a double-height status bar (e.g., when an
application is using device location or while in a call). In such cases,
iOS offsets the app view origin by 20px, reduces view height by 20px,
then overlays a 40px opaque status bar: 20px covering the newly opened
20px gap at the top of the screen, 20px covering the top 20px of the
view, which had previously been under the standard-sized status bar.

Flutter previously set top padding to the height of the status bar,
which resulted in 40px padding with a double-sized status bar. However,
the padding should match the portion of the status bar overlapping the
view, which is 20px.

Note that the final case is the one in which no status bar is shown and
padding should be zero.

* Only apply status bar padding on root views
2017-01-24 10:30:36 -08:00
Michael Goderbauer
42c2625950 Make gen_snapshot compile on Windows (flutter/engine#3355) 2017-01-23 14:12:26 -08:00
Ryan Macnak
023ebac36d Adapt to refactoring of snapshot APIs in the Dart VM. (flutter/engine#3354)
Adapt to refactoring of snapshot APIs in the Dart VM.
2017-01-23 12:09:59 -08:00
Jason Simmons
4c92ea1506 Add flags for disabling the diagnostic server or setting its port (flutter/engine#3352)
Fixes https://github.com/flutter/flutter/issues/7557
2017-01-20 15:18:13 -08:00
Chinmay Garde
26fe5e1b12 Add a Vulkan backend for Fuchsia and Android. (flutter/engine#3282) 2017-01-20 14:37:10 -08:00
Jason Simmons
e5a2958d0a Clear the GPU thread's EGL context only after the GPUSurfaceGL has been destroyed (flutter/engine#3346)
The GPUSurfaceGL holds references to Skia objects that may own GL objects.
If the GL objects are destructed on the GPU thread after the EGL context has been
dropped, then the GL delete calls will not take effect.
2017-01-18 17:19:50 -08:00
Jason Simmons
30e0f97176 Do not pass negative selection indexes to InputConnection.setSelection (flutter/engine#3344)
This was causing exceptions on Jellybean
2017-01-17 17:43:24 -08:00
Jason Simmons
f383a1d444 Apply window insets using an older API on pre-Lollipop systems (flutter/engine#3340)
Fixes https://github.com/flutter/flutter/issues/6586
2017-01-17 15:36:47 -08:00
Jason Simmons
633c3e25db An API for setting the tag for Flutter log messages on Android (flutter/engine#3335)
Fixes https://github.com/flutter/flutter/issues/7226
2017-01-12 15:47:18 -08:00
Chinmay Garde
a0e4467f4d iOS: Ensure that task observers for VSync callbacks are not bypassed in VSyncWaiterIOS. (flutter/engine#3334) 2017-01-11 14:58:06 -08:00
amirh
05910fb84f Add a getter for flutterView in FlutterActivity. This allows fullscreen flutter apps to extend FlutterActivity and do custom stuff with the flutter view. (flutter/engine#3324) 2017-01-05 20:35:00 -08:00
Chinmay Garde
04d14ea433 Fix Linux builds by correctly initializing the GPURasterizer. (flutter/engine#3322)
The API was updated recently so platforms can report memory usage for the
rasterizer to display as an overlay.
2017-01-05 11:34:42 -08:00
Chinmay Garde
d14c8ac6f5 Re-format all GN files using gn format. (flutter/engine#3319) 2017-01-03 15:59:48 -08:00
Chinmay Garde
63fbe60fa6 Display resident memory statistics on the performance overlay. (flutter/engine#3314) 2017-01-03 12:27:30 -08:00
Jason Simmons
49424e1b4f Detach the EGL surface from the GPU thread and then destroy it during the FlutterView surfaceDestroyed callback (flutter/engine#3316)
Fixes https://github.com/flutter/flutter/issues/7147
2016-12-16 15:36:33 -08:00