1914 Commits

Author SHA1 Message Date
Simon Lightfoot
7ccb33b1c0 Fixes negative end selection offset. (flutter/engine#6171) 2018-09-05 12:12:21 -07:00
Michael Klimushyn
605c146d02 Enable transparent FlutterViews (flutter/engine#6163)
- Changes rasterizer to clear the canvas with `SkColor_TRANSPARENT`
- Removes the unused `backgroundColor` param from `FlutterView.java`
2018-09-05 10:44:02 -07:00
Jason Simmons
2e2d63b213 Remove obsolete discovery mechanism from FlutterView (flutter/engine#6157) 2018-09-05 10:01:33 -07:00
Chinmay Garde
e226cce0b6 Fix windows build. (flutter/engine#6162) 2018-09-04 18:23:29 -07:00
Jason Simmons
c8316af625 Add some more logs for diagnosing screenshot failures (flutter/engine#6156)
Fixes https://github.com/flutter/flutter/issues/21228
2018-09-04 14:38:10 -07:00
Kirill Nikolaev
fe8d1b47e2 Unregister onFrameAvailable callbacks when a TextureEntry is released. (flutter/engine#6079)
Otherwise the callbacks may be called after FlutterNativeView is destroyed and is null.

Also defensively check for whether the texture is already released in the callback because the callback may be called from another thread by a stale reference (see the comment).

This closes https://github.com/flutter/flutter/issues/20951.
2018-09-04 06:31:01 -07:00
Chinmay Garde
7be525a816 Fix windows embedder builds. (flutter/engine#6137) 2018-08-31 20:23:53 -07:00
Chinmay Garde
f2049c7687 Allow embedders to specify software renderer configs. (flutter/engine#6133) 2018-08-31 20:03:06 -07:00
James D. Lin
81ba4c9458 Mark deprecated Flutter iOS APIs as unavailable (flutter/engine#6124)
The following were previously marked as deprecated over a month ago:
* `FlutterStandardBigInteger`
* `-[FlutterDartProject initFromDefaultSourceForConfiguration]`

Remove their implementations and mark them as unavailable.
2018-08-31 12:33:57 -07:00
James D. Lin
d65c8d71d9 Add a -[FlutterViewController splashScreenView] property (flutter/engine#6112)
Add a `-[FlutterViewController splashScreenView]` property

Add a `-[FlutterViewController splashScreenView]` property that
clients can use to customize the launch view (issue #17140).
2018-08-30 15:13:28 -07:00
jslavitz
6638f518c6 entering a character with a selection deletes the selection (flutter/engine#6113) 2018-08-30 10:29:04 -07:00
Chinmay Garde
1fcba44904 Allow embedders to set the root surface transformation. (flutter/engine#6085) 2018-08-28 14:13:49 -07:00
Jonah Williams
cce79157ff expose bold text flag in accessibility features for iOS (flutter/engine#6072) 2018-08-28 12:38:54 -07:00
Amir Hardon
dc470dc12a Convert synthesized Android motion events to long and not to int. (flutter/engine#6103) 2018-08-28 12:12:47 -07:00
Jonah Williams
02d928b047 Unconditionally set resource id to empty string (flutter/engine#6096) 2018-08-27 10:54:07 -07:00
Chinmay Garde
366a898572 Allow embedders to invalidate FBO bindings after present. (flutter/engine#6084) 2018-08-24 16:53:13 -07:00
amirh
00c385f497 Allow passing extra creation parameters for embedded Android views. (flutter/engine#6081)
This allows plugins to pass extra parameters from the Dart side to the
platform view constructor.
2018-08-24 11:15:14 -07:00
Chinmay Garde
20b525fc88 Allow building the embedder API for the target toolchains. (flutter/engine#6069) 2018-08-22 16:42:47 -07:00
Chinmay Garde
86e253fadd Alllow access to Flutter engine, Dart & Skia versions in the Shell API. (flutter/engine#6060) 2018-08-21 08:52:24 -07:00
amirh
eb77c3044d Support LTR/RTL layout directions for embedded Android views. (flutter/engine#6057) 2018-08-20 16:22:38 -07:00
amirh
bf9aa07b49 Delay the removal of the onDrawListener. (flutter/engine#6052)
In Android O removing the ViewTreeObserver.onDrawListener from the
listener call crashes. Instead we post a runnable to remove it.
2018-08-20 12:13:26 -07:00
Jonah Williams
8c942fb413 use setContentDescription for controls on Android (flutter/engine#6050) 2018-08-20 09:30:13 -07:00
amirh
31d1346006 Add views added to the WindowManager into the presentation view tree. (flutter/engine#6043)
The default WindowManager implementation in Android's Presentation is
delegating addView/removeView/updateViewLayout calls to the global
WindowManager.
This can result in a crash when an embedded view is trying to e.g show a
PopupWindow.

This change adds a custom WindowManager that overrides
addView (and removeView/updateViewLayout) and adds the view to the
presentation's view tree.

Note that views might keep a reference to the window manager which
might be an issue when we move a view from one virtual display to
another (due to a resize). For this reason when re-sizing we are not
creating a new window manager for the new presentation, but updating the
window manager's references to be relevant for the new presentation and
re-use it.
2018-08-17 17:01:42 -07:00
James D. Lin
e6e35ee205 Fix potential null pointer dereference in FlutterDartProject (flutter/engine#6035)
If `FlutterDartProject` found an `FLTLibraryPath` entry in an iOS
application's `Info.plist`, it assumed that values that were valid
filesystem paths were paths to bundles.  If the attempt to retrieve
the `NSBundle` fails, `FlutterDartProject` ignored the failure and
then would assign `nil` to a C++ `std::string`, resulting in a null
pointer dereference.

Add some failure checks to prevent this.
2018-08-16 17:40:33 -07:00
Chinmay Garde
4555fcca31 Re-apply "Log Tonic errors with FML_LOG" (flutter/engine#6026)
This reverts commit 201900fd6354a0f1a9318e31f101e05aeea612bd and updates the tonic SHA.
2018-08-15 14:28:24 -07:00
Martin Kustermann
258a95c9fa Switch all embedders to use platform_strong.dill instead of platform.dill (the flutter_tester binary already does this) (flutter/engine#6024) 2018-08-15 17:45:11 +02:00
Chinmay Garde
201900fd63 Revert "Log Tonic errors with FML_LOG" (flutter/engine#6021)
Reverts flutter/engine#6015

This is causing the Windows bots to fail.
2018-08-14 22:22:28 -07:00
Chinmay Garde
33485e47de Fix Android Vulkan builds to account for resource context management API updates. (flutter/engine#6020) 2018-08-14 22:20:05 -07:00
Jason Simmons
ee9fe6a5fc Log Tonic errors with FML_LOG (flutter/engine#6015) 2018-08-14 17:04:38 -07:00
Jason Simmons
c761e6e2a0 Detach the resource context before shutting down the IO thread (flutter/engine#6009) 2018-08-14 13:15:42 -07:00
Niko Yuwono
9aac5e05f9 Add NSNull check in setSystemChromeSystemUIOverlayStyle (flutter/engine#6011) 2018-08-14 11:45:45 -07:00
James D. Lin
9ad6ac6c4a Don't require FLTLibraryPath and FLTAssetsPath from the main NSBundle (flutter/engine#5986)
We'd like the ability to add Flutter to existing iOS applications
without requiring that they set `FLTLibraryPath` and `FLTAssetsPath`
in the main bundle's `Info.plist`.

1. Modify `-[FlutterDartProject initWithPrecompiledDartBundle:]` to
   support setting the library and assets path from the specified
   `NSBundle` instead.

2. If no `NSBundle` is explicitly specified, look for one with a
   default bundle identifier ("io.flutter.flutter.app") before
   falling back to the main NSBundle.

Also remove `+[FlutterDartProject pathForFlutterAssetsFromBundle:]`
because we don't use it internally, and it isn't exposed in the
header file.
2018-08-14 10:45:05 -07:00
Chinmay Garde
d9d6c2e825 Remove unused argument on Animator, Engine and PlatformView delegates. (flutter/engine#6007)
When these delegate methods were initially added, it was expected that a single
shell would be able to own mutliple platform views, engines and animators. This
plan was abandoned in favor of creating multiple shells with their own platform
views, engines, etc.. The arguments were meant to ease the disambiguate the
instances of the variaous objects managed by the shell. This is no longer
necessary.
2018-08-13 16:16:10 -07:00
Chinmay Garde
cef3ee517c Check the kernel header magic to determine if a mapping may be a valid kernel blob. (flutter/engine#5997) 2018-08-10 15:12:48 -07:00
nathanrogersgoogle
df71c78332 Add a delay to Animator::BeginFrame's NotifyIdle call (flutter/engine#5972)
This change adds a delay before Animator::BeginFrame calls its
delegate's OnAnimatorNotifyIdle.  This is because under certain
workloads, such as our parent view resizing us, which is communicated
via viewport change events, we won't have a frame scheduled yet in the
animator, despite the fact that we will go on to schedule a frame once
the viewport event arrives.

In Fuchsia's resizing performance test, on our reference high end x86-64
hardware, the previous logic was resulting in a ~45ms garbage collection
right after the first frame of an animation.
2018-08-10 13:28:09 -07:00
Stanislav Baranov
b4ce259bcf Fix codepush breakage caused by #5954. (flutter/engine#5996) 2018-08-10 13:23:51 -07:00
amirh
af25774b82 Cast MotionEvent timestamps to Number. (flutter/engine#5994)
Dart might choose to marshall the timestamps to a Java Long or Integer.
Casting directly to int was crashing when the timestamp wass a Long.
2018-08-10 12:46:49 -07:00
Todd Volkert
306464cb6f Reference platform_strong.dill, not platform.dill (flutter/engine#5992) 2018-08-10 11:55:36 -07:00
Ben Konyi
3b80ac90f5 Fixed invalid call site of runWithEntrypointAndCallback (flutter/engine#5984) 2018-08-09 12:42:59 -07:00
Ben Konyi
b5aa93de7c Removed callback for HeadlessDartRunner (flutter/engine#5983) 2018-08-09 11:21:51 -07:00
Alexander Aprelev
5de4538b21 Fix IsolateStart event kind. (flutter/engine#5978) 2018-08-08 15:45:26 -07:00
Keerti Parthasarathy
96656470a0 Annotate deprecated methods with @Deprecated (flutter/engine#5976) 2018-08-08 13:02:41 -07:00
Jonah Williams
f9378b453c make ios text affinity behavior match android (flutter/engine#5971) 2018-08-08 10:54:29 -07:00
amirh
8eb80d3e3d Complete the AndroidView resize call only after a new frame is ready. (flutter/engine#5968)
This allows the framework to know that a frame with the resized view is
ready and to behave deterministically to workaround the jank issue
described in flutter/flutter/19572
2018-08-07 18:56:34 -07:00
amirh
9d38d63147 Allow freezing a texture. (flutter/engine#5938)
This is needed to avoid jank when resizing an embedded Android view.
See
https://github.com/flutter/flutter/issues/19572#issuecomment-410400724
2018-08-07 14:43:19 -07:00
Ben Konyi
10e272f154 Persist DartCallbackCache contents across launches (flutter/engine#5947)
* Updated DartCallbackCache to write callback cache to disk which is
restored on engine startup
* Ensure cache isn't moved off disk in iOS
2018-08-07 14:37:19 -07:00
Todd Volkert
21c7a646ca Don't implicitly fall through in switch statement (flutter/engine#5964) 2018-08-07 13:18:26 -07:00
Jonah Williams
3b5e35f4b9 Apply translation to accessibility tree when in landscape (flutter/engine#5950) 2018-08-07 13:09:18 -07:00
Ben Konyi
6d5fce84ae Reland "Updated background execution implementation for Android" (flutter/engine#5954)
* Reland "Updated background execution implementation for Android" w/ JNI fixes for merge breakages

This reverts commit 4a12df930a9d0dc8db3410cd557f35f4a584dbd0.
2018-08-07 12:42:22 -07:00
Alexander Markov
4a12df930a Revert "Updated background execution implementation for Android" (flutter/engine#5949)
This reverts commit e9e6e8a2bf81e394a5903e7cc573644225bf8b95.
2018-08-06 14:10:23 -07:00