2235 Commits

Author SHA1 Message Date
Brian Osman
1a6e99b23d Remove legacy version of SkCanvas::didConcat44 (flutter/engine#17828)
Builds flags have been switched, so the old versions aren't needed any
longer.
2020-04-21 08:46:57 -04:00
Robert Ancell
d8cc8645bc Add pointer events to the Linux shell (flutter/engine#17304) 2020-04-21 11:27:13 +12:00
stuartmorgan
f166d4c159 Windows text input fixes (flutter/engine#17768)
Fixes a few issues with Windows text input:
- Filters out ASCII control characters
- Filters out lead surrogates, which aren't valid UTF-16 on their own so will cause assertion failures if sent to Flutter
- Adds a bandaid fix for a crash due to mismatches in indexing in the C++ and Dart text models. (A better fix would be to use UTF-16 and add surrogate pair handling to deletion and forward/back; that will be a later PR since it has a larger scope.)

Fixes https://github.com/flutter/flutter/issues/54879
2020-04-20 14:05:41 -07:00
LongCatIsLooong
c399be3ab7 Fix a typo so that the secure input view is properly initialized (flutter/engine#17816) 2020-04-20 11:39:55 -07:00
David Reveman
5439fdc086 [fuchsia] Enable raster cache on Fuchsia (flutter/engine#17753)
The raster cache is critical for good performance. This
enables the cache and provides a GrContext to ScopedFrame
instances so the cache can be efficiently populated.

Small increase in peak GPU memory usage is expected from
this change. Otherwise, no change in behavior expected.

Fixes https://github.com/flutter/flutter/issues/54950

Co-authored-by: David Reveman <reveman@google.com>
2020-04-20 10:29:08 -07:00
David Reveman
7ae25c916d [fuchsia] Adjust Skia GPU resource cache size (flutter/engine#17798)
16 MiB -> 28 MiB

Same size as what would be used on a 1024x600 display if we
allowed the common engine code to adjust this.

Co-authored-by: David Reveman <reveman@google.com>
2020-04-20 10:07:28 -07:00
Gary Qian
4dba845101 Remove Samsung workarounds (flutter/engine#17612) 2020-04-17 17:38:30 -07:00
Amir Hardon
9e7f2cbd7c Dispatch platform view touch events to the presentation (flutter/engine#17792) 2020-04-17 17:19:10 -07:00
Jason Simmons
b3baad9b94 Unregister the TextInputChannel method handler when the TextInputPlugin is destroyed (flutter/engine#17646)
Fixes https://github.com/flutter/flutter/issues/54275
2020-04-17 14:25:34 -07:00
George Wright
56bdcec5ae Enable Vulkan validation layers for shell_test (flutter/engine#17684) 2020-04-17 13:00:02 -07:00
Chris Yang
6bb1dd885a Pipeline: complete method returns a bool to indicate if complete is successful (flutter/engine#17687) 2020-04-17 10:39:16 -07:00
Brian Osman
948065c3a7 Convert semantics_node from SkMatrix44 to SkM44 (flutter/engine#17763)
* Convert semantics_node from SkMatrix44 to SkM44
2020-04-17 07:24:40 -04:00
Michael Goderbauer
e60051f0b3 Clear focus if a platform view goes away (flutter/engine#17381) 2020-04-16 13:23:05 -07:00
Brian Osman
4b424c1296 Guard canvas virtuals so we can remove legacy didConcat44 (flutter/engine#17756)
* Guard canvas virtuals so we can remove legacy didConcat44

SkMatrix44 is also deprecated, so start transitioning to SkM44.

* Fix formatting
2020-04-16 13:40:22 -04:00
LongCatIsLooong
1afb95d156 Android text input autofill (flutter/engine#17465) 2020-04-16 03:41:23 -07:00
LongCatIsLooong
fd18ae6aeb Add autofill support to ios text input plugin (flutter/engine#17493) 2020-04-16 02:47:53 -07:00
Ali Mahdiyar
28c34245cf Fix RTL handling in delete key event for android (flutter/engine#17393) 2020-04-16 01:48:21 -07:00
Jonah Williams
152ae6b486 [a11y] Support TalkBack reading by word, character, and paragraph (flutter/engine#17626) 2020-04-15 19:07:12 -07:00
stuartmorgan
6dbd05214c Use the right constant for macOS event timestamps (flutter/engine#17713)
The NSEvent->Flutter event conversion code for pointer events was
multiplying seconds by nanoseconds per milliseconds. While this does end
up giving the right number of microseconds, it's a very confusing way to
write it.
2020-04-15 14:33:00 -07:00
gaaclarke
43dffbd739 Added some tests after the fact for #17499 (flutter/engine#17714) 2020-04-15 11:52:52 -07:00
stuartmorgan
cb13b1198f Fix Windows clipboard handling (flutter/engine#17706)
Fixes several bugs in the clipboard code, and makes some structural
improvements:
- Adds scoped wrappers for clipboard open/close and global lock/unlock,
  to prevent missing cleanup, fixing at least one case where the lock
  was not released.
- Adds the relevant window handle to the clipboard calls, since the docs
  suggest that some operations won't work without one.
- Adds a missing clear step to setting the clipboard data.
- Switches from TEXT to UNICODETEXT to handle non-ASCII text correctly.
  - To enable that, adds UTF-16/-8 conversion utilities built on the
    Win32 APIs (rather than the deprecated std::codecvt functions, as
    have been previously used in the engine).
- Fixes handling of getting data when the clipboard is empty, correctly
  returning null.
- Passes more errors back through the method channel, with details, for
  easier debugging of future issues.

Fixes https://github.com/flutter/flutter/issues/54226
2020-04-15 07:02:58 -07:00
stuartmorgan
a530cb9082 Add a gn flag to disable desktop embeddings (flutter/engine#17708)
Desktop embedding dependencies can trigger gn-generation-time
requiremenets; e.g., the Linux embeddings have pkg-config dependencies.
This can be problematic in some build environments, such as building
flutter_engine.so with a custom sysroot where those higher-level
dependencies aren't available.

This flag allows generating build files that don't have those
dependencies.
2020-04-14 17:48:18 -07:00
gaaclarke
f29e60bff1 switched to using the ocmock build file in //build (flutter/engine#17707) 2020-04-14 14:43:29 -07:00
stuartmorgan
fb6e9d1c6f Adjust the GLFW build options (flutter/engine#17704)
- Adds an explicit option for not building the GLFW embedding.
- Disables GLFW by default on Windows, where it's no longer the
  uploaded embedding.
- Moves the X11 pkg-config, which is only used by the GLFW embedding,
  behind the GLFW build flag.
2020-04-14 12:45:21 -07:00
Robert Ancell
971f86d844 Move Linux shell docstrings to headers (flutter/engine#17410)
Update docstrings for typos and grammar style specified in the style guide.
2020-04-14 15:41:23 +12:00
gaaclarke
3849b114d4 Made it so unit tests can be written against all ios engine code. (flutter/engine#17624) 2020-04-13 12:34:54 -07:00
George Wright
05390d1871 Enable required extension 2020-04-13 12:14:06 -07:00
stuartmorgan
9db5c3fb62 Fix C++ MethodChannel reply type (flutter/engine#17607)
Makes InvokeMethod's reply a high-level response object, rather than
binary data, matching the abstraction level of the class (and the other
languages' implementations).

In support of that:
- Adds the logic to the codecs to decode response envelopes, which had
  never been implemented.
- Adds a convience implementation of MethodResult that forwards to
  lambdas, so that one-off invocation handlers are easier to write.

Also simplified BinaryMessenger's API so that subclasses only need to
implement one version of Send, rather than two almost-identical versions.

Fixes https://github.com/flutter/flutter/issues/53223
2020-04-11 19:06:37 -07:00
Jason Simmons
2105db78eb Update editing state in InputConnectionAdaptor.setSelection (flutter/engine#17652)
The BaseInputConnection superclass does not call endBatchEdit
in setSelection and therefore does not implicitly cause
InputConnectionAdaptor to send a state update.

Some input modes such as numeric keypads will not function without
these updates.
2020-04-11 17:29:50 -07:00
Mehmet Fidanboylu
2a925e4636 Add support for setting allow http flag in Dart VM (flutter/engine#17653) 2020-04-11 11:55:05 -07:00
stuartmorgan
f8d35c125d Always build GTK shell (flutter/engine#17634) 2020-04-11 11:50:03 -07:00
Gary Qian
8e18094f12 Implement Hashcode for TextEditingValue in InputConnectionAdaptor (flutter/engine#17643) 2020-04-10 16:00:01 -07:00
Chris Yang
8500bd4156 Reland "Improve iOS PlatformViews to better handle thread merging. #16935" (flutter/engine#17609) 2020-04-10 13:25:02 -07:00
Chris Bracken
ab779dada5 Eliminate fx_log_init call (flutter/engine#17622)
fx_log_init was already a no-op, and was eliminated in the latest
Fuchsia SDK.

See: https://fuchsia.googlesource.com/fuchsia/+/47e568475f535c00f53c86e19ff4d8736a7b261f
2020-04-10 09:02:52 -07:00
liyuqian
6c93145ef5 Read SkSLs from asset (flutter/engine#17601)
Fixes https://github.com/flutter/flutter/issues/53117

Test added:
- ShellTest.CanLoadSkSLsFromAsset
2020-04-10 00:16:33 -07:00
Francisco Magdaleno
c38e7106c0 [windows] Sends complete key data to framework (flutter/engine#17577) 2020-04-09 20:55:02 -07:00
Shi-Hao Hong
7eae32d7f2 Revert getSystemGestureExclusionRects and setSystemGestureExclusionRects (flutter/engine#17613)
* Revert getSystemGestureExclusionRects and setSystemGestureExclusionRects 

* Remove references to removed PlatformChannelTest.java file
2020-04-09 20:44:37 -07:00
gaaclarke
bbae0c06d4 Enabled hiding the home indicator with SystemChrome.setEnabledSystemUIOverlays (flutter/engine#17574) 2020-04-09 09:43:38 -07:00
Chris Yang
efe45cd875 Revert "Improve iOS PlatformViews to better handle thread merging. (#16935)" (flutter/engine#17600)
This reverts commit 930696bbb75ffdb098df4081e0353f4fac38b075.
2020-04-08 21:15:38 -07:00
Chris Yang
930696bbb7 Improve iOS PlatformViews to better handle thread merging. (flutter/engine#16935) 2020-04-08 17:33:33 -07:00
Gary Qian
a03f69c53a Implement repeat filtering logic in Android Embedder (flutter/engine#17509) 2020-04-08 12:51:43 -07:00
Kaushik Iska
78c5bc73ba [perf] Add a SceneDisplayLag event when we miss vsyncs (flutter/engine#17575)
This event goes from now -> current vsync target time
to avoid the limitations as seen in https://github.com/flutter/flutter/issues/54095#issuecomment-610636237

This event also tags additional metadata to capture
`vsync_transitions_missed` considering the refresh rate of the display.
2020-04-08 09:14:11 -07:00
Kaushik Iska
0460673759 Remove SceneDisplayLag trace event temporarily (flutter/engine#17571)
Working theory is that adding async events with begin times
in the past causes the timeline to skip some events.

See: https://github.com/flutter/flutter/issues/54095
2020-04-07 16:33:52 -07:00
LongCatIsLooong
d6d4f376a1 iOS UITextInput autocorrection prompt (flutter/engine#13959) 2020-04-07 14:45:59 -07:00
stuartmorgan
b64faf3a69 Reland "Improve C++ plugin lifetime handling" (flutter/engine#17570)
Relands #17489 with a fix for the unit test flake.

The previous unit test relied on the new instance not being created at the same memory address, which isn't guaranteed.
2020-04-07 14:11:56 -07:00
gaaclarke
9513e65f95 Added "unrecognized-selector" errors to match g3 builds (flutter/engine#17566)
Added "unrecognized-selector" errors to match g3 builds, added
"overriding-method-mismatch" to catch a common error.
2020-04-07 13:28:42 -07:00
stuartmorgan
06e24a71ba Fix flutter_windows_unittests runtime dependency (flutter/engine#17524)
The transitive dependency on the embedder library brings in the right
runtime for the build mode, so directly depending on the JIT version
isn't necessary, and causes duplicate symbol issues in release builds.
2020-04-07 13:19:49 -07:00
Ryoichi Izumita
fee9895d51 Fixed a bug that left a blank at the bottom of the screen (flutter/engine#17474)
I fixed a bug that left a blank at the bottom of the screen when the iPad's split keyboard was hidden.

I also had the same problem with this issue, so I fixed it.
iPad split keyboard cause a blank space problem

There is no function to change the space size at the bottom of the screen when the split keyboard is moved. This is because it's not clear what the keyboard should do when it's moved to the top of the screen.
2020-04-07 11:27:15 -07:00
Jason Simmons
33843702fe Add the Android SDK lambda stub library to the classpath (flutter/engine#17508)
Previously the build scripts obtained the lambda support classes from rt.jar,
which is no longer provided by recent versions of the JDK.
2020-04-07 11:24:52 -07:00
Chris Bracken
2a97bc1e16 Revert "Added errors to match g3 builds and simple errors (#17536)" (flutter/engine#17564)
Test failure:

    [ RUN      ] FlutterStringCodec.CanEncodeAndDecodeNil
    2020-04-07 10:21:25.091 flutter_channels_unittests[26965:163315] *** Assertion failure in -[FlutterStringCodec encode:], ../../flutter/shell/platform/darwin/common/framework/Source/FlutterCodecs.mm:36
    2020-04-07 10:21:25.118 flutter_channels_unittests[26965:163315] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: ''
    *** First throw call stack:
    (
    	0   CoreFoundation                      0x00007fff2ccabcf9 __exceptionPreprocess + 256
    	1   libobjc.A.dylib                     0x00007fff5785ea17 objc_exception_throw + 48
    	2   CoreFoundation                      0x00007fff2ccc6a16 +[NSException raise:format:arguments:] + 98
    	3   Foundation                          0x00007fff2ef58e11 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 194
    	4   flutter_channels_unittests          0x0000000105f1cce2 -[FlutterStringCodec encode:] + 290
    	5   flutter_channels_unittests          0x0000000105f01bbb _ZN45FlutterStringCodec_CanEncodeAndDecodeNil_Test8TestBodyEv + 107
    	6   flutter_channels_unittests          0x00000001081d1732 _ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS_4TestEvEET0_PT_MS4_FS3_vEPKc + 146
    	7   flutter_channels_unittests          0x00000001081a76b0 _ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS_4TestEvEET0_PT_MS4_FS3_vEPKc + 128
    	8   flutter_channels_unittests          0x00000001081a75c1 _ZN7testing4Test3RunEv + 209
    	9   flutter_channels_unittests          0x00000001081a8415 _ZN7testing8TestInfo3RunEv + 229
    	10  flutter_channels_unittests          0x00000001081a95aa _ZN7testing9TestSuite3RunEv + 266
    	11  flutter_channels_unittests          0x00000001081b4e43 _ZN7testing8internal12UnitTestImpl11RunAllTestsEv + 995
    	12  flutter_channels_unittests          0x00000001081d8572 _ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc + 146
    	13  flutter_channels_unittests          0x00000001081b49b3 _ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc + 131
    	14  flutter_channels_unittests          0x00000001081b4835 _ZN7testing8UnitTest3RunEv + 197
    	15  flutter_channels_unittests          0x0000000105f22e73 _Z13RUN_ALL_TESTSv + 35
    	16  flutter_channels_unittests          0x0000000105f22d79 main + 553
    	17  libdyld.dylib                       0x00007fff5908c3d5 start + 1
    )
    libc++abi.dylib: terminating with uncaught exception of type NSException
    [ERROR:flutter/fml/backtrace.cc(110)] Caught signal SIGABRT during program execution.
    Frame 0: 0x7fff591316a6 abort
    Frame 1: 0x7fff560ea641 __cxa_bad_cast
    Frame 2: 0x7fff560ea7df default_unexpected_handler()�
    Frame 3: 0x7fff57860ee3 _objc_terminate()�
    Frame 4: 0x7fff560f619e std::__terminate(void (*)())�
    Frame 5: 0x7fff560f5f86 __cxa_get_exception_ptr
    Frame 6: 0x7fff560e8f99 __cxa_get_globals
    Frame 7: 0x7fff5785eb51 objc_exception_throw
    Frame 8: 0x7fff2ccc6a16 +[NSException raise:format:arguments:]
    Frame 9: 0x7fff2ef58e11 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]
    Frame 10: 0x105f1cce2 -[FlutterStringCodec encode:]
    Frame 11: 0x105f01bbb FlutterStringCodec_CanEncodeAndDecodeNil_Test::TestBody()�
    Frame 12: 0x1081d1732 void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*)�
    Frame 13: 0x1081a76b0 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*)�
    Frame 14: 0x1081a75c1 testing::Test::Run()�
    Frame 15: 0x1081a8415 testing::TestInfo::Run()�
    Frame 16: 0x1081a95aa testing::TestSuite::Run()�
    Frame 17: 0x1081b4e43 testing::internal::UnitTestImpl::RunAllTests()�
    Frame 18: 0x1081d8572 bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*)�
    Frame 19: 0x1081b49b3 bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*)�
    Frame 20: 0x1081b4835 testing::UnitTest::Run()�
    Frame 21: 0x105f22e73 RUN_ALL_TESTS()�
    Frame 22: 0x105f22d79 main
    Frame 23: 0x7fff5908c3d5 start

This reverts commit 46f82a3d938a621d2cae8591d6f7566e01f118e1.
2020-04-07 10:32:38 -07:00