Alexander Shalamov
d24524440c
[core] Add onRemoveUnusedStyleImages observer API
2019-05-21 06:49:17 -07:00
Alexander Shalamov
521ac5c993
[core] Check if pattern dependencies or pattern positions are missing
...
Add check for optional pattern dependencies and don't bind empty vertex
buffers if pattern positions are missing.
2019-05-20 01:19:04 -07:00
Mikhail Pozdnyakov
9fe5256ce7
[core] Avoid bucket downcasting in Placement
2019-05-19 18:15:33 +03:00
Mikhail Pozdnyakov
18ddced9b6
[core] Remove Bucket::supportsLayer
2019-05-19 18:15:33 +03:00
Mikhail Pozdnyakov
f2ad89c463
[core] Remove RenderLayerSymbolInterface
2019-05-19 18:15:33 +03:00
Mikhail Pozdnyakov
44fd6dcf7c
[core] Placement accepts RenderLayer instances
2019-05-19 18:15:33 +03:00
Mikhail Pozdnyakov
febe696d4b
[core] Avoid unneeded proj matrix calculations in renderer
2019-05-19 18:15:33 +03:00
Mikhail Pozdnyakov
0e45138547
[core] RenderLayerSymbolInterface is not used in CrossTileSymbolIndex
2019-05-19 18:15:33 +03:00
Konstantin Käfer
3a6ff7710f
[core] add gfx::UploadPass, split startRender into prepare and upload
2019-05-15 11:57:43 -07:00
Konstantin Käfer
bf0998697e
[core] don't upload empty buffers
2019-05-15 11:57:43 -07:00
Konstantin Käfer
179c5fe83b
[core] add gfx::CommandEncoder::present()
2019-05-15 11:57:43 -07:00
Konstantin Käfer
da5bd4d6e3
[core] use unique IDs for DrawScopes
2019-05-15 11:57:43 -07:00
Mikhail Pozdnyakov
5b6a262e15
[core] GeometryTile and TileLoader keep strong reference to FileSource
...
Thus we fix a potential bug: if `Renderer` outlives the `Map` it will hold a stale reference to the `FileSource` instance.
2019-05-14 11:29:24 +03:00
Mikhail Pozdnyakov
953ee5e81b
[core] Create glyph manager at renderer construction time
...
Avoid unnecessary glyph manager presence check in `Renderer::Impl::()`.
2019-05-14 11:29:24 +03:00
Mikhail Pozdnyakov
81823e35a6
[core] RenderTile shall never be created for a not renderable tile
...
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()`.
2019-05-14 11:19:56 +03:00
Thiago Marcos P. Santos
06f1dc48a2
[core] Make the BackgroundScheduler a singleton
...
- 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`.
2019-05-10 14:20:38 +03:00
Mikhail Pozdnyakov
b41f39d545
[core] Make ActorRef methods const
...
So that the lambdas calling these methods do not have to be mutable.
2019-05-10 11:59:02 +03:00
Alexander Shalamov
a53c4593d6
[core] Schedule invocation of onStyleImageMissing completion callback on the same thread
...
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.
2019-05-09 20:45:06 +03:00
Mikhail Pozdnyakov
cb73f0dd1c
[core] Remove clipping option from RenderTile and style::Layer
2019-05-08 15:18:33 +03:00
Konstantin Käfer
a53c88159f
[core] upgrade mapbox-gl-js pin to the most recent version
2019-05-08 14:10:11 +02:00
Konstantin Käfer
20a807fdf3
[core] render extrusions directly in the main framebuffer
2019-05-08 12:25:22 +02:00
Mikhail Pozdnyakov
ef48d53e78
[core] Placement order matches viewport-y sort
...
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.
2019-05-08 12:21:47 +03:00
Mikhail Pozdnyakov
4c8295e672
[core] Less strict rules for adding render layers to sources
2019-04-29 17:03:23 +03:00
Konstantin Käfer
08163713e2
[core] change approach to stencil clipping to (almost) match JS
2019-04-29 11:37:39 +02:00
Alexander Shalamov
5e04091795
[core] Store type of renderable segment when sorting symbols by key
2019-04-26 15:02:38 +03:00
Mikhail Pozdnyakov
3832a081cb
[core] RendererImpl::dumDebugLogs() -> dumpDebugLogs()
2019-04-25 17:44:00 +03:00
Mikhail Pozdnyakov
f392053df6
[core] Create ImageManager at renderer construction
2019-04-25 17:44:00 +03:00
Alexander Shalamov
83c33cdeb2
[core] Pass ImageManager to ImageRequestor's constructor
...
This makes ImageRequestor API explicitly dependant on ImageManager, so that
ImageRequestor can unregister itself from ImageManager on destruction.
2019-04-25 10:00:23 +03:00
Alexander Shalamov
9a70e755dc
[core] Track missing style images that were provided by client
...
- 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
2019-04-25 10:00:23 +03:00
Mikhail Pozdnyakov
858097102d
[core] Render layers use synchronized buckets and paint properties
...
Actual for layers rendering the geometry tile data: line, fill, fill-extrusion, heatmap, circle, symbol (was updated in previous commits).
2019-04-17 17:21:41 +03:00
Mikhail Pozdnyakov
b96d824b2d
[core] Simplify RenderLayer interface.
2019-04-17 17:21:41 +03:00
Mikhail Pozdnyakov
150b427300
[core] Update style::LayerProperties instances in tiles
2019-04-17 17:21:41 +03:00
Mikhail Pozdnyakov
7a7192516f
[core] Introduce LayerRenderData. Source::update() accepts layer properties.
2019-04-17 17:21:41 +03:00
Mikhail Pozdnyakov
4b21560cf5
[core] Use style::LayerProperties in render layers, buckets and layouts.
2019-04-17 17:21:41 +03:00
Alexander Shalamov
113e96e03c
[core] Sort cross-tile symbol segments using symbol-sort-key
2019-04-17 15:04:08 +03:00
Mikhail Pozdnyakov
4bc79cf4ff
Use emplace_hint for inserting render items
2019-04-12 16:17:57 +03:00
Mikhail Pozdnyakov
feaff9260e
[core] Order render items properly across several sources
2019-04-12 16:17:57 +03:00
Mikhail Pozdnyakov
8faf47ab5e
[core] Pass only visible render layers to source in renderer
...
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).
2019-04-09 13:04:21 +03:00
Ansis Brammanis
104091cd93
fix firing onStyleImageMissing after sprite has loaded ( #14369 )
2019-04-08 16:28:55 -04:00
Konstantin Käfer
3ceabcd3ec
[core] clang-tidy fixes
2019-04-05 11:49:17 +02:00
Konstantin Käfer
d7aaf83421
[core] introduce gfx::RenderPass
2019-04-05 11:49:17 +02:00
Konstantin Käfer
b1a2513b61
[core] test OffscreenTexture renderability before using them
2019-04-05 11:49:17 +02:00
Konstantin Käfer
7081d5e154
[core] move depth/stencil buffer debug viz to gfx::Context
2019-04-05 11:49:17 +02:00
Konstantin Käfer
1d58850d0c
[core] remove Renderer::flush
2019-04-05 11:49:17 +02:00
Konstantin Käfer
5cc3d7a733
[core] move GLContextMode to RendererBackend
2019-04-05 11:49:17 +02:00
Konstantin Käfer
4053776c27
[core] use unique names for debug segments
2019-04-05 11:49:17 +02:00
Konstantin Käfer
4f735db9d8
[core] move RenderParameters creation to a later stage
2019-04-05 11:49:17 +02:00
Konstantin Käfer
66c020034e
[core] refactor RendererBackend
2019-04-05 11:49:17 +02:00
Konstantin Käfer
a782a6d15b
[core] move BackendScope to gfx namespace
2019-04-05 11:49:17 +02:00
Konstantin Käfer
865f8a6c03
[core] add gfx::Renderable and gfx::OffscreenTexture
2019-04-05 11:49:17 +02:00