A RenderTile is already never created for a not renderable tile, guarantied by the checks in `updateRenderables()`.
However, the client code had plenty of `isRenderable()` checks in the render path, which complicated the code and affected rendering performance.
This patch removes the unneeded checks from the client code and puts an assertion to `TilePyramid::addRenderTile()`.
coordinatePointMatrix is always used with getZoom():
Projection::worldSize(scale) / std::pow(2, z) is computed as
scale * util::tileSize / std::pow(2, z)
scale is equal to std::pow(2, z).
____________________________________=>
Projection::worldSize(scale) / std::pow(2, z) => util::tileSize.
- Do not carry it over everywhere as parameter, it is a shared
instance anyway and the lifecycle is pretty much the app lifecycle
from the moment we instantiate a map.
- Rename to BackgroundScheduler because it is a Scheduler that will
do tasks in the background, we don't make assumptions if it is a
thread pool or a single thread.
- Most importantly, remove the dependency from `core` on `platform`.
Before this change, ImageManger's 'done' callback for onStyleImageMissing observer
notification that was created on renderer thread, could be called from different thread,
therefore, is not thread safe. For example, on Android platform, callback was invoked
from UI thread. This change makes callback to be scheduled on originating thread.
Symbols are placed accordingly to their viewport Y order,
if the style `symbol-z-order` is set to `viewport-y`.
This improves rendering of symbol layers, where icons are allowed
to overlap but not text.
JSON keys in our style specification don't have a defined order. This change sorts them alphabetically so that we can rely on the order remaining them same across code generation runs.
- Track images provided by client thruough onStyleImageMissing API
- Handle reduceMemoryUsage in ImageManager, via Renderer API
- Release client provided images when no tiles are using them
This simplifies the code and make it slightly more performant.
Also, this change enables initialization the `RenderTile.used`
field from inside the source (currently done in render layers).