Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

SpriteAtlas never deletes unused sprite images. #2202

@mb12

Description

@mb12

Since SpriteAtlas never deletes unused sprite images, the MBGL renderer silently drops images used in line and symbol placements (not silent if you turn on debugSpriteWarnings). This effectively means we are not rendering symbols even though they are not colliding with any other symbols.

I've included details below:

  1. Whenever an image needs to be used in a symbol or as a pattern in line or fill, it needs to be first bin - packed into the SpriteAtlas.
  2. BinPacking can fail.
  3. When BinPacking fails, the renderer silently drops those symbols even though Collision detection wouldn't have dropped those symbols otherwise.

Since SpriteAtlas is shared between map sprites and user annotation images, one could theoretically fill up the SpriteAtlas with distinct images. Once that happens no symbols will be rendered.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CoreThe cross-platform C++ core, aka mbglbug

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions