3051 Commits

Author SHA1 Message Date
liyuqian
6b742994a3 Smooth out iOS irregular input events delivery (flutter/engine#11817)
Fixes https://github.com/flutter/flutter/issues/31086

This patch is a lower level implementation of
https://github.com/flutter/flutter/pull/36616 that would only impact iOS
engine, and host unittests.
2019-09-10 11:18:01 -07:00
Chinmay Garde
5d6d4e450d Don't launch the observatory by default on each embedder unit-test invocation. (flutter/engine#12087)
There is no test to assert this and it unnecessarily slows down the test
harness and opens tons of port on the host.
2019-09-09 19:58:36 -07:00
Chinmay Garde
9b9635391c Guard availability of user notification related methods to iOS 10.0 (flutter/engine#12084)
* `NS_AVAILABLE_IOS(10_0)` makes us tell our compiler that the method needs
  to be stamped into the TU but we promise to do stuff in it only on iOS 10.0
  and above.
* `@availability` ensures that if those methods are called on iOS versions less
  than 10.0, we will do nothing with it. This guards us against the case where
  iOS introduced the functionality privately in older versions of iOS.
2019-09-09 20:25:29 -04:00
Maurice Parrish
af3929e2aa Add capability to add AppDelegate as UNUserNotificationCenterDelegate (flutter/engine#9864) 2019-09-09 14:54:00 -07:00
shoryukenn
58c3192c32 Improve Unicode handling on Windows (flutter/engine#11899)
Significantly improves the behavior of non-ASCII text input on Windows. Correctly
processes incoming character events as UTF-16, and for now uses UTF-32 for
the text model so that the existing index-based logic will work much more often.

Future work is still needed, but this will handle far more cases correctly.
2019-09-08 12:13:59 -07:00
xster
1488856a85 Annotate nullability on FlutterEngine to make swift writing more ergonomic (flutter/engine#11808) 2019-09-08 00:25:07 -07:00
Kaushik Iska
2d656f6f32 Revert "Manage resource and onscreen contexts using separate IOSGLContext objects (#11798)" (flutter/engine#12055)
This reverts commit 9297908d54bf20f8cd8dd81849c95ff8528683e3.
2019-09-06 18:12:16 -07:00
George Wright
9297908d54 Manage resource and onscreen contexts using separate IOSGLContext objects (flutter/engine#11798)
Manage resource and onscreen contexts using separate IOSGLContext objects
2019-09-06 16:44:49 -07:00
Kaushik Iska
3a78a5e281 [flutter_runner] Refactor our build rules to make them more inline with topaz. (flutter/engine#12034)
Also add flutter tool support for topaz in-tree builds that already have
a dependency on the framework repository.

After this the only major changes left are profiler symbols and
Framework mode.

This should make making topaz use our buldrules significantly easier.
2019-09-06 15:30:37 -07:00
Emmanuel Garcia
61d1fabcae Document dependencies and remove support-v13 (flutter/engine#11912) 2019-09-06 15:25:59 -07:00
Kaushik Iska
ed39cbade1 [flutter_runner] Kernel platform files can now be built in topaz (flutter/engine#12016)
- Tested this compatibility in topaz repo. The build rules can now be
used to build kernel_platform_files in topaz tree, after this change we
can migrate the platform*dill and vm*snapshot files in topaz to use the
engine built artifacts.

- Also removes some namespace conflicts for dart configuration.
2019-09-06 14:34:26 -07:00
Kaushik Iska
bb74945d36 [flutter_runner] Plumb Flutter component arguments to the Dart entrypoint (flutter/engine#12026)
port of Change-Id: Ibcd4a110b84805af02a436a2a5bcf2cf3d2029a4
2019-09-06 14:16:13 -07:00
Matt Carroll
8c30983455 Remove un-needed FragmentActivity import statements to facilitate proguard. (flutter/engine#11902) 2019-09-05 14:44:04 -07:00
Emmanuel Garcia
f3c62c4603 Add @Keep annotation (flutter/engine#11893) 2019-09-05 13:23:04 -07:00
Shi-Hao Hong
19b98ba9f2 Incorporate View.setSystemGestureExclusionRects code review feedback from #11441 (flutter/engine#11804)
* Improve variable naming and javadoc for setSystemGestureExclusionRects

* Remove variables from setSystemGestureExclusionRects tests

* Split test for two behaviors into two separate tests for setSystemGestureExclusionRects success case
2019-09-05 12:53:41 -07:00
xster
12e8ba8313 remove extra redundant channels setup in iOS embedding engine (flutter/engine#11886) 2019-09-05 11:13:04 -07:00
Francisco Magdaleno
d00cb9e09e Finish plumbing message responses on method channels (flutter/engine#11877) 2019-09-04 16:17:10 -07:00
James Clarke
d1fa9b5f40 [Windows] Address #36422 by adding a context for async resource uploading (flutter/engine#11828)
Add a context for async resource uploading.

Fixes flutter/flutter#36422
2019-09-04 15:52:12 -07:00
Shi-Hao Hong
a4cb86d72d Android 10+ View.getSystemGestureExclusionRects (flutter/engine#11451)
* SystemGesture.getSystemGestureExclusionRects

* Add getSystemExclusionRects unit tests
2019-09-04 15:13:02 -07:00
Core
570279a848 Fix deleting Thai vowel bug on iOS (skip string range sanitization) (flutter/engine#11807) 2019-09-04 13:19:53 -07:00
Kaushik Iska
a541c52ab9 [flutter_runner] Add common libs to the test far (flutter/engine#11875)
* [flutter_runner] Add common libs to the test far

* Add flutter runner test build as part of CI
2019-09-04 11:17:25 -07:00
Kaushik Iska
03060ea88e Add a sample unit test target to flutter runner (flutter/engine#11847) 2019-09-04 07:58:52 -07:00
Matt Carroll
bebb5d2b5b Rename first frame method and notify FlutterActivity when full drawn (#38714 #36796). (flutter/engine#11357) 2019-09-03 15:49:53 -07:00
James Clarke
a3822320b7 [Windows] Update API for alternative Windows shell platform implementation (flutter/engine#11327)
* Begin API evolution to a more native win32 API

* Child-window based hosting

* Plumb through an initial size for child window to avoid reallocated surface on start

* Windows API cleanup part 1

* Fix wrapper tests

* Ensure flutter's HWND resources are destroyed

* Final API cleanup

* Fix dynamic DPI handling

* Cleanup

* Fix a bug that was causing engine to not be shutdown correctly

* CR feedback

* auto format

* CR feedback: combine FlutterView and FlutterViewController

* The one that clang-format seems to always get wrong

* expletive

* fix sources for licesnse file

* CR Feedback

* cleanup

* Update GetNativeWindow() to return an HWND rather than a long

* fix formatting
2019-09-02 17:55:42 -07:00
gaaclarke
3aaf1637b7 Started logging warnings if we drop platform messages. (flutter/engine#11792) 2019-08-30 12:48:03 -07:00
Kaushik Iska
578a942fc7 Roll fuchsia/clang/linux-amd64 from wGyr4... to -mnHl... (flutter/engine#11790)
* Roll fuchsia/clang/linux-amd64 from wGyr4... to -mnHl...

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/fuchsia-linux-toolchain-flutter-engine
Please CC  on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

* Fix dangling pointer
2019-08-30 11:38:12 -07:00
Kaushik Iska
e51c616fc9 Roll fuchsia/sdk/core/linux-amd64 from -UaaS... to fSXZ0... (flutter/engine#11784)
* Roll fuchsia/sdk/core/linux-amd64 from -UaaS... to fSXZ0...

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine
Please CC  on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

* Fix deprecated usage
2019-08-30 10:34:06 -07:00
Kaushik Iska
e358e0eef5 [flutter_runner] Port over all the changes to the dart_runner cmx files (flutter/engine#11776)
* Port over all the changes to the dart_runner cmx files

* Update vmservice.cmx
2019-08-30 10:19:08 -07:00
Matt Carroll
6de867c62a Revert "Notify framework to clear input connection when app is backgrounded (#35054) (#9498)" (flutter/engine#11720)
This reverts commit afb3cb3f89f543282f495406b2abc8fb6a223fea.
2019-08-29 15:42:11 -07:00
Dan Field
db921356f8 Return a JSON value for the Skia channel (flutter/engine#11717) 2019-08-29 14:03:55 -07:00
Shi-Hao Hong
673154b0f8 Android 10+ View.setSystemGestureExclusionRects (flutter/engine#11441)
* Implement SystemGesture.setSystemGestureExclusionRects platform channel

* Add PlatformChannelTest.java

* Fix typo in android/test/README.md
2019-08-29 17:00:42 -04:00
Martin Kustermann
442d4de7a2 Roll src/third_party/dart 35382f9b14..05c28c6115 (flutter/engine#11702)
* Roll src/third_party/dart 35382f9b14..05c28c6115

dart-lang/sdk@05c28c6115 Reland "Scaffolding for dart:wasm"
dart-lang/sdk@d57a8f7451 [vm/bytecode] Remove DebugCheck in synthetic non-local transfer (no source pos).
dart-lang/sdk@b565c8c20f Don't serialize not serializable constant variable initializers.
dart-lang/sdk@ce12a2722d Migration: handle named parameters in _substituteFunctionAfterFormals.
dart-lang/sdk@a290271dea [vm/bytecode] Throw should be 'debug checked', but not ReThrow.
dart-lang/sdk@63133a2a8c [cfe] Handle extension instance method tearoff
dart-lang/sdk@a147d4e8d2 [cfe] Handle simple use of extension instance members
dart-lang/sdk@e9fdeb2db8 Migration: add support for creating instances without supplying type arguments.
dart-lang/sdk@66e349da9c Migration: Clean up substitution logic in getOrComputeElementType
dart-lang/sdk@e9a44ba6a8 fix extension instance field error
dart-lang/sdk@15a7b57d8e split endFields into endClass/Mixin/ExtensionFields events
dart-lang/sdk@ed1b4ffba1 Add tests of extensions of mixins
dart-lang/sdk@ef36f1ba0d [vm/fuzzer] Reduce limit on methods and classes
dart-lang/sdk@7b17602c74 [vm/bytecode] Include function name into source fingerprints
dart-lang/sdk@851701d2a4 add BREAK suggestions to switch cases
dart-lang/sdk@57f7941eef [cfe] Remove 'functionNestingLevel' for VariableDeclaration.forValue
2019-08-29 22:06:42 +02:00
Chinmay Garde
c379128221 Append newlines to EOF of all translation units. (flutter/engine#11654)
We are switching to -Wnewline-eof soon and these will become errors. Anyway, this was undefined behavior.
2019-08-28 15:06:49 -07:00
Kaushik Iska
f2920b587d [flutter] Port: Run handle wait completers on the microtask queue (flutter/engine#11649)
Change-Id: I66c39d9ef7d534094148212940eef45754559d04
2019-08-28 14:02:11 -07:00
Kaushik Iska
53d9307ddb [flutter_runner] Port Expose ViewBound Wireframe Functionality (flutter/engine#11635)
Expose scenic's ability to toggle wireframe debug
rendering of view bounds in flutter_runner. This is done
by registering a new function on the platform_views channel
with the PlatformView.

Note: Unittests have not been enabled, will enable once we
have sufficient infra.

SCN-1351 #done

Change-Id: Id4c8ef65cc39a967087d7fa6c9f595da8cfe5f01
2019-08-28 12:46:24 -07:00
Kaushik Iska
9669b8fa01 [fidl][flutter_runner] Port Migrate to new fit::optional compatible APIs (flutter/engine#11636)
* [fidl][flutter_runner] Port Migrate to new fit::optional compatible APIs

Updated all call-sites.

See: https://fuchsia-review.googlesource.com/c/fuchsia/+/304389

FIDL-564 #comment

Change-Id: I831712ffd4a47b8fc9cf1fe237b709a1b983109f

* fix observatory port and re-sync cmx files
2019-08-28 12:31:07 -07:00
Brian Osman
49d551e4db Update CanvasSpy::onDrawEdgeAAQuad for Skia API change (flutter/engine#11638) 2019-08-28 14:31:23 -04:00
Dan Field
114337a53c Make Skia cache size channel respond with a value (flutter/engine#11550) 2019-08-27 17:52:35 -07:00
Maurice Parrish
4eab48a26a Add check to enable metal for import (flutter/engine#11537) 2019-08-27 14:47:14 -07:00
P.Y. Laligand
4831de893a Update label of Fuchsia FIDL targets. (flutter/engine#11514) 2019-08-27 13:54:38 -07:00
Chris Bracken
0996764a76 Reuse texture cache in ios_external_texture_gl (flutter/engine#11524)
In current implementation, external texture data flow is a
producer-consumer model. When painting external texture, it always asks
registered external texture object to produce new CVPixelBuffer, then
transforms it to texture. `MarkNewFrameAvailable` function is ignored.
This commit changes the dataflow. Now ios_external_texture_gl caches
previous opengl texture, if no new frame are available, it do not
`copyPixelBuffer` method, just uses cached opengl texture to draw.

This is a re-land of flutter/engine#9806, which was previously reverted
in flutter/engine#11522.
2019-08-27 11:03:24 -07:00
Chris Bracken
8a25f39d85 Revert "Reuse texture cache in ios_external_texture_gl. (#9806)" (flutter/engine#11522)
Broke iOS builds:

    ../../flutter/shell/platform/darwin/ios/ios_external_texture_gl.mm:56:28: error: out-of-line definition of 'NeedUpdateTexture' does not match any declaration in 'flutter::IOSExternalTextureGL'
    bool IOSExternalTextureGL::NeedUpdateTexture(bool freeze) {
                           ^~~~~~~~~~~~~~~~~

This reverts commit 5dfdb4ac99547b4f01c19fcd4e4e80238b91854b.
2019-08-27 09:39:48 -07:00
LiuJiLong
5dfdb4ac99 Reuse texture cache in ios_external_texture_gl. (flutter/engine#9806)
In current implementation, external texture data flow is a producer-consumer model. When painting external texture, it always asks registered external texture object to produce new CVPixelBuffer, then transforms it to texture. `MarkNewFrameAvailable` function is ignored. This commit changes the dataflow. Now ios_external_texture_gl caches previous opengl texture, if no new frame are available, it do not `copyPixelBuffer` method, just uses cached opengl texture to draw.
2019-08-27 02:00:09 -07:00
Chris Bracken
116b9729ec Ensure trailing newline before EOF in C++ sources (flutter/engine#11489)
In generated text fixture location lookup code:
When the second argument to write_file() is a list, it is written one
item per line to the path specified by the first argument. This ensures
that we emit a trailing newline at EOF to comply with -Wnewline-eof.

Elsewhere:
Lack of a newline at EOF was undefined behaviour prior to C++11. The
Fuchsia tree sets -Wnewline-eof in its buildroot, so we plan to do the
same. This cleans up remaining first-party C++ sources that don't
include a trailing newline.
2019-08-27 00:13:00 -07:00
xster
6ef2c2bc87 make it possible to disable debug symbols stripping (flutter/engine#11265) 2019-08-26 16:53:00 -07:00
Tong Mu
9f9c4f0e40 Patch buttons for chromebook touchpad (flutter/engine#11420)
Changes irregular events of touchpad scrolling on Chromebook to have buttons: 1.
2019-08-26 11:49:55 -07:00
Amir Hardon
d857db54ce Skip empty platform view overlays. (flutter/engine#11427)
This change sets up a "spying canvas" to try and detect empty canvases.
When using platform views with a custom embedder, if a platform view
overlay canvas is known to be empty we skip creating a compositor layer
for that overlay.
2019-08-26 11:40:49 -07:00
Qxyat
3976be5c8b Release _ongoingTouches when FlutterViewController dealloc (flutter/engine#11049) 2019-08-26 10:49:54 -07:00
Dan Field
c3ef9446e6 update method for skia (flutter/engine#11436) 2019-08-25 20:06:12 -07:00
liyuqian
f8f285edcc Support non-60 refresh rate on PerformanceOverlay (flutter/engine#11419)
So we can get the correct graph on 90fps/120fps devices :)

See https://github.com/flutter/flutter/issues/37888
2019-08-24 15:22:52 -07:00