383 Commits

Author SHA1 Message Date
Tong Mu
b2924176cc [Keyboard] Send empty key events when no key data should (flutter/engine#27774)
The keyboard system on each platform now sends an empty key data instead of nothing if no key data should be sent.
2021-07-30 13:35:39 -07:00
Siva
ff9b2b6507 Uncomment terminate unit test (Dart side fix has rolled into the engine) (flutter/engine#27649) 2021-07-22 10:25:01 -07:00
Siva
3635ddb39f Comment out terminate unit test until fix lands in Dart. (flutter/engine#27625)
* Comment out terminate unit test until fix lands in Dart.

* Address review comments.
2021-07-21 12:24:16 -07:00
Tong Mu
1a71c70587 Update key mapping to the latest logical key values (flutter/engine#25883)
This PR updates the key mapping tables of every platform according to the change to keycode_gen.
2021-07-21 01:58:09 -07:00
Siva
002299df34 Add embedder unit test that reproduces https://github.com/dart-lang/sdk/issues/46275 (flutter/engine#27392)
* Add embedder unit test that reproduces the problem described in
https://github.com/dart-lang/sdk/issues/46275

* Address code review comments.
2021-07-20 11:14:54 -07:00
Matej Knopp
becc215ba8 Do not resolve external textures unless there is new frame available (flutter/engine#27508) 2021-07-19 12:51:02 -07:00
Matej Knopp
ffa8f3ad2e MacOS: Fix external texture not working in OpenGL mode (flutter/engine#27506) 2021-07-19 12:46:02 -07:00
Greg Spencer
185d8601c5 Hardware Keyboard: iOS (flutter/engine#25961)
Implement new keyboard event system for iOS.
2021-07-07 16:52:04 -07:00
Chinmay Garde
8867a5c405 Temporarily opt out of reduced shaders variants till roll issues are resolved. (flutter/engine#27048) 2021-06-29 15:11:02 -07:00
Chinmay Garde
7cfb375a5e Configure contexts to reduce shader variations. (flutter/engine#27016)
Context creation options for each backend were spread across multiple
translation units. This makes setting options common across all backends hard to
configure. I have moved the creation of such common options into a separate
translation unit.

Fixes https://github.com/flutter/flutter/issues/84213
2021-06-28 15:37:14 -07:00
Ben Hagen
e6966a545d Remove invalid texture error message (flutter/engine#26816)
This unifies the behaviour with other embedders.

Fixes flutter/flutter#84855
2021-06-24 13:08:37 -07:00
Dan Field
e6a9345f19 Remove outdated annotations from fixtures (flutter/engine#26828) 2021-06-19 10:09:02 -07:00
sagallea
5bf41ddae1 Add physical view insets to FlutterWindowMetricsEvent (flutter/engine#26442)
This is needed to propagate inset values through Flutter.

Bug: b/181683254
2021-06-03 14:37:05 -07:00
Tong Mu
00e9f108c1 Hardware Keyboard: Linux (GTK) (flutter/engine#23467)
Linux (GTK) changes for the Hardware Keyboard project.
2021-05-25 18:04:03 -07:00
Yuanyao Zhong
93bb74ba46 Add missing semantics flag for embedder (flutter/engine#25932)
Add in flags kFlutterSemanticsFlagIsSlider and kFlutterSemanticsFlagIsKeyboardKey
from SemanticsFlags.
2021-05-13 14:37:56 -07:00
gaaclarke
4d98fd9744 Switch PlatformMessages to hold data in Mappings (flutter/engine#25867) 2021-05-13 10:28:25 -07:00
gaaclarke
1734ce7f8a Moved PlatformMessage's to unique_ptrs (flutter/engine#25860) 2021-05-06 20:19:01 -07:00
George Wright
65d744bcdf Don't call release_proc when attempting to wrap an SkSurface which fails (flutter/engine#25901) 2021-05-03 16:42:51 -07:00
George Wright
6978395603 Add Metal to the FlutterCompositor struct in the Embedder API (flutter/engine#25612) 2021-04-23 15:52:54 -07:00
Kaushik Iska
dc0fb6e4a7 Reland "TaskSources register tasks with MessageLoopTaskQueues dispatcher" (flutter/engine#25692) 2021-04-21 14:29:02 -07:00
Kaushik Iska
17e7c26da8 Revert TaskRunner changes to fix Fuchsia Test failures (flutter/engine#25690) 2021-04-21 09:15:24 -07:00
Kaushik Iska
988c4ffb83 TaskSources register tasks with MessageLoopTaskQueues dispatcher (flutter/engine#25307) 2021-04-19 07:20:11 -07:00
Dan Field
6c04af339a Distinguish between touch and mouse input on win32/winuwp (flutter/engine#25579) 2021-04-15 09:51:31 -07:00
Kaushik Iska
76f3f23faf [macos] Release the copied pixel buffer after texture creation (flutter/engine#25548) 2021-04-12 13:54:14 -07:00
Emmanuel Garcia
1bad6de1da Reland Dart plugin registrant (flutter/engine#25496) 2021-04-12 13:30:01 -07:00
Dan Field
22da76000a Refactor GPU access switch (flutter/engine#24356) 2021-04-06 22:16:06 -07:00
Chris Bracken
45c54c08e2 Add documentation to embedder locale callback (flutter/engine#25437)
The FlutterComputePlatformResolvedLocaleCallback does not pass the
standard user_data baton. This was an unintentional omission in the
original patch.

Add documentation to that effect and link to the bug report:
https://github.com/flutter/flutter/issues/79826
2021-04-06 09:46:31 -07:00
Chris Bracken
bc3084eabc Allow embedders to set a custom log tag (flutter/engine#25435)
Embedders making use of the embedder API always ended up with a
hardcoded log tag of "flutter". Some embedders may wish to set a
different log tag. For example, the Fuchsia embedder sets their log tag
to a launch URL followed by "flutter".

If unset, we continue to default to "flutter".

Fixes https://github.com/flutter/flutter/issues/79819
2021-04-05 17:35:54 -07:00
Chris Bracken
f4d1c89df1 Extract Dart logging to the embedders (flutter/engine#25402)
Previously messages logged from Dart code (e.g. via the print function)
were handled directly in the engine by platform-specific code. This
factors out a LogMessage(tag, message) callback that embedders can
implement with platform-specific code.

This also eliminates a dependency on platform-specific code in the core,
and provides more flexibility to embedders than the current fallback to
stdout, which can be a problem on platforms without a traditional stdout
or with restrictions on stdout.

Fixes https://github.com/flutter/flutter/issues/79685
2021-04-05 15:43:21 -07:00
Chris Bracken
fda4d07757 Fix texture corruption on Windows (flutter/engine#25349)
Notify Skia that we've updated texture handles within the current
binding such that Skia invalidates any assumptions about previous
context modifications that it had made.

This fixes a texture corruption issue reported in
https://github.com/flutter/flutter/issues/78648
2021-04-05 14:21:31 -07:00
Chris Bracken
9b4a0264d5 Correct typos throughout the engine/embedder (flutter/engine#25346)
Used the the `misspell` tool available at
https://github.com/client9/misspell, then applied hand-corrections. It's
possible we could adopt this as a presubmit, but there are still enough
false positives that it may not be worth the effort.
2021-04-01 11:08:19 -07:00
Brandon DeRosier
ace4d489a0 When snapshotting a surface, upper-bound the render target size to the device limit. (flutter/engine#25213) 2021-03-29 13:54:02 -07:00
Michael Goderbauer
d627e66bcf remove ignores (flutter/engine#25131) 2021-03-25 10:19:01 -07:00
Jason Simmons
0d98a065b9 Detach the newly created EGL context from the main thread in the embedder unit tests (flutter/engine#24908)
The EGL context will be used by other threads during test execution, and it
should not be active on multiple threads at the same time.  This was not
noticed previously because SwiftShader was not checking for this, but other
EGL implementations may enforce this constraint.
2021-03-10 11:29:48 -08:00
Chris Bracken
a712590dfc Only call destruction_callback if non-null (flutter/engine#24845)
In MakeSkSurfaceFromBackingStore and other places in embedder.cc, we
call a texture or framebuffer destruction callback without first
verifying it's non-null. This adds a check before such calls.

Currently fl_renderer_gl_create_backing_store() in the Linux GTK
embedder and ExternalTextureGL::PopulateTexture() in the Windows
embedder either explicitly or implicitly set a null destruction
callback.

This prevents a crash reported when running under OpenGL ES 2.0 reported
in https://github.com/flutter/flutter/issues/76881.

While this prevents the crash, it does not fix the underlying issue.
2021-03-08 17:31:22 -08:00
Chris Bracken
13cf185e1c Correct setup-related typos (flutter/engine#24846)
Corrects uses of setup as a verb to 'set up', leaves noun/noun-phrase
forms of setup as 'setup'. Also settles on 'teardown' as opposed to
tear-down for consistency across the codebase.

A few other minor comment/wording corrections.
2021-03-08 17:31:10 -08:00
Kaushik Iska
abc42cde56 Guard metal rendering behind SHELL_ENABLE_METAL (flutter/engine#24727) 2021-03-04 09:04:01 -08:00
Kaushik Iska
f8955fca87 [embedder] [metal] Embedder API can support externally composited Metal textures (flutter/engine#24327) 2021-02-18 11:35:19 -08:00
James Clarke
e9543eaf17 Windows: linker compatibility with AppContainer for winuwp target (flutter/engine#24318)
* Update Windows linker settings to be compatible with AppContainer when target==winuwp
2021-02-12 19:10:09 -08:00
David Worsham
3215611f74 Fix use of multiple shells w/ different snapshots (flutter/engine#24152) 2021-02-03 17:42:36 -08:00
Michael Reed
7ef5d67e1b Use sampling instead of (deprecated) filter-quality (flutter/engine#24101) 2021-02-01 00:16:02 -08:00
Tong Mu
ee1cc9f5ab Hardware keyboard: Web, embedder, and dart:ui (flutter/engine#23466) 2021-01-28 17:19:02 -08:00
gaaclarke
ce537a2b51 reland of https://github.com/flutter/engine/pull/23634 (flutter/engine#23865) 2021-01-22 11:49:37 -08:00
Zachary Anderson
d1713a83ff Revert "implemented GetMainContext() for opengl (#23634)" (flutter/engine#23859)
This reverts commit ef108aeaed9a86a99c77dcc1c4373f940b532c01.
2021-01-22 09:54:24 -08:00
Jason Simmons
2c20425be9 Fix typo in embedder unit tests (flutter/engine#23783) 2021-01-21 14:24:38 -08:00
gaaclarke
ef108aeaed implemented GetMainContext() for opengl (flutter/engine#23634) 2021-01-21 09:43:06 -08:00
Kaushik Iska
8a4b31934c [metal] Disable image comparison for gradient_metal test (flutter/engine#23540)
See:  https://github.com/flutter/flutter/issues/73590
2021-01-08 17:48:10 -08:00
Kaushik Iska
5cae004d4d [tests] Normalize SkImage before comparison. (flutter/engine#23489) 2021-01-07 14:47:06 -08:00
Kaushik Iska
eb3ab64883 [embedder] [metal] Add support for Metal Renderer Config in the embedder API (flutter/engine#22854)
This change adds a FlutterMetalRendererConfig that lets embedders
specify metal as rendering api.

Also adds a test that validates rendering a gradient using metal.
2021-01-01 20:39:36 -08:00
zljj0818
0ef14f3ca3 More rename from GPU thread to raster thread (flutter/engine#22819) 2020-12-03 15:03:02 -08:00