134 Commits

Author SHA1 Message Date
Derek Xu
dedec555f2 Handle deprecation of Dart_TimelineEvent Embedder API (flutter/engine#42497)
This PR changes usages of `Dart_TimelineEvent` to
`Dart_RecordTimelineEvent` as `Dart_TimelineEvent` was deprecated in
https://dart-review.googlesource.com/c/sdk/+/308721.
2023-08-02 16:09:31 -04:00
Tong Mu
489f9c3d01 Make updating window metrics multi-view (flutter/engine#43366)
This PR adds multi-view support to various methods that updates the window metrics by adding a `view_id` parameter.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-07-08 05:54:16 +00:00
Kevin Lubick
0946d27add Migrate uses of SkSurface factories (flutter/engine#41978)
In http://review.skia.org/687639, many SkSurface static methods were moved and one was deleted (SkSurface::MakeRasterN32Premul). (SkSurface::MakeNull was omitted accidentally and http://review.skia.org/696537glesource.com/c/skia/+/696537 has not rolled into Flutter yet)

This changes the calls in Flutter to match those moved functions. There should be no functional difference and everything was done pretty mechanically (e.g. find and replace)

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-05-15 16:41:10 +00:00
Dan Field
ea5131772d Add a Display API to dart:ui that reports the physical size, DPR, and refresh rate of the main display (flutter/engine#41685)
Fixes https://github.com/flutter/flutter/issues/123307 - for Android, iOS, and Web, for the main display only (https://github.com/flutter/flutter/issues/125938 tracks supporting multiple displays, https://github.com/flutter/flutter/issues/125939 for desktop).

Desktop will need to be implemented for this, but given priority for a couple of our customers targetting foldable devices on Android I'm inclined to get this in before desktop can be finished.

The main concern for this right now is that on some Android foldable devices, setting a preferred orientation will cause letterboxing and the `MediaQuery` will _never_ get the full screen size when unfolded. This causes apps to think the screen is smaller than it is, as they've mainly been using `MediaQueryData.size` to figure this out. Android's recommendation is to not set a preferred orientation, and if you must to use the new method introduced in `ViewUtil.java` to calculate the maximal window size.
2023-05-06 18:28:22 +00:00
Jim Graham
0fa8cbec8a Create DlCanvas interface and implement with DisplayListBuilder and SkCanvasAdapter (flutter/engine#39762)
* Create DlCanvas interface and implement with DisplayListBuilder and SkCanvasAdapter
2023-02-23 22:09:35 -08:00
Rulong Chen(陈汝龙)
4fb5044193 Uses int64_t instead of int for the |view_id| parameter. (flutter/engine#39618) 2023-02-16 20:20:15 +00:00
Brandon DeRosier
841758cc6c Add SkSurface include to every file where it's used (flutter/engine#39304) 2023-02-01 00:50:58 +00:00
Ben Konyi
d3f45828bf Reland "Remove references to Observatory (#38919)" (flutter/engine#39139)
This reverts commit 5dd945442b230a2c0549ee6d798fda71e031a4a9.
2023-01-30 09:50:09 -05:00
Ben Konyi
002fce29e0 Revert "Remove references to Observatory (#38919)" (flutter/engine#39035)
Reason for revert: breaking Flutter -> plugins roll

This reverts commit 1f603711c7b7afe52dff3872a5035789e3ddba02.
2023-01-20 12:33:40 -05:00
Ben Konyi
1f603711c7 Remove references to Observatory (flutter/engine#38919)
Observatory is being deprecated for Dart 3.0 so it should no longer be referenced in tooling messaging / flags.

See https://github.com/dart-lang/sdk/issues/50233
2023-01-19 09:20:46 -05:00
Dan Field
e4d709de85 Avoid using non-UTF-8 encoded argv more often (flutter/engine#36590) 2022-10-05 12:03:20 -07:00
gaaclarke
e41c775200 Removed instances of unnecessary values (flutter/engine#36221) 2022-09-26 21:28:04 +00:00
Jim Graham
5f9579eae8 Display list multiplexer (flutter/engine#35421) 2022-08-16 05:34:52 +00:00
Jim Graham
1413379354 Embedders use DisplayListBuilder for compositing (flutter/engine#35170) 2022-08-04 22:23:04 +00:00
Márk Tolmács
c85e3529b1 Fix tests on the Windows platform (flutter/engine#34350)
Addresses https://github.com/flutter/flutter/issues/36301
2022-07-11 11:01:05 -07:00
Xilai Zhang
9bbaf6212e [gn] use generated_files to encode entitlement information (flutter/engine#34216)
* generated_files

* for debugging push

* format files

* formate files

* trigger build

* add deps
2022-06-27 09:09:29 -07:00
Dan Field
3724bc6427 Implement toGpuImage, a synchronous, GPU-resident version of (flutter/engine#33736)
* Implement toGpuImage, a synchronous, GPU-resident version of
Picture.toImage.

This method kicks off asynchronous work on the raster task runner.
If it fails to rasterize, it will synchronously throw later when
the user attempts to draw to a canvas.

This supports several use cases:

- Quickly snapping off an expensive-to-rasterize image for reuse
  across multiple frames.
- Applying multi-pass filters to a render target.

This patch amends flutter_tester so that it can produce an image
object, but that image will always be a grey and white four square checkerboard.

Adds support for CanvasKit on Web, which basically already used
this method for its Picture.toImage implementation.

Throws an UnsupportedError for HTML on Web, since any implementation
there would almost certainly be slower than drawPicture.
2022-06-24 16:14:42 -07:00
Jonah Williams
a184d04005 cleanup fractional translation ifdefs and config (flutter/engine#34198) 2022-06-22 09:00:57 -07:00
Chris Bracken
53a9648da9 [lint] Merge impeller .clang-tidy into main config (flutter/engine#33692)
Merges most (but not all) of the impeller .clang-tidy rules into the
main .clang-tidy config. Merges:

readability-identifier-naming.PrivateMemberSuffix (_)
readability-identifier-naming.EnumConstantPrefix (k)
modernize-use-default-member-init.UseAssignment
Does not merge:

readability-identifier-naming.PublicMethodCase (CamelCase)
readability-identifier-naming.PrivateMethodCase (CamelCase)
These last two are not merged due to the non-trivial number of existing
field accessors that use field_name() methods to directly return
field_name_. While these are permitted by the C++ style guide, we may
want to move to a single, simple rule and name everything in CamelCase.
These can be enabled in a followup patch.

No new tests added, since this change is style-only.
2022-06-21 11:52:42 -07:00
Jonah Williams
858241db7c Add configuration to support compiling engine with SUPPORT_FRACTIONAL_TRANSLATION (flutter/engine#33393) 2022-05-16 13:04:05 -07:00
Jonah Williams
a4895a7315 compile a flutter tester with SUPPORT_FRACTIONAL_TRANSLATION and raster cache disabled (flutter/engine#33272) 2022-05-12 12:49:04 -07:00
Chris Bracken
09285aac02 Use empty in place of size checks vs 0 (flutter/engine#33151) 2022-05-06 13:09:04 -07:00
Ben Konyi
56afd34216 Change support for VM service message from "The Dart VM Service is listening" to "The Dart VM service is listening" (flutter/engine#31361)
See https://github.com/dart-lang/sdk/issues/46756
2022-02-10 09:45:28 -08:00
Ben Konyi
34d2ccff68 Change support for VM service message from "Dart VM Service listening" to "The Dart VM Service is listening" (flutter/engine#31310)
See https://github.com/dart-lang/sdk/issues/46756
2022-02-07 13:55:22 -08:00
Ben Konyi
a5baa644a3 Add support for new VM service message (flutter/engine#31250)
"Observatory listening on..." is eventually being updated to "Dart VM
Service listening on...". This change allows for parsing the VM service
URI from messages of either format.

See https://github.com/dart-lang/sdk/issues/46756
2022-02-04 10:25:53 -08:00
Brandon DeRosier
2d4f908b9d Add FML_ prefix to fml/build_config.h macros (flutter/engine#31141) 2022-01-31 11:53:51 -08:00
Konstantin Scheglov
463ebf640f Fix UNNECESSARY_TYPE_CHECK_TRUE (flutter/engine#28611)
* Fix UNNECESSARY_TYPE_CHECK_TRUE

* Fix two more places.
2021-09-15 08:22:24 -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
Jason Simmons
b9a23ff503 Return an empty canvas in the TesterExternalViewEmbedder (flutter/engine#25708)
The compositor expects the PaintContext's leaf_nodes_canvas to be non-null
2021-04-22 11:51:36 -07:00
Dan Field
ea35899927 Provide a stub platform view embedder for tester to avoid emitting errors (flutter/engine#25661) 2021-04-21 13:04:01 -07:00
Dan Field
446b6a6a61 Support SKP captures in flutter_tester (flutter/engine#25566) 2021-04-14 09:39:01 -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
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
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
Zachary Anderson
29adc2e448 Manual Dart SDK roll (flutter/engine#23165) 2020-12-17 21:42:21 -08:00
zljj0818
0ef14f3ca3 More rename from GPU thread to raster thread (flutter/engine#22819) 2020-12-03 15:03:02 -08:00
Kaushik Iska
b2bcc689b7 Roll dart e182eac158cf..9bc7d4604277 (flutter/engine#22332) 2020-11-05 15:59:02 -08:00
Chris Bracken
ef868edd36 Eliminate FLUTTER_NOLINT where possible (flutter/engine#21904)
This removes most of the remaining FLUTTER_NOLINT comments and opts
these files back into linter enforcement.

I've filed https://github.com/flutter/flutter/issues/68273 to require
that all FLUTTER_NOLINT comments be followed by a GitHub issue URL
describing the problem to be fixed.
2020-10-16 12:44:49 -07:00
Jonah Williams
127f3af9e0 Preserve specified AssetResolvers when performing a hot restart or updating the asset directory (flutter/engine#21611)
Follow up from #21436 . That PR works for all embeddings except for Android, which creates a special JNI AssetResolver. Since the shell cannot recreate this resolver, update the logic to preserve existing resolvers instead.
2020-10-08 09:22:01 -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
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
Greg Spencer
e994f832d2 Move platform specific information to PlatformConfiguration class (flutter/engine#19652) 2020-07-31 17:21:02 -07:00
Siva
03706dce89 Manual roll of Dart from 24c7666def...40fd1c456e (flutter/engine#20092)
* Manual roll of Dart from 24c7666def...40fd1c456e

dart-lang/sdk@40fd1c456e Revert "[dart:io] Add Abort() on HttpClientRequest"
dart-lang/sdk@17d7296a42 [vm/nnbd/bytecode] Fix reuse of type arguments in bytecode
dart-lang/sdk@58b6f40c73 Issue 42797. Understand in legacy libraries that a function returning Never (in Null Safety library) never returns. (reland)
dart-lang/sdk@fc8a6d9f9b [VM/compiler] Dereference TypeRef literal when propagating constants.
dart-lang/sdk@0689ec527a Move "test.dart" (well, most of its contents) into pkg/test_runner.
dart-lang/sdk@1094b3c61d Prepare static error test updater tool to handle web tests.
dart-lang/sdk@b258585f2f [observatory] Migrate from deprecated isInstanceOf to isA.
dart-lang/sdk@dfe1d9b682 Disable OverrideContributor for Cider.
dart-lang/sdk@aea99b2f5c scope debug property assist to Diagnosticables
dart-lang/sdk@4b96f20a79 [dart:io] Add Abort() on HttpClientRequest
dart-lang/sdk@1b1a39708c [build] Use frameworks instead of libs
dart-lang/sdk@3fef522496 Revert "Reland "[vm] Replaces fuchsia.deprecatedtimezone""
dart-lang/sdk@8c664d4f3f Revert "Issue 42797. Understand in legacy libraries that a function returning Never (in Null Safety library) never returns."
dart-lang/sdk@2efb5bebc7 [ dart:_http ] Fix typo in HTTP response timeline event
dart-lang/sdk@0884dae36c Revert "Fix the #include path for ICU headers"
dart-lang/sdk@5171534e81 Scope tweaks. Report REFERENCED_BEFORE_DECLARATION in more places.
dart-lang/sdk@6bba75079a Issue 42797. Understand in legacy libraries that a function returning Never (in Null Safety library) never returns.
dart-lang/sdk@b4ebbb7f5c [build] Update gn to match Fuchsia
dart-lang/sdk@cb428a7a02 [dart2js] Remove old bug work around in collector.
dart-lang/sdk@08663c20ab Change flutter patch to match existing DEPS on master branch
dart-lang/sdk@146ad014d9 update js/meta for the 2.10 dev sdk
dart-lang/sdk@488c718793 [co19] Roll co19 to d79951e06e443213243e54c2c32694b79a221b65
dart-lang/sdk@ba20edd7be Add patch for flutter-engine when changing to version 2.10

* Rev buildroot to latest version.

* Update license.

* update.

* Update gn revision.

* Format BUILD.gn files as the gn revision has been updated.
2020-07-29 13:10:15 -07:00
gaaclarke
ee0e1788d9 Made the linter print out more information in its output and fixed bugs (flutter/engine#19895) 2020-07-22 15:38:09 -07:00
David Worsham
cbd3cd9c0d fuchsia: Enable most unittests (flutter/engine#19583)
Tweak the primary flutter build rule so that fuchsia is more similar to
other platforms in how tests and the shell are built.

Only embedder_unittests and GLFW tests are disabled on Fuchsia now.

TEST: Ran unittests on host/fuchsia; workstation on fuchsia
BUG: fxb/53847, fxb/54056
2020-07-13 17:36:19 -07:00
gaaclarke
851f2e76b0 Made the Rasterizer avoid GPU calls when backgrounded (flutter/engine#18563) 2020-05-26 21:02:40 -07:00
liyuqian
b5318d05ff More rename from GPU thread to raster thread (flutter/engine#17408)
This PR touches variable names, class names, and file names so it's significantly more risky than its predecessor https://github.com/flutter/engine/pull/17329

Due to file name changes, this PR is expected to change the license files.

We haven't rename `shell/gpu` to `shell/raster` yet. It should be optional but I think it's better to have `raster_surface_software.cc` than `gpu_surface_software.cc`.
2020-03-31 14:05:28 -07:00
liyuqian
10824995dd Rename GPU thread to raster thread in code comments (flutter/engine#17329)
1. Simple "GPU thread" to "raster thread" replacement.

2. Regex replace "GPU([\n\r\s]+//+ thread)" with "raster$1".

3. Regex replace "// gpu$" with "// raster".

4. Simple test change.

5. Run ci/format.sh
2020-03-25 22:49:59 -07:00