- 08 Aug, 2018 1 commit
-
-
amirh authored
Resizing an AndroidView happens asynchronously (as it requires thread hopping from the ui thread to the platform thread). While waiting for the resize to complete the framework does exactly when the embedded view has been resized. This leads to pretty bad jank as the framework might paint the embedded view with a wrong size. We're working around this by freezing the texture frame while resizing until we are sure that the next frame has the new size. This is how it looks with the workaround: This is how it looks before and after the workaround: Before (janky) | After (less janky) :--------|---------:  |  This depends on flutter/engine#5938. Additionaly right now the engine completes the resize call immediately, a following PR will change it to complete after a frame with the new size is ready.
-
- 07 Aug, 2018 1 commit
-
-
Amir Hardon authored
This PR adds 2 features to RenderAndroidView and AndroidView: 1. Hit testing behavior Adds a `PlatformViewHitTestBehavior` which is similar to `HitTestBehavior` without the `deferToChild` option (as platform views don't have child render objects) and with a `transparent` option which prevents it from forwarding any events to the Android view. 2. MotionEvent recomposing logic FlutterView and the framework `converter.dart` are working together to transform each Android MotionEvent object into one or more `PointerEvent` objects. This PR adds the reverse logic (in _MotionEventDispatcher which is used by RenderAndroidView) which turns a stream of PointerEvent objects into MotionEvent objects. The correctness of the recomposing logic is tested in an integration test which will land in a separate PR (the unit test PR is pretty big, trying to keep as many bite-size PRs for reviewer's convenience)
-
- 20 Jul, 2018 1 commit
-
-
amirh authored
RenderAndroidView is responsible for sizing and displaying an embedded Android view. AndroidView is responsible for creating and disposing the Android view and is using RenderAndroidView to display it.
-