2617 Commits

Author SHA1 Message Date
gaaclarke
df17cc6ccf Started stubbing in the FlutterView property of the mock (flutter/engine#20542)
FlutterViewControllers.
2020-08-15 21:03:20 -07:00
David Worsham
ad2bff1014 Reland: "fuchsia: Remove dead code / break dependencies" (flutter/engine#20532)
Reland #19396 with a fix for improper scale that was affecting internal tests

Tested: Ran all unittests, ran internal tests, and ran workstation on Fuchsia
BUG: 53062, 53063
2020-08-14 20:41:18 -07:00
Emmanuel Garcia
a87eaedcc2 Create PlatformView instance right after method channel call from Dart (flutter/engine#20500) 2020-08-14 15:06:02 -07:00
Diego Ballesteros Villamizar
4ba82d4d91 Handle glfwGetPrimaryMonitor returning nullptr (flutter/engine#20523)
* Handle glfwGetPrimaryMonitor returning nullptr

[glfwGetPrimaryMonitor](https://www.glfw.org/docs/3.3/group__monitor.html#ga721867d84c6d18d6790d64d2847ca0b1) may return NULL in non-error cases when no monitor is found. This started to happen recently with an update to the linux distribution, see internal b/162545223.

Handling this case avoids a crash and instead assumes a pixel density.
2020-08-14 23:03:50 +02:00
gaaclarke
6ac18e9203 Fixed the accessibility ios unit tests by sending in mock view (flutter/engine#20522)
controllers instead of views.
2020-08-14 10:42:21 -07:00
Justin McCandless
1fec9ca767 hasStrings on Android (flutter/engine#20393)
hasStrings message for checking for pasteable clipboard contents without actually reading them, for iOS14 clipboard alerts.
2020-08-14 08:45:18 -07:00
stuartmorgan
7e9b115eeb Fix the legacy EncodableValue codepaths (flutter/engine#20501)
A recent refactoring broke the USE_LEGACY_ENCODABLE_VALUE codepath in
standard_codec.cc, which went unnoticed since it wasn't being compiled.
This fixes the breakage, and also adds a temporary minimal unit test
target that ensures that all the USE_LEGACY_ENCODABLE_VALUE paths are
being compiled.
2020-08-13 23:02:20 -07:00
Jia Hao
89e5cf3dba Add missing nullable annotation (flutter/engine#20505) 2020-08-13 22:41:01 -07:00
Yuqian Li
4dec444c69 Add a service protocol for raster cache memory (flutter/engine#20466)
Related issue: https://github.com/flutter/flutter/issues/56719
2020-08-13 20:11:47 -07:00
David Worsham
877ae98e08 Fix unoptimized fuchsia builds (flutter/engine#20488) 2020-08-13 16:12:04 -07:00
Dan Field
b43d17a5a3 Remove the dummy rasterizer delegate now that flutter_runner is in tree, and cleanup ctor params (flutter/engine#20486) 2020-08-13 14:46:01 -07:00
xster
5ac78f5be6 Refactor initial route code take 2 (flutter/engine#20468) 2020-08-13 14:18:11 -07:00
Mehmet Fidanboylu
0f611fe4b7 Plumbing for setting domain network policy (flutter/engine#20218) 2020-08-13 07:26:43 -07:00
stuartmorgan
3d63be5265 Send locale information in the macOS embedding (flutter/engine#20461)
Queries the system list of user-preferred languages, and sends it to the
engine just after starting it up, as well as after any OS locale change.

macOS portion of https://github.com/flutter/flutter/issues/45152
2020-08-12 19:31:22 -07:00
David Worsham
a001fb98a7 Fix broken symbols on Fuchsia embedder (flutter/engine#20459)
See: b/163653659
2020-08-12 19:06:22 -07:00
David Worsham
6d6047204d Add --unoptimied and --asan to Fuchsia builds (flutter/engine#20427) 2020-08-12 14:47:55 -07:00
gaaclarke
232d6c4fca Revert "Refactor initial route code (#19684)" (flutter/engine#20450)
This reverts commit 21404b56c6c183a829d9c758bec2330155e2d86d.
2020-08-12 12:43:08 -07:00
xster
21404b56c6 Refactor initial route code (flutter/engine#19684) 2020-08-11 19:52:04 -07:00
stuartmorgan
08a585be33 Add missing reply in C++ MethodChannel unit test (flutter/engine#20420)
The test handler wasn't replying, which logged an error message during
the unit test.

Fixes https://github.com/flutter/flutter/issues/62560
2020-08-11 19:16:20 -07:00
David Worsham
4e60afdf2a Fix broken shell_unittests on Fuchsia (flutter/engine#20422)
Fixes https://github.com/flutter/flutter/issues/53399
2020-08-11 17:31:25 -07:00
stuartmorgan
916b06e657 Add virtual destructors to ByteStream* (flutter/engine#20417) 2020-08-11 14:39:14 -07:00
Dan Field
8c0b89b1f4 Use performDeferredCleanup instead of freeGpuResources (flutter/engine#20413) 2020-08-11 14:01:01 -07:00
stuartmorgan
bfeb4ed5a4 Fix RTTI check in EncodableValue (flutter/engine#20398)
__has_feature(cxx_rtti) is a clang extension, but clients of this code
are mostly using the VS toolchain. This makes the RTTI check work with
more compilers.
2020-08-11 10:53:26 -07:00
David Worsham
c7ac7c98f7 Fix broken Fuchsia test (flutter/engine#20397) 2020-08-11 01:01:38 -07:00
David Reveman
d44cc3bcfa Add Surface::GetContext() support on Fuchsia (flutter/engine#20391)
This improves raster cache control from apps and enables
GPU acceleration for some offscreen workloads that would
fallback to software.

Test: PlatformViewTests.GetGrContextTest

Co-authored-by: David Reveman <reveman@google.com>
2020-08-10 20:51:43 -07:00
Kaushik Iska
bbe13c2353 engineCallbackOnPresent should return false if glContext is invalid (flutter/engine#20337)
Co-authored-by: Kaushik Iska <kaushikiska@google.com>
2020-08-10 16:44:20 -07:00
guolinaileen
72bfcbb0e2 Add TextInput performPrivateCommand to Flutter Engine (flutter/engine#20188)
New command for Crowdsource 2/2
2020-08-10 14:04:11 -07:00
Sanjay Chouksey
070abcfb40 Create scenic session with view focuser (flutter/engine#20288)
This change creates the scenic session with request to Focuser. The
focuser is used to request focus to a view, given it's ViewRef. The call to
requestFocus is made from PlatformView messages channel, which will
be used from Flutter side by ChildView.

Adds a PlatformView unittest for the requestFocus method.

Co-authored-by: Sanjay Chouksey <sanjayc@google.com>
2020-08-10 13:57:46 -07:00
David Worsham
02c71c1170 Dedupe sources for fuchsia shell/tests (flutter/engine#20343)
Remove the gni file, as it is confusing things
2020-08-10 13:52:19 -07:00
stuartmorgan
ebd2bb1e89 Allow extending the C++ standard codec (flutter/engine#20317)
Standard*Codec allows for extensions to support arbitrary types; this
had not previously been implemented for the C++ version.

Overview of changes:
- EncodableValue's std::variant type now allows for a new CustomEncodableValue, which is a thin wrapper around std::any, to store arbitrary extension types.
- ByteBufferStream* has been split into an interface class and the buffer-based implementation, with the former now part of the public API surface to be used in standard codec extensions.
  - They also gained utility methods for some common data types to simplify writing extensions.
- StandardCodecSerializer is now part of the public API surface, and is subclassable.
- StandardCodecSerializer's ReadValue has been split into ReadValue and ReadValueOfType to match the structure used when subclassing on the Dart side, for easier porting of custom extensions across languages.
- Standard*Codec now optionally accepts a non-default serializer in GetInstance, providing a shared instance using that serializer.

Fixes https://github.com/flutter/flutter/issues/31174
2020-08-10 13:41:13 -07:00
LongCatIsLooong
0b8e18c6f4 [iOS TextInput] Fixes selection clamping & composing range change logic (flutter/engine#20348) 2020-08-10 09:45:36 -07:00
stuartmorgan
e297b7d731 [windows] Rework controller/engine interaction in the API (flutter/engine#20266)
Changes the interaction between the view controller and engine in both the C API and
the engine API, so that there's always an engine (as on other platforms) rather than
the engine APIs being specific to headless mode.

While adjusting the C API, this does a large cleanup:
- Renames all methods to follow a `FlutterDesktop` (prefix) + "class" name + method-style name.
  E.g., `FlutterDestkopViewControllerCreate` rather than `FlutterDesktopCreateViewController`.
  This makes it easier to see what functions operate on which conceptual "object" in the API.
- Reorders and groups them by the object they operate on.

Fixes https://github.com/flutter/flutter/issues/61966
2020-08-10 09:41:18 -07:00
Ming Lyu (CareF)
24b22ade69 FrameTiming build start timestamp fix and add vsync start timestamp (flutter/engine#20229) 2020-08-07 19:41:01 -07:00
Emmanuel Garcia
c2c71dd96a Add FlutterFragmentActivity#getRenderMode() (flutter/engine#20245) 2020-08-07 18:41:01 -07:00
guolinaileen
3c958edb47 Add TextInput sendAppPrivateCommand to Flutter Engine (flutter/engine#20144)
Adds sendAppPrivateCommand for Crowdsource
2020-08-07 17:15:05 -07:00
gaaclarke
852cb9d5c4 Added unit tests to the engine. (flutter/engine#20216) 2020-08-07 15:55:58 -07:00
Adlai Holler
dc700ae269 android_external_texture: Use the available GrDirectContext arg (flutter/engine#20303)
getGrContext is going away, plus we already have the fully-powered-up GrDirectContext available and we previously weren't using it.
2020-08-06 12:11:36 -07:00
Zachary Anderson
275f2b04cc Revert "fuchsia: Remove dead code / break dependencies (#19396)" (flutter/engine#20302)
This reverts commit 017f07942e8e80a4e886def19c6fffac7ce18479.
2020-08-06 12:06:06 -07:00
chunhtai
3ea7cae3d3 fix ios layout change cause the accessibility focus to jump randomly. (flutter/engine#20167)
* fix ios layout change cause the accessibility focus to jump randomly.

* format

* addressing review comments
2020-08-05 16:32:59 -07:00
Jason Simmons
1ed0d9dbef Fix the reversal of behavior in SerializeTypefaceWithData and WithoutData (flutter/engine#20250) 2020-08-05 13:16:02 -07:00
gaaclarke
afd037961b refactored the accessibility bridge to have a view controller instead of a view (flutter/engine#18800) 2020-08-05 10:00:52 -07:00
stuartmorgan
4bbcaf10c4 [windows] Separate the engine from the view (flutter/engine#19896)
Refactors the Windows embedding internals to make an engine object that
owns things associated with the engine rather than the view, and updates
the API surface to allow using the engine directly.

This is an incremental step toward both a cleaner, non-struct-based
internal structure and a finalized API surface.
2020-08-05 08:09:13 -07:00
William Wold
ef326b26ef Improve FlRenderer interface in preperation for Wayland on Linux (flutter/engine#20006) 2020-08-05 12:04:01 +12:00
Robert Ancell
1a4c83514c Update code style to pass clang-tidy checks 2020-08-05 10:35:03 +12:00
Ming Lyu (CareF)
c4de168327 Remove null check for layer_tree pointer in Animator::Render (flutter/engine#20178) 2020-08-04 14:56:02 -07:00
stuartmorgan
d6fccfd566 Make EncodableValue a thin std::variant wrapper (flutter/engine#19983)
Instead of a hand-rolled discriminated union (originally used to avoid a C++17
dependency, which is no longer an issue), implement EncodableValue as a
std::variant. Rather than simply changing the internals, this makes EncodableValue
a minimal std::variant subclass with only a handful of added methodS, replacing
the old IsFoo/FooValue APIs with the standard std::holds_alternative/std::get,
so that plugin code will use a standard-based API rather than a Flutter-specific
API for wrapped values.

This is a breaking change for Windows and GLFW plugins. In the short
term USE_LEGACY_ENCODABLE_VALUE can be set in builds to use the old
version, to separate rolling from updating.

Fixes https://github.com/flutter/flutter/issues/61970
2020-08-04 08:53:07 -07:00
David Worsham
017f07942e fuchsia: Remove dead code / break dependencies (flutter/engine#19396)
The fuchsia code around metrics and sizing was just sending this
information through a side-channel, when the engine already had the
information available. So, delete all of it to make future CLs simpler.

Additionally, the SceneUpdateContext has many unneccesary dependencies
re: metrics and PaintTasks. Break those to make future CLs simpler.

Tested: Ran all unittests and ran workstation on Fuchsia
BUG: 53062, 53063
2020-08-03 22:09:26 -07:00
Justin McCandless
c611078344 Clipboard hasStrings method on iOS (flutter/engine#19859)
* Implement Clipboard hasStrings method on iOS

* Test call to hasStrings

* Formatting fixes

* Move test to its own file

* Alphabetical order

* Update licenses

* arguments nil instead of empty dictionary

* Guarantee hasStrings will be true when tested

* Formatting
2020-08-03 16:08:52 -07:00
DongXu
3944bf4015 iOS external texture supports rendering NV12 pixelbuffer (flutter/engine#20082) 2020-08-03 11:20:45 -07:00
Chris Yang
ec162103df Use a single mask view to clip iOS platform view (flutter/engine#20050) 2020-08-03 10:07:19 -07:00