198 Commits

Author SHA1 Message Date
Jason Simmons
ef5c2fc014 Do not stop flutter_tester if microtasks are still pending (flutter/engine#56432)
Flutter_tester has a task observer that checks whether the test's Dart code has finished execution.  If Dart no longer has live ports but does have pending microtasks, then flutter_tester should continue running and force a drain of the microtask queue.

Fixes https://github.com/flutter/flutter/issues/158129
2024-11-11 19:22:07 +00:00
Jim Graham
7da9ad1862 Delete VolatilePathTracker in favor of Dispatch tracking (flutter/engine#55125)
ui.Canvas and ui.SceneBuilder now use the DlPath object directly from the ui.Path object. This results in increased sharing of the wrapper objects which then increases the sharing of both the converted Impeller paths and Skia's volatile flag.

The VolatilePathTracker mechanism is deleted and rather than count the number of frames that a path is stable for, instead we count the number of times it is used for rendering. If a path is used 100 times in a single frame, it will become non-volatile and start being cached almost immediately. The cached Impeller paths are now also tracked for all instances of the same path, rather than for each call site that originated from a DisplayList dispatch.
2024-09-13 21:49:09 +00:00
Jonah Williams
9808dcbb8f [engine] remove raster stats feature. (flutter/engine#54187)
This debugging tool does not give accurate measurements and we've decided to remove it.

See also: https://github.com/flutter/flutter/issues/131941
2024-07-29 20:30:52 +00:00
Jonah Williams
578e769483 [Impeller] treat glyph atlas texture as source of truth, remove copy of SkBitmap. (flutter/engine#52567)
Work towards part of https://github.com/flutter/flutter/issues/138798

Allow updating single glyphs in the glyph atlas, without replacing the entire bitmap. Required to efficiently append/update to large atlases.
2024-05-10 21:39:47 +00:00
Tong Mu
dc82dbb0b9 Move Shell::Add/RemoveView to PlatformView and refine embedder API doc (flutter/engine#52003)
This PR moves the methods to add or remove views from `Shell` to
`PlatformView`. By design, the `Shell` is supposed to be a messenger
that glues classes together, while `PlatformView` is the operator that
embedders that do not use the embedder API should operate on. The
current design was made due to lack of knowledge to this design.

This also makes `PlatformView` aware of views, which might be a
prerequisite to https://github.com/flutter/engine/pull/51925.

This PR also adds some details to embedder API `AddView` and
`RemoveView`.

## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide] and the [C++,
Objective-C, Java style guides].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I added new tests to check the change I am making or feature I am
adding, or the PR is [test-exempt]. See [testing the engine] for
instructions on writing and running engine tests.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I signed the [CLA].
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[C++, Objective-C, Java style guides]:
https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
[testing the engine]:
https://github.com/flutter/flutter/wiki/Testing-the-engine
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2024-04-11 13:26:24 -07:00
Loïc Sharma
a01206ad39 Add completion callback to Shell::AddView (flutter/engine#51659)
In the future, `FlutterEngineAddView` will be added to the embedder API to allow embedders to add views. `FlutterEngineAddView` will accept a callback that notifies the embedder once the view has been added.

This embedder API will be powered by `Shell::AddView`. This change adds a completion callback to `Shell::AddView` to prepare for the embedder API.

Design doc: https://flutter.dev/go/multi-view-embedder-apis

Part of https://github.com/flutter/flutter/issues/144806
Part of https://github.com/flutter/flutter/issues/142845

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-29 00:39:10 +00:00
Loïc Sharma
21c9a731f0 [Embedder API] Remove view (flutter/engine#51400)
Adds `FlutterEngineRemoveView` to the embedder API. This will be used to destroy a view.

The embedder API does not allow embedders to create multiple views yet.

Design doc: https://flutter.dev/go/multi-view-embedder-apis

Part of https://github.com/flutter/flutter/issues/144806
Part of https://github.com/flutter/flutter/issues/142845

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-18 18:23:22 +00:00
Dan Field
ae9289f5c1 [Impeller] Make IPLR files multi-platform (flutter/engine#49253)
This is part of the work towards supporting OpenGLES and Vulkan for runtime stage shaders.

Removes some redundant work we had around SkSL. Now only bundles the shaders we actually ask for from the command line.

@bdero, we should figure out if this is the right approach for flutter_gpu.

With this change, the IPLR format goes from having a root table of shader related information to a root table of shader information per `sksl`, `metal`, `opengles`, and `vulkan` platforms. 

This may end up allowing us to revert https://github.com/flutter/engine/pull/47278, but I'm not sure I understand all the implications of that at this point.

I have run some but not all tests locally.
2023-12-21 06:17:26 +00:00
Matan Lurey
02f6c46771 Fix header-guard naming convention in shell/. (flutter/engine#49006)
Part of landing https://github.com/flutter/engine/pull/48903.

Some of these actually seem like potential owchy spots, i.e. `#ifndef FLUTTER_FLUTTER_H_`.
2023-12-14 23:37:22 +00:00
Matan Lurey
f9adfbc62c Make runtime/... and shell/common/... compatible with .clang-tidy. (flutter/engine#48158) 2023-11-20 14:31:49 -08:00
Tong Mu
6584b2c308 Reland 2 (part 1): Enforce the rule of calling FlutterView.Render (flutter/engine#47062)
This PR relands part of https://github.com/flutter/engine/pull/45300,
which was reverted in https://github.com/flutter/engine/pull/46919 due
to performance regression.

Due to how little and trivial production code the original PR touches, I
really couldn't figure out the exact line that caused it except through
experimentation, which requires changes to be officially landed on the
main branch. After this PR lands, I'll immediately fire a performance
test.

This PR contains the `Shell` refactor of the original PR. I made a
slight change where the isolate snapshot is no longer returned through
return value, but the parameter, in order to avoid the overhead of
assigning.

It is intentional to not contain any unit tests or other changes of the
original PR. They will be landed shortly after this PR.

Part of https://github.com/flutter/flutter/issues/136826.

## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide] and the [C++,
Objective-C, Java style guides].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I added new tests to check the change I am making or feature I am
adding, or the PR is [test-exempt]. See [testing the engine] for
instructions on writing and running engine tests.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I signed the [CLA].
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[C++, Objective-C, Java style guides]:
https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
[testing the engine]:
https://github.com/flutter/flutter/wiki/Testing-the-engine
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2023-10-18 14:09:01 -07:00
Tong Mu
f263e6a49f Revert "Reland: Enforce the rule of calling FlutterView.Render (#45300)" (flutter/engine#46919)
Reverts flutter/engine#45555 due to possible performance regression, b/304898239
2023-10-16 05:37:20 +00:00
Tong Mu
c7f206212a Multi-view Rasterizer (flutter/engine#45512)
This PR refactors `Rasterizer` so that it's more suitable for multi-view.

Design doc: [flutter.dev/go/multi-view-pipeline-and-rasterizer](http://flutter.dev/go/multi-view-pipeline-and-rasterizer)

With this change, `Rasterizer::DrawToSurfaces` has a structure that can handle drawing to multiple views, although the lack of some functionality still blocks it, mostly related to `ExternalViewEmbedder` and `RasterCache`. 

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-09-29 21:43:55 +00:00
Tong Mu
38b8ce1c29 Reland: Enforce the rule of calling FlutterView.Render (#45300) (flutter/engine#45555)
This PR relands #45300 which was reverted in https://github.com/flutter/engine/pull/45525 due to hanging on a windows startup test. The culprit test still calls `FlutterView.render` in the illegal way, which is ignored, causing no frame being ever produced. This has been fixed in https://github.com/flutter/flutter/pull/134245. I've also searched through the framework repo for `render(` to ensure there are no other cases.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-09-21 21:11:03 +00:00
Zachary Anderson
a1dcb39a45 Revert "Enforce the rule of calling FlutterView.Render" (flutter/engine#45525)
Reverts flutter/engine#45300

Speculative revert for the post-submit framework CI failure in `windows_startup_test`: https://ci.chromium.org/ui/p/flutter/builders/prod/Windows%20windows_startup_test/6227/overview
2023-09-07 01:35:09 +00:00
Tong Mu
0b39609150 Enforce the rule of calling FlutterView.Render (flutter/engine#45300)
This PR enforces the rules as documented in `FlutterView.Render`, where
calls in illegal situations should be ignored - but have never been
enforced.

```
  /// This function must be called within the scope of the
  /// [PlatformDispatcher.onBeginFrame] or [PlatformDispatcher.onDrawFrame]
  /// callbacks being invoked.
  ///
  /// If this function is called a second time during a single
  /// [PlatformDispatcher.onBeginFrame]/[PlatformDispatcher.onDrawFrame]
  /// callback sequence or called outside the scope of those callbacks, the call
  /// will be ignored.
```

This rule is very important to implementing multi-view without having to
introduce new APIs. However, currently these illegal calls are not
ignored, and historically many tests (especially integration tests) were
unknowingly running based on this fact. @goderbauer did great work by
eliminating these cases in g3, and it's time for us to make sure these
calls are ignored.

Most effort of this PR goes to unit testing the changes. Some part of
`Shell::Create` is extracted into a static function to avoid duplicate
code.

## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide] and the [C++,
Objective-C, Java style guides].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I added new tests to check the change I am making or feature I am
adding, or Hixie said the PR is test-exempt. See [testing the engine]
for instructions on writing and running engine tests.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I signed the [CLA].
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[C++, Objective-C, Java style guides]:
https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
[testing the engine]:
https://github.com/flutter/flutter/wiki/Testing-the-engine
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2023-09-06 12:56:42 -07:00
yaakovschectman
e2908808b6 Add callback to Embedder API to respond to new channel listeners, and use for Windows lifecycle (flutter/engine#44827)
Supplant the temporary solution
https://github.com/flutter/engine/pull/44238 with a more elegant
solution with am embedder API callback. The windows engine provides a
callback that enables graceful exit and app lifecycle when the platform
and lifecycle channels are listened to, respectively.

https://github.com/flutter/flutter/issues/131616

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide] and the [C++,
Objective-C, Java style guides].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I added new tests to check the change I am making or feature I am
adding, or Hixie said the PR is test-exempt. See [testing the engine]
for instructions on writing and running engine tests.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [ ] I signed the [CLA].
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[C++, Objective-C, Java style guides]:
https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
[testing the engine]:
https://github.com/flutter/flutter/wiki/Testing-the-engine
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat

---------

Co-authored-by: Chris Bracken <chris@bracken.jp>
2023-08-29 16:12:35 -04:00
Tong Mu
f26ad84d14 Move Rasterizer::Draw's discard_callback to Delegate (flutter/engine#44813)
This PR `Rasterizer::Draw`'s `discard_callback` parameter, which is
assigned by `Shell`, to `Delegate`, which is also implemented by
`Shell`. This refactory makes the API cleaner.

## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide] and the [C++,
Objective-C, Java style guides].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I added new tests to check the change I am making or feature I am
adding, or Hixie said the PR is test-exempt. See [testing the engine]
for instructions on writing and running engine tests.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I signed the [CLA].
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[C++, Objective-C, Java style guides]:
https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
[testing the engine]:
https://github.com/flutter/flutter/wiki/Testing-the-engine
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2023-08-22 21:25:30 -07:00
LongCatIsLooong
649a1e181c Reland "Implementing TextScaler for nonlinear text scaling (#42062)" (flutter/engine#44907)
The original PR crashes because of a JNI signature mismatch (`(FJ)F` -> `(FI)F`). Update the signature in a415da5619

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-08-21 23:16:10 +00:00
Jonah Williams
6f3b341232 Revert "Implementing TextScaler for nonlinear text scaling" (flutter/engine#44882)
Reverts flutter/engine#42062

Failing due to:

>>>>>>>> 08-18 15:59:41.350 3439 3484 E flutter :
[ERROR:flutter/shell/platform/android/platform_view_android_jni_impl.cc(902)]
Could not locate FlutterJNI#getScaledFontSize method
>>>>>>>> 08-18 15:59:41.350 3439 3484 F flutter :
[FATAL:flutter/shell/platform/android/library_loader.cc(26)] Check
failed: result.
2023-08-20 14:10:13 -07:00
LongCatIsLooong
7d07749fdd Implementing TextScaler for nonlinear text scaling (flutter/engine#42062)
`platformTextScaler` doesn't need to be per window, assuming the SP -> DiP mapping is always the same on the same device (unless the user changes the preference), and does not depend on the display device's pixel density (it's confirmed).

Design doc: https://docs.google.com/document/d/1-DlElw3zWRDlqoc9z4YfkU9PbBwRTnc7NhLM97ljGwk/edit#

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-08-18 22:22:16 +00:00
Tong Mu
177a6128c1 Basic view management for engine classes (flutter/engine#42991)
_This PR is part of the multiview engine project. For a complete roadmap, see [this doc](https://docs.google.com/document/d/10APhzRDR7XqjWdbYWpFfKur7DPiz_HvSKNcLvcyA9vg/edit?resourcekey=0-DfGcg4-XWRMMZF__C1nmcA)._

------

This PR adds view management to all engine classes that need it. View management here basically means `AddView` and `RemoveView` methods, and most importantly, how to handle the implicit view.

The implicit view is a special view that's handled differently than all the other "regular views", since it keeps the behavior of the current single view of Flutter. Detailed introduction can be found in `Settings.implicit_view_enabled`.

The following two graphs show the difference between initializing with/without the implicit view and creating regular views.

<img width="879" alt="image" src="https://github.com/flutter/engine/assets/1596656/31244685-d9d3-4c9a-9a9e-6e8540a5711e">

<img width="864" alt="image" src="https://github.com/flutter/engine/assets/1596656/e2dd4b8c-57e3-428d-8547-834fb270052b">

<img width="860" alt="image" src="https://github.com/flutter/engine/assets/1596656/58dae687-8c17-434e-ae24-a48c2d8fa5fa">

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-08-17 20:06:25 +00:00
Chris Yang
eacae26086 Refactor: fix typo "setup" -> "set up" (flutter/engine#43824)
There are several places in the engine using the word "setup" incorrectly. I have changed them to "set up"

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-07-21 17:06:34 +00: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
Dan Field
b6fa0a20a5 Print a warning when a message channel is used on the wrong thread. (flutter/engine#42928)
Fixes https://github.com/flutter/flutter/issues/128746

Prints a warning the first time a platform channel sends a message from the wrong thread with instructions/link to the site about how to fix this.
2023-06-22 18:16:40 +00:00
Dan Field
83b6fa4ff7 [Impeller] Avoid encoding metal commands while the GPU is unavailable when decoding images. (flutter/engine#42349)
Fixes https://github.com/flutter/flutter/issues/126878

This disables device private upload on iOS when backgrounded, and disables mipmap generation when backgrounded.

We don't have a good way to test the core problem in this repo because it only reproduces on physical iOS hardware - simulators don't really care if you do this stuff in the background.

I'll write a devicelab test in the framework to capture this. In the mean time it can be reviewed.

We could consider making the IOManager a shared_ptr instead of having an fml::WeakPtr and that'd clean up some of the extra arguments to engine construction - or we could consider vending the sync switch from impeller::Context unconditionally, but it's pretty iOS specific...
2023-05-26 18:46:33 +00:00
Dan Field
f9b687885e [Impeller] avoid creating multiple concurrent message loops for Andorid Vulkan (flutter/engine#42146)
Fixes https://github.com/flutter/flutter/issues/127160

We should avoid creating multiple message loops that each have as many threads as processors on the machine.
2023-05-20 03:41:18 +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
Loïc Sharma
c6f9e5cebd [Shell] Update stale comments after multi-view (flutter/engine#39298) 2023-01-31 23:58:10 +00:00
Chris Bracken
dc3033d922 Clarify semantics action dispatch id parameter (flutter/engine#38356)
Previously the embedder API documented this as an action ID, but it's
actually the semantics node ID. This fixes the docs and renames the
parameter to clarify its purpose.

This callback is registered in the framework render bindings:
9102f2fe0b/packages/flutter/lib/src/rendering/binding.dart (L43)

Handled by `_handleSemanticsAction`:
9102f2fe0b/packages/flutter/lib/src/rendering/binding.dart (L360-L366)

Which invokes `SemanticsOwner.performAction`, where the node is looked up by ID:
9102f2fe0b/packages/flutter/lib/src/semantics/semantics.dart (L3258-L3277)
2022-12-16 13:40:48 -08:00
Dan Field
020577edbb Make NotifyIdle reject close and past deadlines. (flutter/engine#37737)
This patch also eliminates some extraneous tracing that is happening
every frame. It is possible to get the same trace calls by enabling
the API stream if needed.

Also refactors the NotifyIdle callsites to just always work in
TimeDeltas rather than converting back and forth between them and
TimePoints, which I think reads more clearly.
2022-11-18 18:17:53 +00:00
Dan Field
181a1728f1 Always use fml::TaskRunnerAffineWeakPtr for SnapshotDelegate (flutter/engine#36772) 2022-10-14 18:09:29 -07:00
gaaclarke
e41c775200 Removed instances of unnecessary values (flutter/engine#36221) 2022-09-26 21:28:04 +00:00
gaaclarke
42c469183e Started handling messages from background isolates for iOS (flutter/engine#35174) 2022-09-08 00:03:27 +00:00
ColdPaleLight
e9ad8e2454 [Impeller] Implement ui.Picture.toImage() (flutter/engine#35633) 2022-09-01 22:59:41 +00:00
Jonah Williams
1245043020 Support hot reload of asset fonts (flutter/engine#35213) 2022-08-08 18:06:05 +00: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
916f9bcab5 Fix layer tree snapshot values (flutter/engine#33753) 2022-06-01 10:18:05 -07:00
hellohuanlin
37048bc2f9 Fixed a few typos in comments (flutter/engine#33062) 2022-05-02 18:59:04 -07:00
ColdPaleLight
e9f78111c6 Clean obsolete 'shared_resource_context' (flutter/engine#32521) 2022-04-14 13:24:05 -07:00
Kaushik Iska
d8e73006e0 Add service protocol method to facilitate getting snapshots (flutter/engine#32628) 2022-04-13 13:39:05 -07:00
ColdPaleLight
31e332ee32 Tuning resource cache max bytes in lightweight engine scenarios (flutter/engine#32156) 2022-03-31 21:11:05 -07:00
Chris Yang
840af99590 Make Get GetVsyncWaiter return weak_ptr to prevent dangling pointer crash (flutter/engine#32121) 2022-03-21 11:05:05 -07:00
ColdPaleLight
05bb17d606 Always update the latest frame target time when the 'Animator::Render' method is called (flutter/engine#31973) 2022-03-21 09:35:02 -07:00
Chinmay Garde
34f3581a3c Switch the renderer to impeller based on the presence of a command line flag. (flutter/engine#31959)
Specifying the `--enable-impeller` flag will switch the renderer to using
Impeller instead of Skia. On platforms where Impeller is not supported, this
flag is ignored.

The notion of the `flutter::SurfaceFrame` has been augmented. Now, in the
absence of a Skia surface to render to, the surface frame will render into a
display list instead.

Impeller variants of the context and surface variants have been added to
`shell/gpu` and `shell/platform`. The variants prepare surface frames that
don’t/can’t specify a Skia surface thus forcing the surface frame to render to a
display list instead. Then, in the submit callback, they forward the display
list ops to the Impeller display list dispatcher.

This scheme has been chosen as it requires the fewest updates to engine
internals which all depend on Skia data structures. Instead of updating all
call-sites to be Skia neutral, the display list interface itself is being made
graphics package agnostic.
2022-03-15 14:12:53 -07:00
ColdPaleLight
043d9d2e39 Add an embedder.h API for scheduling frame (flutter/engine#31304) 2022-02-17 13:24:10 -08:00
ColdPaleLight
b64598bef6 Refactor type of deadline in the method NotifyIdle to fml::TimePoint (flutter/engine#30737) 2022-01-19 17:25:09 -08:00
gaaclarke
1724b4f192 Reland: iOS Background Platform Channels (#29665) (flutter/engine#30697)
* iOS Background Platform Channels (#29665)

* added test that passes before this change, and fails after it

* started supporting backwards compatible usage of setting handlers
2022-01-12 09:57:29 -08:00
Chris Yang
a50ebf3955 Variable Refresh Rate Display (flutter/engine#30223) 2022-01-11 10:55:10 -08:00
eggfly
6b1d2dcdbc Share the io_manager between parent and spawn engine (flutter/engine#29915) 2021-12-01 10:34:01 -08:00