2734 Commits

Author SHA1 Message Date
Damian Wrobel
ededf03020 Add missing cstring header (fixes fl_renderer_wayland.cc) (flutter/engine#21217) 2020-09-16 09:07:01 -07:00
Jenn Magder
12c871ca5f Verify Flutter clang module, add hook for verifying consumer warnings (flutter/engine#21203) 2020-09-15 21:04:01 -07:00
William Wold
983b6a8636 Add Linux Wayland support (flutter/engine#20629) 2020-09-16 14:13:06 +12:00
Chris Bracken
5793be25e1 [darwin] Header #import hygiene (flutter/engine#21193)
This patch applies the following changes:

* Rename a stray .cc file to .mm (connection_collection.cc).
* Migrate Objective-C #includes to #import as per the style guide.
* #include/#import order updated to reflect the style guide order:
  associated header, system/standard library headers, library headers,
  platform-specific includes.
* Include cstring where we're using strlen.
* Add a missing copyright header in SemanticsObjectTest.mm.

Bugs: https://github.com/flutter/flutter/issues/60025
2020-09-15 18:44:09 -07:00
Hamdi Kahloun
489c648b42 Fix NPE in PlatformPlugin.getClipboardData() (flutter/engine#21189) 2020-09-15 17:00:57 -07:00
Emmanuel Garcia
3a7b283bb3 Account for current open image in FlutterImageView (flutter/engine#21191) 2020-09-15 14:10:55 -07:00
Justin McCandless
1ea1cf2f88 hasStrings Mac (flutter/engine#20531)
Adds the hasStrings method for Mac, and improves the state of unit testing on Mac.
2020-09-15 08:40:27 -07:00
Damian Wrobel
2c4ff91e3c Add missing <cstring> header for (strcmp, strrchr) (flutter/engine#21176)
Fixes the following compilation errors:
../../flutter/shell/platform/linux/fl_platform_plugin.cc:89:7: error: use of undeclared identifier 'strcmp'
  if (strcmp(format, kTextPlainFormat) != 0) {
      ^
../../flutter/shell/platform/linux/fl_platform_plugin.cc:127:7: error: use of undeclared identifier 'strcmp'
  if (strcmp(method, kSetClipboardDataMethod) == 0)
      ^
../../flutter/shell/platform/linux/fl_platform_plugin.cc:129:12: error: use of undeclared identifier 'strcmp'
  else if (strcmp(method, kGetClipboardDataMethod) == 0)
           ^
../../flutter/shell/platform/linux/fl_platform_plugin.cc:131:12: error: use of undeclared identifier 'strcmp'
  else if (strcmp(method, kSystemNavigatorPopMethod) == 0)
           ^
../../flutter/shell/platform/linux/fl_view.cc:194:7: error: use of undeclared identifier 'strcmp'
  if (strcmp(pspec->name, "scale-factor") == 0) {
      ^
../../flutter/shell/platform/linux/fl_engine.cc:67:18: error: use of undeclared identifier 'strrchr'
  gchar* match = strrchr(l, '@');
                 ^
../../flutter/shell/platform/linux/fl_engine.cc:75:11: error: use of undeclared identifier 'strrchr'
  match = strrchr(l, '.');
          ^
../../flutter/shell/platform/linux/fl_engine.cc:83:11: error: use of undeclared identifier 'strrchr'
  match = strrchr(l, '_');
          ^

Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
2020-09-15 08:05:12 -07:00
kaisa695275735
85f1cd7356 delete opengl texture when it detatch from surfacetexture. (flutter/engine#18733) 2020-09-14 14:07:39 -07:00
renyou
7d8dc2aa24 Fix an include path to match the others. (flutter/engine#21148) 2020-09-14 10:06:44 -07:00
Greg Spencer
b78f92a7c5 Track lock key down state instead of lock state (flutter/engine#20836)
This converts the GTK keyboard code to track the key down states of the lock modifiers NumLock and CapsLock so that they represent the actual "down" state of the key, rather than the lock state itself.

GTK tracks the lock state, and Flutter expects the down state.
2020-09-13 14:44:25 -07:00
Chris Bracken
2586db3b22 Clean up C++ includes (flutter/engine#21127)
Cleans up header order/grouping for consistency: associated header, C/C++ system/standard library headers, library headers, platform-specific #includes.

Adds <cstring> where strlen, memcpy are being used: there are a bunch of places we use them transitively.

Applies linter-required cleanups. Disables linter on one file due to included RapidJson header. See https://github.com/flutter/flutter/issues/65676

This patch does not cover flutter/shell/platform/darwin. There's a separate, slightly more intensive cleanup for those in progress.
2020-09-11 21:18:35 -07:00
Emmanuel Garcia
1ec891cb52 Fix comment indentation (flutter/engine#21114) 2020-09-11 17:50:26 -07:00
Chris Bracken
d03692449b Prefer C++ standard headers to their C counterpart (flutter/engine#21091)
We currently use a mix of C standard includes (e.g. limits.h) and their
C++ variants (e.g. climits). This migrates to a consistent style for all
cases where the C++ variants are acceptable, but leaves the C
equivalents in place where they are required, such as in the embedder
API and other headers that may be used from C.
2020-09-11 17:10:00 -07:00
Emmanuel Garcia
8a317ebabc Add a new raster status kSkipAndRetry frame (flutter/engine#21059) 2020-09-11 16:29:11 -07:00
Jason Simmons
c3a37bec80 Check for a valid SkSL cache directory before calling VisitFiles (flutter/engine#21118)
The directory may be invalid when running shell_unittests because
some tests call SetCacheDirectoryPath and then delete the directory.
Later tests that try to use that cache base path will be unable to
open the directory.
2020-09-11 16:23:25 -07:00
Chris Bracken
7acd2b407c Fix linter errors in mock_engine (flutter/engine#21102)
Make a single-param ctor explicit in order to prevent surprising
implicit conversions.

Add a check for zero message-size and don't malloc/memcpy the incoming
message in those cases.

Add braces where they were missing.
2020-09-11 10:27:00 -07:00
Chris Bracken
9ff7d7ca44 Copyright header hygiene improvements (flutter/engine#21089)
Add copyright headers in a few files where they were missing.

Trim trailing blank comment line where present, for consistency with
other engine code.

Use the standard libtxt copyright header in one file where it differed
(extra (C) and comma compared to other files in libtxt).

This also amends tools/const_finder/test/const_finder_test.dart to look
for a const an additional four lines down to account for the copyright
header added to the test fixture.
2020-09-11 08:55:37 -07:00
stuartmorgan
087ad9a390 Minor windows.h cleanup (flutter/engine#21082)
- Standardize on lowercase for windows.h
- Don't define NOMINMAX before including windows.h in (some) public
  wrapper headers, since it causes a warning when combined with setting
  NOMINMAX at the build level, which is the more robust way to avoid
  issues with min/max and windows.h
2020-09-10 21:11:07 -07:00
stuartmorgan
1cb8585fa7 Remove deprecated methods from FlutterViewController (flutter/engine#21081)
The template now uses the FlutterEngine versions.
2020-09-10 21:10:28 -07:00
stuartmorgan
91c34dca2e Clean up deprecated EncodableValue code (flutter/engine#20981)
Removes the older pointer-based versions of APIs taking EncodableValues for which there are now reference-based versions.
2020-09-10 21:08:52 -07:00
Damian Wrobel
d71cece456 Add missing <cstring> header (flutter/engine#21069)
Fixes the following compilation errors:

../../flutter/shell/platform/linux/fl_value.cc:267:3: error: use of undeclared identifier 'memcpy'
  memcpy(self->values, data, sizeof(uint8_t) * data_length);
  ^
../../flutter/shell/platform/linux/fl_value.cc:284:3: error: use of undeclared identifier 'memcpy'
  memcpy(self->values, data, sizeof(int32_t) * data_length);
  ^
../../flutter/shell/platform/linux/fl_value.cc:294:3: error: use of undeclared identifier 'memcpy'
  memcpy(self->values, data, sizeof(int64_t) * data_length);
  ^
../../flutter/shell/platform/linux/fl_value.cc:304:3: error: use of undeclared identifier 'memcpy'
  memcpy(self->values, data, sizeof(double) * data_length);
  ^

../../flutter/shell/platform/linux/fl_string_codec.cc:29:28: error: use of undeclared identifier 'strlen'
  return g_bytes_new(text, strlen(text));
                           ^

../../flutter/shell/platform/linux/fl_standard_message_codec.cc:512:23: error: use of undeclared identifier 'strlen'
      size_t length = strlen(text);
                      ^

Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
2020-09-10 09:24:54 -07:00
Sebastian Roth
0aff38842a Annotate valuePublishedByPlugin with nullable (flutter/engine#19267) 2020-09-09 19:45:02 -07:00
David Worsham
916cee368c fuchsia: Compile disabled RasterThreadMerger code (flutter/engine#20984) 2020-09-09 18:40:01 -07:00
Alexander Brusher
b359710d3d Adds increment/decrement actions to fuchsia accessibility bridge. (flutter/engine#21049) 2020-09-09 18:34:38 -07:00
stuartmorgan
dda761af69 Rename Registrar to PluginRegistrar in Win/GLFW C API (flutter/engine#21058) 2020-09-09 17:15:03 -07:00
kele86838437
260a850e93 Update Androidx import (flutter/engine#19059) 2020-09-09 16:10:03 -07:00
chunhtai
803b1b09cf Fixed ios layout change to not refocus semantics object if the focus … (flutter/engine#21029)
* Fixed ios layout change to not refocus semantics object if the focus is outside of flutter

* update

* addressing comments
2020-09-09 15:39:21 -07:00
chenjianguang
38f9a5955e Fix usage of WeakPtr valid check (flutter/engine#20106) 2020-09-09 15:34:24 -07:00
Yuqian Li
9aba102005 Open a fresh dir during LoadSkSLs (flutter/engine#21050)
Fixes https://github.com/flutter/flutter/issues/65258

The following devicelab tests should pass after this patch:

- flutter_gallery_sksl_warmup__transition_perf_e2e_ios32
- flutter_gallery_sksl_warmup_ios32__transition_perf
2020-09-09 15:33:33 -07:00
linxuebin
538ae021ea Increase thread priority before engine init (flutter/engine#20922)
We get huge ANRs in not pure flutter app.
We found that 0.15% of the engine initialization took more than 10 seconds, every 10 million starts.
2020-09-09 14:07:34 -07:00
Zachary Anderson
5ef8d060bc Revert "Enable lazy-async-stacks by-default in all modes (Take 3) (#20895)" (flutter/engine#21043)
This reverts commit 4200d23617a13ae4e477483ad43493dd36e4d00b.
2020-09-09 09:25:17 -07:00
Chinmay Garde
521395b84f Avoid crashing and display error if the process cannot be prepared for JIT mode Dart VM. (flutter/engine#20980) 2020-09-08 13:41:31 -07:00
xster
baaa1a6688 Tweak the mdns error message (flutter/engine#20991) 2020-09-08 10:54:42 -07:00
Clement Skau
4200d23617 Enable lazy-async-stacks by-default in all modes (Take 3) (flutter/engine#20895)
Lazy async stacks were already enabled by-default in AOT mode in [0] - which made the
gen_snapshot invocations use "--lazy-async-stacks --no-causal-async-stacks".

This change does the same with the engine defaults, which makes this be enabled
by-default in JIT mode as well.

See go/dart-10x-faster-async for more information.

This is a re-land: A fix for what we believe to have caused the last revert has landed upstream in Dart in dart-lang/sdk@0004589

[0] flutter/flutter@3478232
2020-09-07 10:55:48 +02:00
Gary Qian
cd4ac5d0a3 [Android R] Sync keyboard animation with view insets vs Android 11/R/API 30 WindowInsetsAnimation (flutter/engine#20843) 2020-09-04 02:06:30 -07:00
xster
ed15a009fe Let FlutterActivity/Fragment/FragmentActivity have an app bundle path override instead of eager resolving during construction (flutter/engine#20769) 2020-09-03 17:31:30 -07:00
Emmanuel Garcia
5ad2cb4d55 Don't use GetTaskQueueId() in rasterizer as it breaks Fuchsia (flutter/engine#20983) 2020-09-03 16:40:01 -07:00
Jim Graham
ef54c35abc restore FML_DCHECK removed due to a code reviewing error (flutter/engine#20953) 2020-09-03 14:46:28 -07:00
Alexander Brusher
7a76ad06f7 Populates fuchsia node actions in semantics updates. (flutter/engine#20451) 2020-09-03 14:38:36 -07:00
0xZero
c70c748e0d Member variables should appear before the |WeakPtrFactory|. (flutter/engine#20899) 2020-09-03 14:34:01 -07:00
Guokai-Cheng
03d8863078 Ensure the destructor is called since it destroys the EGLSurface before creating a new onscreen surface. (flutter/engine#20916) 2020-09-03 14:32:48 -07:00
Jason Simmons
44bd4cf1d7 Log the results when ShellTest.Screenshot fails (flutter/engine#20932)
This test has been flaky on LUCI recently.

See https://github.com/flutter/flutter/issues/65026
2020-09-03 14:13:55 -07:00
gaaclarke
1302a1806a Started printing out error messages when the observatory won't be reachable because of permissions problems. (flutter/engine#20960) 2020-09-03 14:05:47 -07:00
LongCatIsLooong
6b250c5725 Fix iOS text field input keyboard flickering & crash (flutter/engine#20805) 2020-09-03 13:55:02 -07:00
Emmanuel Garcia
521827d230 Always set the callback during Rasterizer setup (flutter/engine#20976) 2020-09-03 10:48:46 -07:00
Nathan Rogers
a35a7967ea [fuchsia] Send trace events to system tracing on all configurations (flutter/engine#20974)
This change reverts https://github.com/flutter/engine/pull/15900.  The
design of the expected consumer of the original PR changed, and the
feature ended up going unused.  Since the unexpected difference in trace
event routing behavior has mostly ended up as a source of confusion,
change things back to route trace events to Fuchsia system tracing on
all configurations.
2020-09-03 10:21:36 -07:00
Emmanuel Garcia
a942137a5d Only clear GL context after changing the thread configuration (flutter/engine#20965) 2020-09-02 22:10:02 -07:00
Emmanuel Garcia
aea17076cb Clear GL context before Gr context (flutter/engine#20957) 2020-09-02 15:08:16 -07:00
Dan Field
f83e92cbaf Use hint freed specifically for image disposal (flutter/engine#20754)
* Use hint freed specifically for image disposal
2020-09-02 13:41:58 -07:00