Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Split platform and render threads on Linux #155045

@robert-ancell

Description

@robert-ancell

Currently Linux uses the same thread for the platform and render tasks, see fl_engine.cc:

  FlutterCustomTaskRunners custom_task_runners = {};
  custom_task_runners.struct_size = sizeof(FlutterCustomTaskRunners);
  custom_task_runners.platform_task_runner = &platform_task_runner;
  custom_task_runners.render_task_runner = &platform_task_runner;

Other platforms use separate threads. Consider doing this for Linux.

The side effect is FlutterCompositor.present_view_callback will be called from a different thead and require synchronization. There will also have to be careful management around resizing as the present may not be in the expected size.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectplatform-linuxBuilding on or for Linux specificallyteam-linuxOwned by the Linux platform teamtriaged-linuxTriaged by the Linux platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions