1001 Commits

Author SHA1 Message Date
Dan Field
e162fed336 Rename toGpuImage to toImageSync (flutter/engine#34504) 2022-07-08 19:41:05 +00:00
Jonah Williams
e2a2ad7c70 delete dl flag from allowlist (flutter/engine#34515) 2022-07-08 00:52:03 +00:00
JsouLiang
ba5bf62d28 Defer decisions about RasterCache actions until after Preroll is complete (flutter/engine#31892) 2022-06-29 20:59:06 -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
Dan Field
f7163f555c Roll SwiftShader, ANGLE, use SwANGLE in test harnesses (flutter/engine#33814)
Roll Swiftshader, ANGLE, and Vulkan deps.

Updates license bot for new locations of licenses and new files
in roll.

Converts unit test harnesses to use SwANGLE, which is the
supported way of using SwiftShader as a software backend for GLES.

Updates goldens due to swiftshader changes.

Fixes up include paths to avoid directly including third_party
code by that name, which is unlikely to work in other build
environments.

Includes upstream patches to ANGLE and SwiftShader to build in our
windows environments, as well as patches to Skia to support
defining the location of VulkanMemoryAllocator and a patch to ANGLE
to support opting into a newer version of VMA.
2022-06-23 16:43:39 -07:00
Dan Field
0586f7b588 Drop --enable-display-list flag, remove associated branched code (flutter/engine#34233) 2022-06-23 00:07:04 +00:00
Chinmay Garde
20def47959 Remove unactionable verbose log about ignored viewport metrics. (flutter/engine#34231) 2022-06-22 12:34:06 -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
728640769b dont pixel snap raster cache if SUPPORT_FRACTIONAL_TRANSLATION is enabled (flutter/engine#34002) 2022-06-13 16:43:05 -07:00
Alexander Markov
8292927857 Remove uses of --lazy-async-stack Dart VM flag (flutter/engine#33964) 2022-06-10 10:12:56 -07:00
Dan Field
45633ced2a Purge resources on rasterizer teardown (flutter/engine#33890) 2022-06-08 16:58:04 -07:00
Kaushik Iska
7a71b8cbb3 [android] set presentation time via eglPresentationTimeANDROID (flutter/engine#33881)
Attempt to reland: https://github.com/flutter/engine/pull/29727/ with some fixes.
2022-06-08 12:49:58 -04:00
Kaushik Iska
d5be7dccbc transform bounds to device space before sending to vmservice (flutter/engine#33853) 2022-06-06 14:28:04 -07:00
ColdPaleLight
b1ad898b4e Correct the frame timing in 'Rasterizer::Draw' when pipeline is more available (flutter/engine#32283) 2022-06-03 10:18:06 -07:00
Kaushik Iska
af6bbe756d Move the args for GLContextPresent into a struct (flutter/engine#33758)
This refactor enables easier additions to the method
for fields that can be optionally consumed by various
platforms.
2022-06-01 23:11:37 -04:00
Kaushik Iska
916f9bcab5 Fix layer tree snapshot values (flutter/engine#33753) 2022-06-01 10:18:05 -07:00
Chris Bracken
56fbdd0232 [lint] Enforce k prefix for global constants (flutter/engine#33666)
Enforces that all global constants are prefixed with a 'k' as per the
style guide and updates the codebase into conformance where necessary.

This does not change any public API.

Additional testing provided by the addition of the lint rule.

Ref: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#begin-global-constant-names-with-prefix-k
2022-05-27 18:33:38 -07:00
Shivesh Ganju
61a5c8873c [fuchsia] remove Fuchsia-specific kVsyncTraceName from VsyncWaiter. (flutter/engine#33519)
This CL changes the vsync trace name to "VsyncProcessCallback". The
benchmarks in fuchsia currently support "VsyncProcessCallback" and "vsync callback". After this change, support for "vsync callback" can be safely removed from fuchsia benchmarks.

Test: fx test host_x64/knowledge_card_test

Bug: 73367
2022-05-27 12:04:12 -07:00
Chris Yang
bf761b4c12 Fix test: make sure end_frame_latch is signaled after accessing the used_this_frame flag (flutter/engine#33649) 2022-05-26 20:02:20 -07:00
Chris Yang
190118f789 Set UsedThisFrame before EndFrame (flutter/engine#33627) 2022-05-26 14:10:04 -07:00
Kaushik Iska
796e65f687 Layer snapshots also contain bounds information (flutter/engine#33615) 2022-05-25 11:43:04 -07:00
Dan Field
a73d5b5fbe Reland Enable MSAA behind a flag for iOS (flutter/engine#33505) 2022-05-19 23:58:05 -07:00
Dan Field
fd6330c745 Revert "Enable MSAA behind a command line flag for iOS (#33461)" (flutter/engine#33481)
This reverts commit ce9f6b2e43e2d88934345ac96bcb366a144b3408.
2022-05-19 09:23:58 -07:00
Dan Field
ce9f6b2e43 Enable MSAA behind a command line flag for iOS (flutter/engine#33461) 2022-05-18 17:07:05 -07:00
Chinmay Garde
7df5e81ea8 [impeller] Wire up the OpenGL ES Backend. (flutter/engine#33405) 2022-05-17 13:16:25 -07:00
Jonah Williams
815195114e allow flutter tester to disable font loading from asset bundle (flutter/engine#33323) 2022-05-13 15:04:06 -07:00
Jonah Williams
8aef5df7b1 Add support for loading asset directly from ImmutableBuffer (flutter/engine#32999) 2022-05-10 19:39: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
Chris Bracken
1af24ccf62 Set Platform.executable on startup (flutter/engine#33127)
Previously, using Platform.executable (from dart:io) returned null (if
non-null-by-default was disabled) or threw an exception (if NNBD was
enabled) since we weren't setting it.

We now pass the executable name to Dart during VM startup based on the
first value in the FlutterProjectArgs::command_line_argv array passed to
FlutterEngineRun (or FlutterEngineInitialize) on startup. argv[0] (if
specified) is explicitly documented as being required to be the
executable name in embedder.h. In the case where no argv[0] is
specified, we instead set Platform.executable to "Flutter" in order to
avoid violating the (non-nullable) type annotation on
Platform.executable.

Note that dart::bin::SetExecutableName() does NOT make a copy of the
input string, so that value needs to be available for the entire lifetime
of the VM.

This also adds EmbedderConfigBuilder::SetExecutableName() to support
setting a fake executable name in unittests. By default, we continue to
set the name "embedder_unittest" unless overridden using this method.

See: https://api.flutter.dev/flutter/dart-io/Platform/executable.html
See: https://github.com/dart-lang/sdk/issues/48427

Issue: https://github.com/flutter/flutter/issues/83921
2022-05-05 11:14:16 -07:00
hellohuanlin
37048bc2f9 Fixed a few typos in comments (flutter/engine#33062) 2022-05-02 18:59:04 -07:00
Kaushik Iska
964aa6106f Revert "Skip LayerTree::Preroll LayerTree::Paint & Swapbuffer when frame_damage is empty (#32351)" (flutter/engine#33058)
This reverts commit 1dbe7a6cd5d7f9268daaffb97deacbed88c011b0.
2022-05-02 17:18:51 -04:00
Chris Bracken
0a84242538 WinUWP: Remove WinUWP sources, targets (flutter/engine#33019)
This removes:
* The Windows UWP emebedder sources and targets
* UWP-specific build targets
* UWP-specific code behind WINUWP #ifdefs
* UWP-specific TODOs.
* uwptool.exe sources and targets used for installing, uninstalling, and
  launching UWP apps.

This is a straight removal patch, and does not land any refactorings
made possible by removal of UWP support. Those patches will land in
followup refactorings.

Tool support was removed in:
https://github.com/flutter/flutter/pull/102174

The CI target was removed in:
https://github.com/flutter/engine/pull/33012

The Recipe was removed in:
https://flutter-review.googlesource.com/c/recipes/+/29500

GN build support was removed in:
https://github.com/flutter/engine/pull/33016

Issue: https://github.com/flutter/flutter/issues/102172
2022-04-29 18:39:36 -07:00
Zachary Anderson
29c36d406e Delete ShellTest::ResubmitFrame (flutter/engine#32972) 2022-04-27 16:39:03 -07:00
Dan Field
9e46531319 Remove redundant trace events (flutter/engine#32812) 2022-04-21 13:28:03 -07:00
ColdPaleLight
e9f78111c6 Clean obsolete 'shared_resource_context' (flutter/engine#32521) 2022-04-14 13:24:05 -07:00
linxuebin
1dbe7a6cd5 Skip LayerTree::Preroll LayerTree::Paint & Swapbuffer when frame_damage is empty (flutter/engine#32351) 2022-04-13 20:59:04 -07:00
Kaushik Iska
d8e73006e0 Add service protocol method to facilitate getting snapshots (flutter/engine#32628) 2022-04-13 13:39:05 -07:00
Jim Graham
bd89e4452a Designated field initialization of Paint/PrerollContexts (flutter/engine#32634) 2022-04-12 20:59:05 -07:00
Kaushik Iska
172d0b24e5 Enable leaf layer tracing in PaintContext (flutter/engine#32383) 2022-04-11 18:24:04 -07:00
Dan Field
4101b52aca Unify unhandled error reporting, add PlatformDispatcher.onError (flutter/engine#32078) 2022-04-09 14:44:04 -07:00
Dan Field
ec99c09baf Soft revert of 3a0d0b6e36deebc6d477daee9a3cc4dbd09a7900 (flutter/engine#32465) 2022-04-07 09:22:08 -07:00
Kevin Lubick
cdd2946003 Fix includes of SkColorSpace et al (flutter/engine#32382) 2022-04-01 10:59:23 -07:00
Kaushik Iska
a0f03a0220 Refactor drawing to offscreen surface (flutter/engine#32338) 2022-04-01 05:40:36 -04:00
ColdPaleLight
31e332ee32 Tuning resource cache max bytes in lightweight engine scenarios (flutter/engine#32156) 2022-03-31 21:11:05 -07:00
Matej Knopp
190cee38d1 Specify clip alignment for partial repaint (flutter/engine#31359)
* Specify clip alignment for partial repaint
2022-03-31 23:53:42 +02:00
Chinmay Garde
351494f717 Add support for images in display lists. (flutter/engine#32268) 2022-03-30 13:31:37 -07:00
ColdPaleLight
5850d41dd0 Make sure that 'BeginFrame' and 'EndFrame' of the 'ExternalViewEmbedder' are paired (flutter/engine#32058) 2022-03-24 14:25:03 -07:00
Chinmay Garde
3088a62e29 Allow surface implementations to control when the raster cache may be enabled. (flutter/engine#32213) 2022-03-23 10:23:14 -07:00
ColdPaleLight
9af8b0bf05 Fix crash about 'SkiaUnrefQueue::Drain' is called after 'IOManager' reset (flutter/engine#32106) 2022-03-21 14:45:10 -07:00
Dan Field
f396ea98b7 Enable MSAA behind a flag for Android GL, add TODOs for other platforms (flutter/engine#32128) 2022-03-21 11:10:05 -07:00