132 Commits

Author SHA1 Message Date
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
Jason Simmons
d9cc317771 Add flags for disabling the diagnostic server or setting its port (#3352)
Fixes https://github.com/flutter/flutter/issues/7557
2017-01-20 15:18:13 -08:00
Chinmay Garde
94306f4103 Add a Vulkan backend for Fuchsia and Android. (#3282) 2017-01-20 14:37:10 -08:00
Jason Simmons
d394e8a9bf Clear the GPU thread's EGL context only after the GPUSurfaceGL has been destroyed (#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
e573c6b5a6 Do not pass negative selection indexes to InputConnection.setSelection (#3344)
This was causing exceptions on Jellybean
2017-01-17 17:43:24 -08:00
Jason Simmons
c01c8c4a39 Apply window insets using an older API on pre-Lollipop systems (#3340)
Fixes https://github.com/flutter/flutter/issues/6586
2017-01-17 15:36:47 -08:00
Jason Simmons
5f91ff02a9 An API for setting the tag for Flutter log messages on Android (#3335)
Fixes https://github.com/flutter/flutter/issues/7226
2017-01-12 15:47:18 -08:00
Chinmay Garde
a28805731c iOS: Ensure that task observers for VSync callbacks are not bypassed in VSyncWaiterIOS. (#3334) 2017-01-11 14:58:06 -08:00
amirh
13044ca1c4 Add a getter for flutterView in FlutterActivity. This allows fullscreen flutter apps to extend FlutterActivity and do custom stuff with the flutter view. (#3324) 2017-01-05 20:35:00 -08:00
Chinmay Garde
ed5a1d2d37 Fix Linux builds by correctly initializing the GPURasterizer. (#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
b03af31861 Re-format all GN files using gn format. (#3319) 2017-01-03 15:59:48 -08:00
Chinmay Garde
8ae2d455be Display resident memory statistics on the performance overlay. (#3314) 2017-01-03 12:27:30 -08:00
Jason Simmons
c6e008178e Detach the EGL surface from the GPU thread and then destroy it during the FlutterView surfaceDestroyed callback (#3316)
Fixes https://github.com/flutter/flutter/issues/7147
2016-12-16 15:36:33 -08:00
Collin Jackson
b65e1b91b5 Fix reference SkyWindow > FlutterWindow (#3309) 2016-12-13 08:46:16 -08:00
Jason Simmons
60681a233f Do not dispatch UI events if they arrive after the FlutterView has been destroyed (#3306)
Fixes https://github.com/flutter/flutter/issues/7234
2016-12-12 16:30:26 -08:00
Collin Jackson
6ad1261d0c Fix reference to nib file (#3307) 2016-12-12 15:57:33 -08:00
Chinmay Garde
e133b4fb17 Add option to desktop test shells to use an embedded font for consistent unit tests. (#3301)
* This allows the tests to add their own FLX files but still use consistent fonts.
* The test fonts are only embedded on the desktop test shells. The option is not available on mobile platforms.
* Right now, all fonts will resolve to the test font. If we want tests to be able to use the fonts they embed in FLX files but use the test font for platform fallbacks, we will need to add font selector fallbacks. I can do this in an another patch. So far, there are no users of this functionality.
2016-12-09 14:47:49 -08:00
Jason Simmons
2f32e8054d Catch and log exceptions thrown in message listeners provided by apps (#3297)
FlutterView's host message processing methods are invoked from native code,
and the JNI wrappers will abort the process if the Java side has an uncaught
exception.
2016-12-07 14:47:40 -08:00
Jason Simmons
cd04cf5ced Fix invalid JSON in listViews RPC response when a view does not have an isolate (#3295)
Fixes https://github.com/flutter/flutter/issues/7174
2016-12-07 13:11:41 -08:00
Jason Simmons
74c1b2e4d7 Unblock FlutterView.getBitmap if there is no available layer tree (#3294) 2016-12-06 15:12:03 -08:00
Collin Jackson
6794bc2ad7 rename sky -> flutter in shell (#3293) 2016-12-06 14:43:53 -08:00
Chinmay Garde
cdb18a5356 Convert the enable-dart-profiling to a shell argument in SkyActivity. (#3292) 2016-12-05 15:12:48 -08:00
Chinmay Garde
b0220a3af3 [iOS] Don’t perform a per frame platform to UI thread switch. (#3288) 2016-12-01 17:35:40 -08:00
Jason Simmons
98c18190db Initialize the InputConnection with the text plugin's most recent state (either incoming or outgoing) (#3283)
Fixes https://github.com/flutter/flutter/issues/7033
2016-11-30 15:07:37 -08:00
Chinmay Garde
0a3c0b5ecf Allow platform frameworks to snapshot FlutterView contents. (#3281) 2016-11-29 14:39:29 -08:00
Todd Volkert
dd17a112c1 Make dylib filename configurable in Info.plist for iOS (#3277) 2016-11-28 19:44:08 -08:00
Todd Volkert
e25f2a5126 Make flx filename configurable in Info.plist for iOS (#3274) 2016-11-28 14:47:06 -08:00
Chinmay Garde
cd9caf6de6 Update Skia revision to pull in GL native interface construction fixes on iOS. (#3265)
* Update Skia revision to pull in GL native interface construction fixes on iOS.

Fixed in https://skia-review.googlesource.com/c/5212/

* Use the new image encoder API from Skia.
2016-11-23 13:36:14 -08:00
Chinmay Garde
cc45975563 Rework switches in the shell so that they display help text for all flags. (#3259) 2016-11-22 16:58:55 -08:00
Chinmay Garde
44ef3f3d23 Remove defunct reference to //third_party/libjpeg. (#3261) 2016-11-22 16:55:53 -08:00
Chinmay Garde
327d122de9 Disable profiling by default. Allow enabling via --enable-dart-profiling. (#3238) 2016-11-21 11:50:42 -08:00
Adam Barth
21f6aa5270 Composite child views in proper paint order (#3243)
We push a bit up the tree during preroll to learn whether there system
composited layers below each layer. During update scene, we squash down
to paint tasks, which we execute after publishing the new scene.
2016-11-18 12:54:54 -08:00