Skip to content

RasterCache breaks unobstructed platform views. #116069

@knopp

Description

@knopp

I'm currently implementing platform views for macOS, trying to ensure that there is no view above platform view unless there is actual contents (unobstructed platform views) as described at the end of this design doc.

The way it works is that based on R-Tree obtained during drawing, individual CALayers are created each one showing appropriate part of overlay surface. This works well, until the raster cache kicks in. With raster cache, the drawing becomes one blit operation and the R-Tree region is not useful anymore.

I'm showing this on desktop, but I assume same things happens on iOS, which for example means that under some relatively opaque and unpredictable (for the user) conditions Google Ads may seemingly randomly stop working.

raster-cache-platform-view.mov

Blue rectangle is the platform view, yellow border means overlay CALayer. When raster cache is active, instead of 3 smaller layer overlays there is only one big.

Engine branch: https://github.com/knopp/engine/tree/macos_platform_views
Test project: https://github.com/knopp/layer_playground

Possible solution might be for raster cache to remember coverage rectangles and instead of blitting the entire surface, blit the individual rects.

@flar, @cyanglaz, @jonahwilliams

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: platform-viewsEmbedding Android/iOS views in Flutter appsengineflutter/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