Skip to content

PrerollContext.has_texture_layer is sticky and impacts layers unrelated to the TextureLayer #103013

@flar

Description

@flar

Looking at the code in ContainerLayer::PrerollChildren, there are 2 flags that are accumulated on a subtree basis: has_platform_layer and has_texture_layer. The has_platform_layer flag appears to be accumulated within a subtree but only affects parents and ancestors. The has_texture_layer flag, however, is only ever set and never reset so once a layer is encountered it leads all future layers, including its siblings, its downstream cousins, and the entire tree that is visited after it to believe that they are part of a subtree that contains a TextureLayer.

The logic should be updated to match how has_platform_layer is accumulated.

Relevant source code: https://github.com/flutter/engine/blob/0b46116471cc0ad4bb5a4d2fa80a49061d1d4b0d/flow/layers/container_layer.cc#L136

The logic was introduced in flutter/engine#23793

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listengineflutter/engine related. See also e: labels.team-engineOwned by Engine teamtriaged-engineTriaged by Engine teamwaiting for PR to land (fixed)A fix is in flight

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions