Skip to content

Synchronize StyleLayer and Bucket/Buffer state #4012

Open

Description

@anandthakker

The state needed by the painter_xxx modules to render tiles is split up into two places:

  • The map-wide Style / StyleLayer structure, which dictates the layers to be rendered, their types, and the layout/paint definitions that control their details.
  • The per-source Tile objects (managed by SourceCache, populated by Sources, often via Worker requests), which hold Buckets (one per StyleLayer) of buffers containing vertex positions, colors, etc.

These can get out of sync when client code mutates the Style, e.g.:

In each of these cases, we have to work around the possibility that when the Style is updated, we could have one or more render cycles where some Tiles are stale, carrying Bucket state that corresponds to the pre-updated style layers.

Activity

  1. jfirebaugh commented on Oct 27, 2017

    @jfirebaugh
    Contributor

    I'm marking #3949 and #3453 as duplicates of this issue, since this issue states the problem most generally, but note that those other issues have good discussion of specific aspects of this problem.

  2. self-assigned this
    on Nov 9, 2017
  3. anandthakker commented on Mar 30, 2018

    @anandthakker
    ContributorAuthor

    In #3453, @ansis suggests that we should aim for solution wherein all tiles being rendered have been laid out using the same view of the style.

    If want to do that -- and even if we don't -- I think #4875 will make this much more tractable. Once we have an immutable Style object, having each Tile hold a reference to the Style with which it was created will be pretty straightforward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions