189 Commits

Author SHA1 Message Date
Chinmay Garde
d73e56bff3 Package test fonts on the debug runtime mode. (flutter/engine#3582) 2017-04-10 15:41:09 -07:00
Mikkel Nygaard Ravn
f3459f540e Add convenience accessors to get arguments from MethodCall w/o unchecked warnings (flutter/engine#3559) 2017-04-09 17:36:05 +02:00
Mikkel Nygaard Ravn
eb4cc7f8e9 Update unit test to also handle null and zero-byte message differently (flutter/engine#3579) 2017-04-09 00:34:43 +02:00
Mikkel Nygaard Ravn
12745a7b02 Distinguish between null platform message and one with zero-byte payload (flutter/engine#3577) 2017-04-09 00:07:28 +02:00
Chris Bracken
250cd40ba9 Use Foundation MIN,MAX in place of C++ std::min,max (flutter/engine#3578)
Maintains consistency with other Objective-C code in the engine and
allows us to eliminate a #include.
2017-04-08 12:58:27 -07:00
Jason Simmons
b3ce239c83 Backport JSONObject.wrap in order to support Jellybean (flutter/engine#3566) 2017-04-06 10:15:06 -07:00
Jakob Andersen
b352804f69 Copy Flutter.podspec to engine out directory. (flutter/engine#3560)
So `flutter run --local-engine=...` will work out of the box.

Fixes flutter/flutter#9154.
2017-04-05 09:16:53 +02:00
Chris Bracken
71806383c1 Update selection base when deleting surrogates (flutter/engine#3558)
Ensure selection base is updated when deleting surrogates

This fixes a bug in which the selection base was not updated when
deleting at index of the trailing char of a Unicode surrogate,
introduced in d3149a5875404a4dacc7e4dde9c96045e2cbe6e5.

Minor refactor to consolidate logic around NSRange.
2017-04-03 23:12:02 -07:00
Chris Bracken
1d0e7a6a9a Handle Unicode surrogates in FlutterTextInputView (flutter/engine#3557)
* Handle Unicode surrogates in FlutterTextInputView

Fixes a bug introduced in d3149a5875404a4dacc7e4dde9c96045e2cbe6e5.
2017-04-03 21:49:30 -07:00
Chris Bracken
d3149a5875 Maintain FlutterTextInputView text in NSMutableString (flutter/engine#3554)
* Maintain FlutterTextInputView text in NSMutableString

We were converting from/to NSString at the interface of
FlutterTextInputView; instead use NSMutableString to maintain the
internal buffer.

Eliminates nsstring_utils.{h,mm} which no longer has any users.
2017-04-03 17:23:07 -07:00
Chinmay Garde
e0fed1432c Remove deprecated FlutterInit. (flutter/engine#3550) 2017-04-03 11:51:38 -07:00
Jason Simmons
fc666c4b62 Remove dart:jni (flutter/engine#3546)
Fixes https://github.com/flutter/flutter/issues/9129
2017-03-31 13:07:52 -07:00
Collin Jackson
732e118f07 Revert "Make FlutterActivity extend from FragmentActivity (#3529)" (flutter/engine#3545)
This reverts commit 41ced5aabc9dca1d27d9a1c9af2dd23f0a10916c.
2017-03-31 09:06:07 -07:00
Mikkel Nygaard Ravn
4a56788ec5 Ensure platform msg completer is invoked on ios even if no handler has been registered (flutter/engine#3544) 2017-03-30 12:49:09 +02:00
Chinmay Garde
000807898d Cleanup timeline markers. (flutter/engine#3540)
* Name the platform thread in the timeline. This does not affect (nor is it affected by) the pthread name set by the embedder.
* Make it easier in the timeline to see not only when the frame was request, but also when that frame request was fulfilled.
* Trace message loop wakes.
2017-03-29 13:04:25 -07:00
Mikkel Nygaard Ravn
4fcad872a8 Platform channel API cleanup (retake) (flutter/engine#3539) 2017-03-29 13:43:54 +02:00
Mikkel Nygaard Ravn
f57fbee942 Revert "Flutter channel API cleanup (#3532)" (flutter/engine#3538)
This reverts commit 00319038594b85b1b26a12d0769cea9b2d7ff05d.
2017-03-29 12:08:39 +02:00
Mikkel Nygaard Ravn
0031903859 Flutter channel API cleanup (flutter/engine#3532) 2017-03-29 11:38:14 +02:00
Jason Simmons
9961a50959 Copy platform message buffers into byte arrays passed via JNI (flutter/engine#3536)
The Java message object may be held by user-provided message handlers beyond
the lifetime of the raw blink::PlatformMessage and its data buffer
2017-03-28 17:15:01 -07:00
Jason Simmons
616d1c9b1e Release JNI references to ByteBuffers passed from native to Java (flutter/engine#3535) 2017-03-28 13:58:42 -07:00
Jason Simmons
945b6048da Package the stripped build of libflutter.so inside flutter.jar (flutter/engine#3531) 2017-03-27 17:52:12 -07:00
Collin Jackson
41ced5aabc Make FlutterActivity extend from FragmentActivity (flutter/engine#3529)
FragmentActivity is required for plugins that use auto managed Google APIs, such as Google Sign-In. Requires flutter/flutter#9036 to land so that gradle builds include FragmentActivity.
2017-03-27 16:53:09 -07:00
Chinmay Garde
becbe8fcc8 Remove dependency on FontConfig. (flutter/engine#3530) 2017-03-27 16:11:57 -07:00
Chinmay Garde
6b31213bc7 Rename sky_shell to flutter_tester. (flutter/engine#3521) 2017-03-27 13:09:36 -07:00
Jason Simmons
3cf3a20d3d Fix Javadoc on FlutterMethodChannel (flutter/engine#3522) 2017-03-24 18:23:51 -07:00
Chinmay Garde
7beff03713 Remove libsky_shell.so to libflutter.so. (flutter/engine#3517) 2017-03-24 16:25:33 -07:00
Chinmay Garde
f788187209 Directly generate flutter.jar without APK generation. (flutter/engine#3516) 2017-03-24 15:51:51 -07:00
Chinmay Garde
d9bca1929d Avoid linking to GL from the Linux test shell. (flutter/engine#3512) 2017-03-23 16:22:40 -07:00
Chinmay Garde
e037d8e45f Remove last reference to //base from //flutter/shell/platform/linux. (flutter/engine#3511) 2017-03-23 16:01:35 -07:00
Chinmay Garde
3a61e688df Remove the interactive mode on the Linux test shell. (flutter/engine#3510) 2017-03-23 15:52:54 -07:00
Chinmay Garde
6ff5a41327 Remove uses of //base from all //flutter projects and replace them with //fml variants. (flutter/engine#3492) 2017-03-22 15:42:51 -07:00
Mikkel Nygaard Ravn
6dd8ce0317 Better value coverage of Flutter standard codec on iOS. Unit tests added. (flutter/engine#3498) 2017-03-22 20:23:23 +01:00
Mikkel Nygaard Ravn
0027d03af9 Revert "Improved value coverage of Flutter standard codec. Added unit tests. (#3493)" (flutter/engine#3496)
This reverts commit 3f0d2dc586be84675683e9eee607c2b28bad75eb.
2017-03-22 15:48:59 +01:00
Mikkel Nygaard Ravn
3f0d2dc586 Improved value coverage of Flutter standard codec. Added unit tests. (flutter/engine#3493) 2017-03-22 14:54:12 +01:00
Adam Barth
401710fd27 Conform to platform protocol (flutter/engine#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
ac754da610 Remove old flutter messaging API (flutter/engine#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
b4f50b27ce Perform all iOS logging through ASL (flutter/engine#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 d67972d649157582358876f90a99577cb3708e82,
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
d67972d649 Eliminate use of ASL on iOS, --no-redirect-to-syslog flag (flutter/engine#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
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