Commit Graph

3106 Commits

Author SHA1 Message Date
Zachary Anderson
cfef71d946 [Android] Cleanup in FlutterActivityDelegate (flutter/engine#4357) 2017-11-13 14:13:04 -08:00
Zachary Anderson
69f6500182 View destroy listener (flutter/engine#4347)
[Android] Allow persisting a FlutterNativeView across activities.
2017-11-13 13:56:48 -08:00
Jason Simmons
63b797fd55 Delete the native view when destroying the FlutterView (flutter/engine#4356)
Fixes https://github.com/flutter/flutter/issues/12996
2017-11-13 13:16:48 -08:00
Mikkel Nygaard Ravn
025a7673b2 Align iOS event channel semantics to Android counterpart (flutter/engine#4353) 2017-11-13 15:34:29 +01:00
Mikkel Nygaard Ravn
0f1c5d268d Make EventChannel survive hot restart on Android (flutter/engine#4350) 2017-11-13 07:47:36 +01:00
amirh
b0dc211d49 Load animation frames to GPU textures from the IO thread (flutter/engine#4352) 2017-11-10 12:52:32 -08:00
Alexander Markov
ec821c2367 Revert "Enable Dart 2.0 fixed-size integers in Flutter (#4337)" (flutter/engine#4344)
This reverts commit d0d48f6329.
2017-11-10 11:08:42 -08:00
Greg Spencer
6f2797a88d Adding Rect.expandToInclude and Rect.longestSide (flutter/engine#4309)
Adding Rect.expandToInclude and Rect.longestSide to make the Rect API more symmetric.
2017-11-09 16:37:21 -08:00
amirh
98d001e88f expose a Duration object from ui.FrameInfo (flutter/engine#4345) 2017-11-09 14:03:19 -08:00
Jason Simmons
1503dd45a8 Log stack traces from exceptions thrown by calls from native into Java (flutter/engine#4346) 2017-11-09 13:04:12 -08:00
Zachary Anderson
9809d5f8e7 [Android] Pulls the native platform view out of FlutterView (flutter/engine#4338) 2017-11-09 12:10:00 -08:00
Jason Simmons
d519c2cbf2 Allow rendering of frames in a paused animator during a change to screen dimensions (flutter/engine#4333)
Fixes https://github.com/flutter/flutter/issues/12886
2017-11-09 10:04:51 -08:00
Jason Simmons
895bbeabed In GetTexture, do not insert missing IDs into the texture registry map (flutter/engine#4339)
Fixes https://github.com/flutter/flutter/issues/12924
2017-11-09 10:04:41 -08:00
amirh
d844a1dbff Make the public ui.Codec API Future based instead of callback based. (flutter/engine#4341) 2017-11-09 09:56:36 -08:00
Alexander Markov
d0d48f6329 Enable Dart 2.0 fixed-size integers in Flutter (flutter/engine#4337) 2017-11-09 09:42:40 -08:00
P.Y. Laligand
598b293898 [fuchsia] Allow flutter_app to be included in non-Fuchsia toolchains. (flutter/engine#4342)
A flutter_app target might be declared in a build file alongside some host tool.
The intent of the assertion seemed to be restricting the use of the template to the Fuchsia codebase.
2017-11-08 18:33:09 -08:00
Chris Bracken
6f144d0bde Revert "Roll Fuchsia buildtools to 85907c59e97527d79bbfdfd849d8e85c24959cc5 (#4331)" (flutter/engine#4340)
With the update to HEAD of the Fuchsia buildtools repo, the new clang
toolchain picked up caused link-time breakage in android x86_64
libFlutter.so builds.

Sample log:
https://build.chromium.org/p/client.flutter/builders/Linux%20Engine/builds/1974/steps/build%20android_debug_x64/logs/stdio

Sample failure:
FAILED: libflutter.so libflutter.so.TOC lib.stripped/libflutter.so
../../third_party/android_tools/ndk/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld.gold: error: obj/flutter/shell/platform/android/libflutter/android_context_gl.o: unsupported reloc 42 against global symbol std::__ndk1::num_put<char, std::__ndk1::ostreambuf_iterator<char, std::__ndk1::char_traits<char> > >::id

This reverts commit fecc7aa281.
2017-11-08 16:48:00 -08:00
Chris Bracken
7834aca9f6 Roll garnet to b3ba6b6d6ab8ef658278cc43c9f839a8a8d1718e (flutter/engine#4335)
* Roll garnet to b3ba6b6d6ab8ef658278cc43c9f839a8a8d1718e

Also includes a buildroot patch to pick up new dependency:
  build/config/fuchsia/sdk.gni

This fixes a build breakage in
garnet/public/lib/fxl/strings/string_view_unittest.cc wherein a variable
'sw5' was declared but the test erroneously tested against 'sw4' from
the previous test.

* Update license script for garnet

Reflects structural changes in directories we do not depend on. This
filters out the following directories in addition to what was already
filtered:
  garnet/drivers
  garnet/packages
  garnet/public/build/
  garnet/public/rust/

* Update licenses
2017-11-08 15:25:07 -08:00
mikejurka
f70c94e381 Fix low-res rasterized images on Fuchsia. (flutter/engine#4325)
Plumb through Scenic display metrics to use during
Preroll.
2017-11-08 14:59:54 -08:00
Ryan Macnak
6b1c7131df Roll tonic to da66b94839f788a0bffc34fd9bdfef3360af8c18. (flutter/engine#4332)
Update to moved repository.

Issue https://github.com/flutter/flutter/issues/9998
2017-11-08 14:04:29 -08:00
Chris Bracken
fecc7aa281 Roll Fuchsia buildtools to 85907c59e97527d79bbfdfd849d8e85c24959cc5 (flutter/engine#4331)
* Roll Fuchsia buildtools to 85907c59e97527d79bbfdfd849d8e85c24959cc5

This also updates Flutter buildroot to a6e52dbb776c45cc8c57d7143b8eb8b2e762fdfb
which disables -Wtautological-constant-compare temporarily until
https://reviews.llvm.org/D39462 lands in clang. This is in line with
Fuchsia's compiler options.

* Apply clang-format diffs

No logical changes. This applies clang-format from the latest Fuchsia
buildtools to the engine codebase.
2017-11-08 11:18:17 -08:00
Chris Bracken
5ef7ef761f Respond to safe area inset changes (flutter/engine#4330)
On iOS 11 and above, update viewport padding and notify the framework
when changes to safe area insets occur.
2017-11-07 18:26:59 -08:00
amirh
a036ba85c1 Implement a SingleFrameCodec and return it for non animated images (flutter/engine#4329) 2017-11-07 14:07:02 -08:00
amirh
bccf9371f3 Decode animation frames and pass FrameInfos to dart (flutter/engine#4324)
https://github.com/flutter/flutter/issues/204
2017-11-06 10:36:02 -08:00
Chris Bracken
f3291e79e4 Temporaribly disable bottom safe area padding on iOS (flutter/engine#4322)
There are two different sets of view insets that applications may want
to track in order to avoid unwanted interaction with system UI:

1. OS UI that effectively shrinks the Flutter view from a UX point of
   view: e.g., when the keyboard opens, it occludes the bottom of the
   screen and the view should be adjusted such that the bottom, for the
   purposes of scrolling is just above the keyboard.
2. OS UI that is overlaid over the application, but into which the
   application should draw. e.g., the Home indicator on the iPhone X
   typically appears near the bottom of the screen, overlaid over app
   content. Content should be rendered within this 'safe area' but apps
   should avoid requiring user interaction there. For example, list
   views may want to include some small amount of additional padding to
   ensure the last list item can scroll above this area.

Since Flutter does not currently distinguish between these two cases,
this patch disables the bottom safe area inset until API is added to
support these separately.
2017-11-03 14:20:46 -07:00
amirh
92a0de09f8 Followup on post-merge comments for 9b03bcd7a (flutter/engine#4321) 2017-11-03 11:44:23 -07:00
Ian Hickson
55fb84e01b Support multiple values in SystemChrome.setPreferredOrientations (flutter/engine#4320) 2017-11-03 10:28:31 -07:00
Zachary Anderson
a962edcc28 Fix comment in last commit (flutter/engine#4315) 2017-11-03 08:53:42 -07:00
amirh
9b03bcd7a1 Initial implementation of ui.Codec (a wrapper for SkCodec) (flutter/engine#4318)
This is the first step to support animated GIFs: flutter/flutter#204

TBD in following CLs:
 * Implement Codec.getNextFrame.
 * Add Framework side support to run animations.
2017-11-02 17:56:44 -07:00
Michael Goderbauer
248cd2ba83 Add isTextField and isFocused flags for iOS (flutter/engine#4316) 2017-11-02 16:02:16 -07:00
Chris Bracken
5c6abf1dbb Correct behaviour for rangeForCharacterAtIndex (flutter/engine#4319)
Previously it always fell through to a zero-length character range at
the specified position.
2017-11-02 15:16:06 -07:00
Zachary Anderson
9365d7465e Reland: [GN] Don't set dart_host_toolchain (flutter/engine#4314) 2017-11-02 10:04:06 -07:00
Adam Barth
3cf03194e8 [fuchsia] Update package() BUILD.gn syntax (flutter/engine#4313)
Update the package() template to match the new syntax. This change keeps this
package working the same way it does currently (i.e., being included in the
system image). In the future, we'll want to remove this annotation and separate
this package from the system image.
2017-11-02 09:15:25 -07:00
Mikkel Nygaard Ravn
9184c2fd2f Fix compile error in scene_update_context (flutter/engine#4311) 2017-11-02 12:22:32 +01:00
xster
088fd801f3 Make the text selection code more defensive (flutter/engine#4291)
* Make the text selection code more defensive

* format

* Move validation to a method

* Fix math

* rename
2017-11-02 03:36:52 -07:00
Chinmay Garde
d0ec6228a5 Add texture support (eg video, camera) (flutter/engine#4159) 2017-11-02 10:57:29 +01:00
Mikkel Nygaard Ravn
a802554df1 Revert "[GN] Don't set dart_host_toolchain (#4308)" (flutter/engine#4310)
This reverts commit 3dc8394e2a.
2017-11-02 09:09:15 +01:00
Zachary Anderson
3dc8394e2a [GN] Don't set dart_host_toolchain (flutter/engine#4308) 2017-11-01 13:36:18 -07:00
Michael Goderbauer
dcec1fed2c Identify text fields as such to a11y on Android (flutter/engine#4299)
* Identify text fields as such to a11y on Android

* Add focus flag
2017-11-01 12:59:03 -07:00
Zachary Anderson
7e6e6f48db [ios] Adds an API for running Dart code without a PlatformViewIOS (flutter/engine#4294) 2017-11-01 12:16:51 -07:00
Jason Simmons
5e13e93acd Request slight hinting when rendering glyphs with Skia (flutter/engine#4307)
Fixes https://github.com/flutter/flutter/issues/12820
2017-11-01 11:47:09 -07:00
Jason Simmons
89290a0c46 Validate UTF-16 input in ParagraphBuilder::addText (flutter/engine#4300)
Fixes https://github.com/flutter/flutter/issues/12772
2017-11-01 11:26:01 -07:00
P.Y. Laligand
c0f56ceaa4 Refer to Flutter's base via the build argument. (flutter/engine#4305)
This fixes the Fuchsia build.
2017-10-31 17:28:35 -07:00
Chris Bracken
1f58a96098 Use safe area padding on hide keyboard on iOS (flutter/engine#4304)
On hide keyboard, reset the bottom padding to the safe area inset on
devices running iOS 11 or higher.
2017-10-31 17:17:38 -07:00
Chinmay Garde
0ac48e7bd8 Add fml::WeakPtr and update users in Shell. (flutter/engine#4296) 2017-10-31 16:55:36 -07:00
Chinmay Garde
34624184ee Ensure that public framework headers can be cleanly imported from outside the engine root. (flutter/engine#4303) 2017-10-31 16:25:02 -07:00
Chris Bracken
285c6840ab Support iPhone X safe area insets (flutter/engine#4302)
This change exposes the view safe area insets (introduced in iOS 11) to
the framework via MediaQuery.of(context).padding. Safe area insets are
the view insets (padding) inside of which content can be relied on to
display without truncation/clipping, as would occur with e.g. the iPhone
X sensor notch.

As this API was added in iOS 11, we place it behind a runtime guard
checking OS level.

Until the runtime support for @avialable lands in the next Fuchsia
buildtools rev, ignore -Wunguarded-availability-new around the safe area
insets check and use an FML runtime check instead.
2017-10-31 14:30:07 -07:00
mikejurka
06355f7c80 Vulkan: Enable Fuchsia memory extensions on initialization. (flutter/engine#4301)
Refactor querying of supported Vulkan extensions.
2017-10-31 12:08:27 -07:00
Ian Hickson
7b19e9157d Add TextPosition.== and hashCode, and some text API docs (flutter/engine#4283) 2017-10-31 10:39:44 -07:00
Michael Goderbauer
3a386bd49e Android SeekBars announce their value (flutter/engine#4289)
* Android SeekBars announce their value

* style
2017-10-31 10:03:30 -07:00