Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Windows] Improve performance by removing intermediary texture & blit #146013

Copy link
Copy link
Open
@loic-sharma

Description

@loic-sharma
Issue body actions

Background

The engine asks the Windows embedder for "backing stores" to render into. Previously, the engine treated backing stores of the same size as fully interchangeable. This was a problem as Windows's EGL surfaces are specific to a view. As a result, Windows's EGL surfaces could not be used directly as a backing store.

To workaround this, the Windows embedder creates intermediary textures for the engine's backing stores. The Windows embedder then blits these intermediary textures to the correct window surface.

This approach has drawbacks:

  1. It greatly increases memory usage (a window needs a front buffer, a back buffer, and an intermediary texture).
  2. It requires a blit from the intermediary texture to the back buffer.
  3. It fails if the machine does not support OpenGL blit: Windows Flutter apps crash silently on some machines after 3.27.4 #169178

This workaround is no longer necessary now that the Flutter engine's backing stores are view-specific. See: #145522

Solution

The Windows embedder should use the window's back buffer as the backing store. This should mirror how backing stores work on macOS.

Part of #142845

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectengineflutter/engine repository. See also e: labels.flutter/engine repository. See also e: labels.platform-windowsBuilding on or for Windows specificallyBuilding on or for Windows specificallyteam-windowsOwned by the Windows platform teamOwned by the Windows platform teamtriaged-windowsTriaged by the Windows platform teamTriaged by the Windows platform team

    Type

    No type

    Projects

    Status

    No status
    Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.