Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@jason-simmons
Copy link
Member

In #41059 the Android context and surface were changed to share one impeller::ContextVK across all instances of AndroidSurfaceVulkanImpeller. However, the ContextVK holds a reference to the current swapchain. If an app uses multiple AndroidSurfaceVulkanImpeller instances (e.g. for platform views), then one surface may overwrite the ContextVK's swapchain while another surface is trying to render.

This patch allows each surface to get its own impeller::Context instance holding a swapchain tied to that surface. The per-surface contexts will delegate most operations to the shared parent ContextVK.

@jason-simmons jason-simmons requested a review from dnfield July 31, 2023 16:18
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

…and its swapchain

In flutter#41059 the Android context and
surface were changed to share one impeller::ContextVK across all
instances of AndroidSurfaceVulkanImpeller.  However, the ContextVK
holds a reference to the current swapchain.  If an app uses multiple
AndroidSurfaceVulkanImpeller instances (e.g. for platform views), then
one surface may overwrite the ContextVK's swapchain while another
surface is trying to render.

This patch allows each surface to get its own impeller::Context
instance holding a swapchain tied to that surface.  The per-surface
contexts will delegate most operations to the shared parent ContextVK.
@jason-simmons jason-simmons force-pushed the iplr_vulkan_surface_sub_context branch from ee5f5f0 to 0f13702 Compare July 31, 2023 16:57
@jason-simmons jason-simmons added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 31, 2023
@auto-submit auto-submit bot merged commit b606cc4 into flutter:main Jul 31, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 31, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 31, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 31, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jul 31, 2023
…131638)

flutter/engine@b83172a...fe23695

2023-07-31 [email protected] Roll ANGLE from faca95f7e81b to 196713767078 (7 revisions) (flutter/engine#44191)
2023-07-31 [email protected] Mention the point of BlendMode.plus and advise on using it. (flutter/engine#44189)
2023-07-31 [email protected] Roll Skia from db813f4043fe to 2e5f08012a92 (1 revision) (flutter/engine#44187)
2023-07-31 [email protected] [Impeller] Update guidance on how to try Impeller on macOS Desktop. (flutter/engine#44186)
2023-07-31 [email protected] [Impeller] Add a descriptive blurb about newer Impeller components and fix links. (flutter/engine#44183)
2023-07-31 [email protected] Roll Skia from 06174bc8f4d5 to db813f4043fe (1 revision) (flutter/engine#44182)
2023-07-31 [email protected] [Impeller] Create a wrapper Impeller context for each Vulkan surface and its swapchain (flutter/engine#44171)
2023-07-31 [email protected] Roll Skia from ea0c9c0935ae to 06174bc8f4d5 (2 revisions) (flutter/engine#44179)
2023-07-31 [email protected] Roll ANGLE from 2755f73a3461 to faca95f7e81b (1 revision) (flutter/engine#44178)
2023-07-31 [email protected] Roll Skia from 9c12eb0e158a to ea0c9c0935ae (4 revisions) (flutter/engine#44177)
2023-07-31 [email protected] Roll Skia from 685e29df6704 to 9c12eb0e158a (2 revisions) (flutter/engine#44173)
2023-07-31 [email protected] Roll Skia from cb61dd4af8a5 to 685e29df6704 (2 revisions) (flutter/engine#44170)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
vashworth pushed a commit to vashworth/flutter that referenced this pull request Aug 2, 2023
…lutter#131638)

flutter/engine@b83172a...fe23695

2023-07-31 [email protected] Roll ANGLE from faca95f7e81b to 196713767078 (7 revisions) (flutter/engine#44191)
2023-07-31 [email protected] Mention the point of BlendMode.plus and advise on using it. (flutter/engine#44189)
2023-07-31 [email protected] Roll Skia from db813f4043fe to 2e5f08012a92 (1 revision) (flutter/engine#44187)
2023-07-31 [email protected] [Impeller] Update guidance on how to try Impeller on macOS Desktop. (flutter/engine#44186)
2023-07-31 [email protected] [Impeller] Add a descriptive blurb about newer Impeller components and fix links. (flutter/engine#44183)
2023-07-31 [email protected] Roll Skia from 06174bc8f4d5 to db813f4043fe (1 revision) (flutter/engine#44182)
2023-07-31 [email protected] [Impeller] Create a wrapper Impeller context for each Vulkan surface and its swapchain (flutter/engine#44171)
2023-07-31 [email protected] Roll Skia from ea0c9c0935ae to 06174bc8f4d5 (2 revisions) (flutter/engine#44179)
2023-07-31 [email protected] Roll ANGLE from 2755f73a3461 to faca95f7e81b (1 revision) (flutter/engine#44178)
2023-07-31 [email protected] Roll Skia from 9c12eb0e158a to ea0c9c0935ae (4 revisions) (flutter/engine#44177)
2023-07-31 [email protected] Roll Skia from 685e29df6704 to 9c12eb0e158a (2 revisions) (flutter/engine#44173)
2023-07-31 [email protected] Roll Skia from cb61dd4af8a5 to 685e29df6704 (2 revisions) (flutter/engine#44170)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
gaaclarke pushed a commit to gaaclarke/engine that referenced this pull request Aug 30, 2023
…and its swapchain (flutter#44171)

In flutter#41059 the Android context and surface were changed to share one impeller::ContextVK across all instances of AndroidSurfaceVulkanImpeller.  However, the ContextVK holds a reference to the current swapchain.  If an app uses multiple AndroidSurfaceVulkanImpeller instances (e.g. for platform views), then one surface may overwrite the ContextVK's swapchain while another surface is trying to render.

This patch allows each surface to get its own impeller::Context instance holding a swapchain tied to that surface.  The per-surface contexts will delegate most operations to the shared parent ContextVK.
auto-submit bot pushed a commit that referenced this pull request Jan 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App e: impeller platform-android

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants