Skip to content

Handle thread merging (platform views) with engines that shared components #73620

@gaaclarke

Description

@gaaclarke

Thread merging on one engine after it has spawned from another could lead to multiple threads accessing shared resources from different engines.

image

Looks like a short term "fix" would be to create a new ExternalViewEmbedder that returns false to "SupportsDynamicThreadMerging" and crashes with an appropriate message. It looks like the best way to actually solve the issue is to share the RasterThreadMerger between the engines. The way it is implemented is that the external view embedder asks it if it is merged when a platform view is present, if not it merges it. So, the first engine that runs into a platform view will just merge it.

We should attempt a full fix if it becomes difficult we can just do the crash/message for now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectcustomer: alibabaengineflutter/engine related. See also e: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions