163 Commits

Author SHA1 Message Date
Chinmay Garde
809ad59a59 Directly generate flutter.jar without APK generation. (#3516) 2017-03-24 15:51:51 -07:00
Chinmay Garde
0908de9ff4 Avoid linking to GL from the Linux test shell. (#3512) 2017-03-23 16:22:40 -07:00
Chinmay Garde
2323a17acb Remove last reference to //base from //flutter/shell/platform/linux. (#3511) 2017-03-23 16:01:35 -07:00
Chinmay Garde
3f269db72c Remove the interactive mode on the Linux test shell. (#3510) 2017-03-23 15:52:54 -07:00
Chinmay Garde
1c07ea530f Remove uses of //base from all //flutter projects and replace them with //fml variants. (#3492) 2017-03-22 15:42:51 -07:00
Mikkel Nygaard Ravn
61fc1d6e31 Better value coverage of Flutter standard codec on iOS. Unit tests added. (#3498) 2017-03-22 20:23:23 +01:00
Mikkel Nygaard Ravn
4695deb458 Revert "Improved value coverage of Flutter standard codec. Added unit tests. (#3493)" (#3496)
This reverts commit 7932ba76ec64712771a4a5319e6e09dc79b25e17.
2017-03-22 15:48:59 +01:00
Mikkel Nygaard Ravn
7932ba76ec Improved value coverage of Flutter standard codec. Added unit tests. (#3493) 2017-03-22 14:54:12 +01:00
Adam Barth
f1d40b327a Conform to platform protocol (#3485)
The Android and iOS versions of this function had diverged. This patch
makes the iOS version match the Android version (and what the framework
expects).

Fixes https://github.com/flutter/flutter/issues/8878
2017-03-18 13:35:43 -07:00
Mikkel Nygaard Ravn
c4edec7417 Remove old flutter messaging API (#3482)
Breaking change: removed facilities for JSON and string messaging from FlutterView/FlutterViewController, leaving only binary messaging there. All other use of flutter communication now goes through FlutterMessageChannel and FlutterMethodChannels. Retained use of String and JSON codecs for now.

Companion flutter PR: flutter/flutter#8837
2017-03-17 09:04:59 +01:00
Chris Bracken
24d9d25395 Perform all iOS logging through ASL (#3481)
* Perform all iOS logging through ASL

As of iOS 10, ASL is deprecated and replaced with os_log. ASL calls
continue to result in logging but as of iOS 10.3, only ASL_LOG_NOTICE
level and above are logged.

This change partially reverts 2937f06a15cecf5e9398334617ca156316dae52b,
adding back stdout and stderr redirection, which resulted in loss of
some direct writes to stdout that were necessary for debugging.

This change replaces the direct use of syslog with ASL on iOS, which
Apple has stated will continue to log on iOS >= 10. This eliminates the
need for the previous fwd-declaration of syslog.
2017-03-16 18:50:33 -07:00
Chris Bracken
2937f06a15 Eliminate use of ASL on iOS, --no-redirect-to-syslog flag (#3479)
ASL is deprecated and replaced by os_log() on iOS. As of iOS 10.3,
calling this function breaks our logging altogether. os_log isn't
available pre-iOS 10.0. Rather than implement version checks and
conditional logic, this change eliminates the existing redirection
altogether. All engine code should be logging via the syslog redirection
implemented in Logger_PrintString in dart_runtime_hooks.cc.

Since stdio redirection is eliminated, we eliminate the flag that
controls whether such redirection is enabled.
2017-03-15 13:35:53 -07:00
Chinmay Garde
642e325f83 Wire up memory warning notifications on iOS. (#3477) 2017-03-14 17:12:29 -07:00
Jason Simmons
b1a163858d Send an event to signal memory pressure (#3475)
See https://github.com/flutter/flutter/issues/7561
2017-03-14 15:42:30 -07:00
Jakob Andersen
aa2c2449c4 Fix pod name in Flutter.podspec. (#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
b97103b441 Flutter channels for iOS (#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
6e54f5e31f Remove deprecated SkyApplication and SkyActivity. (#3464) 2017-03-08 10:47:53 -08:00
Jakob Andersen
d40c5bc96c Add podspec to Flutter iOS framework. (#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
be5d971aa7 Use software rendering on iOS simulators without needing a flag. (#3465) 2017-03-06 14:49:25 -08:00
Mikkel Nygaard Ravn
f9c1f5fa53 Remove usage of JDK7 features not available until Android SDK 19+ (#3462) 2017-03-06 13:22:29 +01:00
Mikkel Nygaard Ravn
74de13c0bd FlutterXxxChannel concepts added to support Flutter/Android interop (#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
113f6e3c1e Disable the cache on the GrContext used for decoding images (#3451)
Fixes https://github.com/flutter/flutter/issues/8429
2017-02-27 16:21:21 -08:00
Chris Bracken
335daf1930 Apply iOS status bar padding to flutter views (#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
2868251402 Remove rarely used GLConnection stuff in flow. (#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
df9e9560be Allow plugging in a software backend for rendering in the shell. (#3404) 2017-02-22 15:40:23 -08:00
Chinmay Garde
516b832dbb Remove texture image. (#3434) 2017-02-16 16:26:02 -08:00
Dan Rubel
481049f9cd add kernel support (#3369) 2017-02-16 10:11:38 -05:00
Chinmay Garde
d58696936f Revert ShadowMaskFilter use and roll Skia to 246a3c269d8dc91a47ff27f7b71508bf9e74edf5. (#3409) 2017-02-10 16:01:36 -08:00
Collin Jackson
36dda92316 Call the correct super method in FlutterViewController’s viewDidAppear (#3399) 2017-02-08 06:43:45 -08:00
Chris Bracken
4baeae886a Switch iOS keyboard type if required (#3400)
Ensure that the text input keyboard is reloaded if the view keyboardType
changes.
2017-02-07 18:01:19 -08:00
Chinmay Garde
9053b6c0ab Allow running in debug product mode with checked mode off. (#3398) 2017-02-07 17:01:27 -08:00
Chinmay Garde
0904cf3e2d Bump up limits on the GrResourceCache used for the main GrContext. (#3394) 2017-02-07 16:04:06 -08:00
Chris Bracken
cbf49d0652 Add missing keys from Framework Info.plist (#3393)
Added:
* UIRequiredDeviceCapabilities=[arm64]
* MinimumOSVersion=8.0
2017-02-06 14:51:37 -08:00
Jason Simmons
2466d31edf Fix some Javadoc warnings (#3391) 2017-02-03 16:25:25 -08:00
Jason Simmons
d317fb3b9d Return the expected exit code if sky_shell sees a compilation error during script loading (#3389) 2017-02-03 12:14:35 -08:00
Chris Bracken
c354127d4d Support status bar taps in FlutterAppDelegate (#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
c1524787df Set Platform.executable and executableArguments for Linux sky_shell (#3378) 2017-02-02 12:28:52 -08:00
Chinmay Garde
01afda49b1 [iOS] Ensure FlutterMain is called before interacting with the engine in any way. (#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
2c5f028ddd Fix a race in PlatformView construction (#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
2d54edf0f9 Support scroll to top on iOS statusbar touches (#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
25791da8ab [iOS] Make FlutterInit redundant and deprecate the same. (#3377) 2017-01-31 12:56:55 -08:00
Jason Simmons
8e7d68f823 Return an exit code from sky_shell representing what kind of error occurred (#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
9de4d1530b Deprecate FlutterAppDelegate (#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
2986418cf4 Make the diagnostic "listening on" message consistent with observatory's (#3370) 2017-01-26 15:51:34 -08:00
Jason Simmons
8fea842f02 Add a flag to sky_shell that keeps the process alive after the Dart script completes (#3363) 2017-01-25 12:06:23 -08:00
Chris Bracken
0854b95aba Apply iOS status bar padding only to fullscreen views (#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
fdcd65eedd Exit the non-interactive sky_shell on Linux when the Dart script has completed (#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
16b2964f5c Handle double-height status bar on iOS (#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
0206d20dab Make gen_snapshot compile on Windows (#3355) 2017-01-23 14:12:26 -08:00
Ryan Macnak
adef37080f Adapt to refactoring of snapshot APIs in the Dart VM. (#3354)
Adapt to refactoring of snapshot APIs in the Dart VM.
2017-01-23 12:09:59 -08:00