Commit Graph

127 Commits

Author SHA1 Message Date
Konstantin Käfer
81667ae4e9 [core] end the RenderPass/CommandEncoder before sending events 2019-05-28 16:11:05 +02:00
Mikhail Pozdnyakov
a03f7b166b [core] RenderTile does not expose Tile
RenderTile and Tile will be split when ochestration movces to a separate thread.

This PR improves encapsulation of Tiles management: now performed within TilePyramid.
2019-05-28 16:16:42 +03:00
Mikhail Pozdnyakov
aa3a7cf02f [core] SymbolBucket updates complete at placement stage
`RenderSymbolLayer` does not have to update dynamic vertices of its buckets, this logic is moved to placement (which is already updates opacity vertices).

* fixes clustering of labels when text variable placement enabled - as assignes `usesVariablePlacement` per bucket
* simplifies the code in `RenderSymbolLayer` (the `RenderSymbolLayer::upload()`	is now omitted).
* symbol buckets are not modified after orchestration finishes
2019-05-24 10:54:06 +03:00
Mikhail Pozdnyakov
e79080771b [core] RenderLayer::render(PaintParameters, RenderSource*) -> render(PaintParameters) 2019-05-22 16:41:10 +03:00
Mikhail Pozdnyakov
25093370e2 [core] RenderLayer::setRenderTiles(RenderTiles) -> prepare(LayerPrepareParameters)
RenderLayer::prepare() is responsible for the complete initialization of a render
layer, so that it can render.
2019-05-22 16:41:10 +03:00
Mikhail Pozdnyakov
84d3b5f899 [core] Prepare render sources before render layers are initialized 2019-05-22 16:41:10 +03:00
Alexander Shalamov
100eb61fa4 [core] Forward ImageManagerObserver::onRemoveUnusedStyleImages to MapObserver interface 2019-05-21 06:49:17 -07:00
Alexander Shalamov
d24524440c [core] Add onRemoveUnusedStyleImages observer API 2019-05-21 06:49:17 -07: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
179c5fe83b [core] add gfx::CommandEncoder::present() 2019-05-15 11:57:43 -07: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
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
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
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
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
b96d824b2d [core] Simplify RenderLayer interface. 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
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
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
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
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
c02010ab6c [core] move debug groups to gfx::CommandEncoder 2019-04-05 11:49:17 +02:00
Konstantin Käfer
543b678982 [core] introduce CommandEncoder object 2019-04-05 11:49:17 +02:00
Konstantin Käfer
394e2aa717 [core] prefer static_cast for casts to derived classes 2019-04-05 11:49:17 +02:00
Konstantin Käfer
be3b5917c1 [core] add generic base class for renderbuffers 2019-04-05 11:49:17 +02:00
Konstantin Käfer
839f4687aa [core] gl::RenderbufferType -> gfx::RenderbufferPixelType 2019-04-05 11:49:17 +02:00
Mikhail Pozdnyakov
1a5b933983 [core] Minor performance tweaks in renderer impl 2019-04-04 20:28:23 +03:00
Mikhail Pozdnyakov
4b19324c74 [core] Renderer: initialize render items and render sources in the same cycle 2019-04-04 20:28:23 +03:00
Ansis Brammanis
2455275bf4 add onStyleImageMissing to allow dynamically loaded or generated images (#14253)
Also make `Style#updateImage(...)` much faster when the image doesn't change size. This can be useful for asynchronously generating images.
2019-04-02 12:57:45 -04:00
Mikhail Pozdnyakov
45e8154d33 [core] Simplify render symbol layer initialization
Obviate few extra calls from the renderer impl parts initializing symbol layers.
2019-04-02 17:40:53 +03:00
Mikhail Pozdnyakov
2292623bc6 [core] Introduce variable text placement for point labels - Placement part 2019-03-29 16:18:41 +02:00
Thiago Marcos P. Santos
3122df7e50 [core] Expose a way of flushing the graphics pipeline
Useful for apps before going to background that are
restricted by the OS of performing any operation.
2019-03-20 18:47:15 +02:00
Konstantin Käfer
f86cc81680 [core] move cleanup to gfx::Context 2019-03-20 15:40:47 +01:00
Konstantin Käfer
0ad2375e10 [core] remove a_/u_ prefix from attribute/uniform types 2019-03-20 15:40:47 +01:00
Konstantin Käfer
52cf9a1af3 [core] remove gl/context.hpp from more files, cast where necessary 2019-03-20 15:40:47 +01:00
Konstantin Käfer
c8cfdb1ced Merge pull request #14126 from mapbox/gfx-refactor-4
Graphics refactor #4
2019-03-15 20:31:12 +01:00
Bruno de Oliveira Abinader
8cc100bfd5 [core] Get FileSource via UpdateParameters in Renderer::Impl 2019-03-13 17:56:44 +02:00