summaryrefslogtreecommitdiff
path: root/src/mbgl/renderer/layers
Commit message (Collapse)AuthorAgeFilesLines
* [core] use individual textures for line dash patternsupstream/zmiao-testKonstantin Käfer2019-10-291-21/+20
| | | | | | | | This moves the LineAtlas from a shared texture that contained SDF dash patterns to use individual textures. Previously, the texture space was limited to a texture of 512 pixels height. Dash patterns were never removed (and are still never removed as of this patch), which means that this texture could fill up for styles that use a lot of different dash patterns. In particular, dash patterns for lines with a round line cap take up 15 pixels of texture height, limiting the amount of unique dash patterns to 34. While this was probably enough for rendering a single style, we quickly exhausted this number when reusing the Map object to render different styles. Instead of a global shared texture, we're now creating individual textures for every dash pattern. These textures are still cached so that we don't need to re-upload the texture on every frame.
* [core] Fix performance-move-const-argThiago Marcos P. Santos2019-09-251-7/+7
|
* [build] Fix clang format and tidy checksJuha Alanen2019-09-1810-89/+41
|
* [core] Feature state support to RenderLayer classesJuha Alanen2019-09-1810-18/+28
|
* [core] DEMData: do decode on GPU (port mapbox/mapbox-gl-js#8694)Aleksandar Stojiljkovic2019-08-301-0/+1
| | | | | | | | | | | This is first part of work on porting mapbox/mapbox-gl-js#8694 - in follow up patch(es) it is required to remove CPU side copy using 2d canvas support on all supported platforms, similar to approach taken in gl.js https://github.com/mapbox/mapbox-gl-js/pull/8694/files#diff-34dbe5f7de34dc4b9a8745dcde9bdc37R48 Decoding on CPU removed. Padding is still done in DEMData() but, instead od doing it wwhile decoding, it is using memcpy to pad original values. Rebase to latest mapbox-gl-js master and re-generate shaders. Partly fixes: #15503
* [core] fix collisionBox alignment when Icon/text translation is enabled (#15467)zmiao2019-08-301-64/+66
| | | | | | | | | | | | | | | | | | * add initial fix * fix bug for collision circle * refind code structure * fix indentation * update test * refind code structure * Add changelog * Add comment for boolean
* [core] fix mixed sdf + non-sdf icon rendering in one layer (#15456)zmiao2019-08-262-17/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [core] fix icon symbol rendring when sdf and non-sdf icon in the same symbol layer * fix build error * fix typo * revert renderableSegment change * simplify codes * fix build error * refine sdf icon flag * [core] fix mixed sdf + non-sdf icon rendering in one layer * remove iconstatus getter in stymbol bucket * fix review findings * provide bitwise operator for SymbolContent enum * use MBGL_MBGL_CONSTEXPR * add one missing update for sdfIcon * make renderer symbol type as enum
* [core] Fix combination of icon-text-fit with text-variable-anchors and ↵Alexander Shalamov2019-08-201-3/+4
| | | | text-writing-mode
* [core] Fix layer impl cast in render layer implementationsMikhail Pozdnyakov2019-08-1610-0/+46
| | | | | | This PR puts `impl()` functions definitions into a nameless namespace to provide internal linkage and to make sure that appropriate cast function is invoked.
* [core] Enable opaque pass for background layer. fix heatmap+background test.Aleksandar Stojiljkovic2019-08-052-12/+21
| | | | | | Follow the approach from mapbox-gl-js for enabling opaque pass for background layer (same as for fill layer). Fix combinations/heatmap-translucent--background-opaque render test.
* [core] Fix assertion at RenderRasterLayer::prepare()Mikhail Pozdnyakov2019-07-261-2/+4
| | | | | It shall consider that image data might not be available until the source loads it.
* [core] Optimize RenderLineLayer::queryIntersectsFeatureMikhail Pozdnyakov2019-07-241-11/+24
|
* [core] Force getGeometries() return const refAlexander Shalamov2019-07-241-1/+1
|
* [core] SymbolBacket creates collision buffers optionallyMikhail Pozdnyakov2019-07-221-8/+8
| | | | sizeof(SymbolBucket) : 1024 -> 704
* [core] Symbol bucket uses shared layoutMikhail Pozdnyakov2019-07-221-2/+2
| | | | sizeof(SymbolBucket): 2296 -> 1024
* [core] Synchronize render passes and render tilesMikhail Pozdnyakov2019-07-119-18/+23
| | | | | | | | | | | | | | | | Before this change render passes were assigned for the whole layer at properties evaluation stage. This caused problems, as layer render data are bound to the tile and these data might differ from tile to tile, depending on which tile has been updated by the tile worker and which has not been yet updated. This change takes into consideration the actual render passes required for each tile and combines them for the layer render passes. Naturally, this change also introduces render pass check for each render layer in `RenderLayer::render()` implementations.
* Fix layers rendering after fill-extrusionAleksandar Stojiljkovic2019-07-093-5/+9
| | | | | | | | | | | | | | | | | | | | | This fixes following issues: * Fix some false passing combinations/fill-extrusion-translucent--XXXX tests * Fix and enable other, failing but ignored, combinations/fill-extrusion-translucent--XXXX tests * Fix rendering of layers that are on top of fill-extrusion layers state.getProjMatrix(nearClippedProjMatrix, 100) caused that tests with size 64x64 were not rendering fill extrusions: far plane calculated as 96.9 and near plane set to 100 was the cause. near plane is changed from hardcoded 100 to depend on state.getCameraToCenterDistance() - producing similar value but one that follows max zoom. This caused that e.g. combinations/fill-extrusion-translucent--fill-opaque was falsely passing as only fill-opaque layer got rendered. combinations/fill-extrusion-translucent--XXXX tests expose regression https://github.com/mapbox/mapbox-gl-native/issues/14844#issuecomment-503600034 in #14844, #14779. Fix (opaquePassCutoff, is3D) is ported from https://github.com/mapbox/mapbox-gl-js/pull/7821 Fixes: #14844, #14779, #15039
* [core] Share render tiles lists between layersMikhail Pozdnyakov2019-07-098-27/+24
| | | | This helps to avoid unneeded allocations.
* [core] RenderSource creates render itemsMikhail Pozdnyakov2019-07-041-1/+1
|
* [core] Remove down-casting of render sourcesMikhail Pozdnyakov2019-07-041-3/+1
|
* [core] Introduce ImageSourceRenderData and RenderSource::getImageRenderData()Mikhail Pozdnyakov2019-07-042-10/+6
| | | | | Image source render data is owned by render source, which is simpler than the previous approach and aligned with the render tiles ownership model.
* [core] Remove orchestration methods from RenderTileMikhail Pozdnyakov2019-07-041-2/+5
|
* [core] Remove RenderPass::UploadMikhail Pozdnyakov2019-06-253-3/+3
|
* [core] Simplify RenderLayer::upload()Mikhail Pozdnyakov2019-06-254-26/+20
| | | | | | Now `RenderLayer::upload()` accepts only `uploadPass`, similar to other uploadable objects. Few simplifications were made in the `LineLayer` prepare stage.
* [core] TilePyramid::getRenderTiles -> getRenderedTilesMikhail Pozdnyakov2019-06-101-1/+1
|
* [core] Use unique ID in hillshade and hillshade_prepare draw.Aleksandar Stojiljkovic2019-06-061-2/+2
|
* [core] Fix symbol rendering under opaque fill layersJuha Alanen2019-06-041-12/+2
|
* [core] Update comments for pattern atlasMikhail Pozdnyakov2019-06-041-1/+2
|
* [core] Introduce PatternAtlasMikhail Pozdnyakov2019-06-041-6/+17
|
* [core] Remove ImageManager from upload parametersMikhail Pozdnyakov2019-06-044-13/+14
|
* [core] Fix: fill-extrusion-vertical-gradient was ignored. #14784Aleksandar Stojiljkovic2019-05-311-2/+4
| | | | | | fill-extrusion-vertical-gradient "property-type": "data-constant" and it shouldn't be computed through property binders. Fixes: #14784
* [core] ensure gfx::DrawScopes are uniqueKonstantin Käfer2019-05-283-16/+22
|
* [core] RenderTile returns textures by const referenceMikhail Pozdnyakov2019-05-284-11/+11
|
* [core] Encapsulate symbol bucket placement code in Placement::placeLayerBucket()Mikhail Pozdnyakov2019-05-281-5/+1
|
* [core] RenderTile does not expose TileMikhail Pozdnyakov2019-05-288-45/+36
| | | | | | RenderTile and Tile will be split when ochestration movces to a separate thread. This PR improves encapsulation of Tiles management: now performed within TilePyramid.
* FillBucket::triangles could be empty: skip creating buffer and draw. (#14761)Aleksandar Stojiljkovic2019-05-241-11/+13
|
* [core] SymbolBucket updates complete at placement stageMikhail Pozdnyakov2019-05-242-154/+5
| | | | | | | | `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
* [core] RenderLayer::render(PaintParameters, RenderSource*) -> ↵Mikhail Pozdnyakov2019-05-2220-43/+58
| | | | render(PaintParameters)
* [core] RenderLayer::setRenderTiles(RenderTiles) -> ↵Mikhail Pozdnyakov2019-05-222-4/+5
| | | | | | | prepare(LayerPrepareParameters) RenderLayer::prepare() is responsible for the complete initialization of a render layer, so that it can render.
* [core] Remove RenderLayerSymbolInterfaceMikhail Pozdnyakov2019-05-193-55/+11
|
* [core] Placement accepts RenderLayer instancesMikhail Pozdnyakov2019-05-191-1/+5
|
* [core] RenderLayerSymbolInterface is not used in CrossTileSymbolIndexMikhail Pozdnyakov2019-05-192-1/+10
|
* [core] add gfx::UploadPass, split startRender into prepare and uploadKonstantin Käfer2019-05-1510-121/+221
|
* [core] use unique IDs for DrawScopesKonstantin Käfer2019-05-152-13/+23
|
* [core] RenderTile shall never be created for a not renderable tileMikhail Pozdnyakov2019-05-141-2/+1
| | | | | | | | 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()`.
* [core] upgrade mapbox-gl-js pin to the most recent versionKonstantin Käfer2019-05-083-8/+11
|
* [core] render extrusions directly in the main framebufferKonstantin Käfer2019-05-082-110/+87
|
* [core] change approach to stencil clipping to (almost) match JSKonstantin Käfer2019-04-294-11/+12
|
* [core] Store type of renderable segment when sorting symbols by keyAlexander Shalamov2019-04-261-15/+31
|
* [core] Render layers use synchronized buckets and paint propertiesMikhail Pozdnyakov2019-04-176-49/+63
| | | | Actual for layers rendering the geometry tile data: line, fill, fill-extrusion, heatmap, circle, symbol (was updated in previous commits).