summaryrefslogtreecommitdiff
path: root/src/mbgl/layout
Commit message (Collapse)AuthorAgeFilesLines
* force getGeometries() return const refAlexander Shalamov2019-07-231-1/+1
|
* [core] SymbolBacket creates collision buffers optionallyMikhail Pozdnyakov2019-07-221-10/+10
| | | | sizeof(SymbolBucket) : 1024 -> 704
* [core] Symbol bucket uses shared layoutMikhail Pozdnyakov2019-07-222-75/+77
| | | | sizeof(SymbolBucket): 2296 -> 1024
* [core] Offset viewport center when edge insets are specifiedAleksandar Stojiljkovic2019-05-281-1/+1
| | | | | | | | | | | | | | | | | | | | | The change is implemented in TransformState::getProjMatrix, the rest of the code is making sure that existing API contracts stay and there are tests verifyingrendering and render query processing only items within screen and given tolerance around screen edges. MapView: don't bake edge insets into relalculated camera center. Keep edge insets as property of camera in TransformState (similar to pitch, zoom, bearing) independent from specified camera center. Interpolate edge insets in animation. iOS Demo app: "Turn On/Off Content Insets" pitch the camera and navigate to convenient location in Denver, where streets are parallel to cardinal directions, to illustrate viewport center offset when edge insets are set. Tests: ViewFrustumCulling: although Annotations are deprecated, queryRenderedFeatures related tests in Annotations would need to get ported and decided to add the edge insets related query tests next to them. Verify frustum culling (render+queryRenderedFeatures) With different camera and edge insets setups. TODO: port Annotations tests. Transform.Padding: Verify that coordinates take proper place on screen after applying edge insets. LocalGlyphRasterizer: verify text rendering when applying padding. Related to #11882: both use projection matrix elements [8] and [9]. Alternative approach to this was to increase and offset map origin so that the screen would be a sub-rectangle in larger map viewport. This approach has a drawback of unecessary processing the items that are outside screen area. Fixes #12107, #12728, navigation-sdks/issues/120
* [core] SymbolBucket updates complete at placement stageMikhail Pozdnyakov2019-05-242-8/+6
| | | | | | | | `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] Introduce `LayerRenderData`. Source::update() accepts layer properties.Mikhail Pozdnyakov2019-04-174-20/+20
|
* [core] Use `style::LayerProperties` in render layers, buckets and layouts.Mikhail Pozdnyakov2019-04-173-43/+46
|
* [core] Set sortKey for symbol segments during layout phaseAlexander Shalamov2019-04-173-11/+30
|
* [core] clang-tidy fixesKonstantin Käfer2019-04-053-5/+5
|
* [core] Single line optimization for variable label placementMikhail Pozdnyakov2019-03-293-21/+44
|
* [core] Introduce variable text placement for point labels - Placement partMikhail Pozdnyakov2019-03-291-1/+1
|
* Export hideGlyphs and addDynamicAttributes symbolsAlexander Shalamov2019-03-291-0/+5
|
* [core] Introduce variable text placement for point labels - Layout partMikhail Pozdnyakov2019-03-295-61/+250
|
* [core] Add possibility of overriding paint properties inside format ↵Alexander Shalamov2019-03-132-71/+99
| | | | | | | | | | | | | | | | | | expression #14062 * [core] Add format override expression and formatted section to evaluation context * [core] Add textColor to TaggedString's formatted section * [core] Add FormatSectionOverrides and introduce overridable properties * [core] Populate symbol layer paint properties for text sections * [core] Add benchmark for style that uses text-color override * [core] Add unit test for FormatOverrideExpression * [core] Add unit test for FormatSectionOverrides
* [core] move VertexBuffer<> to gfx namespaceKonstantin Käfer2019-03-061-1/+1
|
* [core] unify *Buffer/Vector namingKonstantin Käfer2019-03-061-5/+5
|
* [core] move VertexVector/IndexVector to gfx namespaceKonstantin Käfer2019-03-062-5/+5
|
* [core] Transform{State}: s/angle/bearing/Bruno de Oliveira Abinader2019-03-041-2/+2
|
* [core] include what you useKonstantin Käfer2019-03-011-1/+1
|
* [core] extract attribute structs and gl::Vertex to separate namespaceKonstantin Käfer2019-03-012-5/+5
|
* [core] disallow subtyping of gl::Attributes<> and use type aliases insteadKonstantin Käfer2019-03-012-12/+12
|
* [core] Layer manager is responsible for buckets and layouts creationMikhail Pozdnyakov2019-02-251-1/+8
| | | | This is a step to stop using of render layers in tile worker thread.
* [core] Remove paintProperties() method from some render layersMikhail Pozdnyakov2019-01-311-4/+4
| | | | | | | PatternLayout can directly access layer's `evaluated` field. Besides, obviates accessing of moved `evaluatedProps` inside PatternLayout constructor.
* [core] SymbolBucket: use single map for paint properties dataMikhail Pozdnyakov2019-01-141-3/+3
| | | | Obviates unnecessary lookups, improves readability.
* [core] shader program must always match bucket in render symbol layerMikhail Pozdnyakov2019-01-112-6/+2
| | | | | | | | | Before this change, `RenderSymbolLayer` with updated style was trying to render symbols using the previous bucket (with paint property binders that matched a previous program). Now, symbol bucket caches the latest corresponding paint properties (caching is happening on complete tiles only). As a result, `RenderSymbolLayer` always picks the shader program and its parameters in sync with the obtained bucket.
* [core] Drop LayerTypeMikhail Pozdnyakov2019-01-041-1/+0
| | | | | Drop LayerType and its remaining usages. The generic code should be layer type agnostic.
* [core] Remove casts where expected type is part of the contractAlexander Shalamov2018-11-192-7/+7
|
* [build] Update to geometry v1.0.0Bruno de Oliveira Abinader2018-11-131-1/+1
|
* [core] don't use <boost/functional/hash.hpp> to avoid <locale> includeKonstantin Käfer2018-10-231-6/+2
|
* [core] unify UTF-8/16 conversion to <boost/locale/encoding_utf.hpp>Konstantin Käfer2018-10-231-1/+1
|
* [Core] Ensure queryRenderedFeatures accounts for icon-rotate (#13105)Ryan Hamley2018-10-183-23/+26
|
* [core] Initial implementation of 'format' expressionChris Loer2018-10-156-46/+53
|
* Port symbol-z-order symbol layout style-spec property to Nativeupstream/sort-by-yryanhamley2018-09-071-3/+4
|
* [core] simplify dependency layout process and refactor data structuresMolly Lloyd2018-08-314-17/+78
|
* [core] Implement CrossFadedDataDrivenProperty to add support for feature ↵Molly Lloyd2018-08-312-5/+132
| | | | expressions in `*-pattern` properties
* [core, node] Re-implement "avoid edges" behavior for MapMode::TileChris Loer2018-08-201-24/+8
| | | | | | | - Fixes issue #12461. - Only implement "avoid edges" in MapMode::Tile since it's no longer relevant in Static or Continuous mode. - New: Force "avoid edges" to "true" for line labels, since in tile mode they'll always clip poorly at tile boundaries. - Remove unused "withinPlus0/inside" logic.
* [core] Add `symbol-placement: line-center`Chris Loer2018-07-231-5/+27
| | | | | - Remove unused/vestigial 'maxCameraDistance' - Create a single collision circle for line labels that are less than half the width of a collision circle
* [core] Convert token strings to expressionsJohn Firebaugh2018-07-201-28/+2
|
* [core] Fix sort order for queryRenderedFeatures when features are filtered.Chris Loer2018-07-033-12/+11
| | | | Fixes issue #12104.
* Merge branch 'release-boba' into masterupstream/fabian-merge-release-4.0.1-masterFabian Guerra2018-05-171-1/+0
|\ | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # mapbox-gl-js # platform/android/CHANGELOG.md # platform/android/MapboxGLAndroidSDK/gradle.properties # platform/android/gradle/dependencies.gradle # platform/darwin/src/MGLVectorTileSource.mm # platform/darwin/src/MGLVectorTileSource_Private.h # platform/ios/CHANGELOG.md # src/mbgl/style/expression/compound_expression.cpp
| * [core] Convert "legacy" filters directly into expressions (#11610)Lucas Wojciechowski2018-05-101-1/+0
| | | | | | Ports the specialized filter-* expressions from GL JS, adding them to src/mbgl/style/expression/compound_expression.cpp
* | [core] Only run placement for first layer per SymbolBucketChris Loer2018-05-032-4/+4
| | | | | | | | | | | | | | | | | | Native version of mapbox/mapbox-gl-js#6548. Port of mapbox/mapbox-gl-js#6550. Prevents symbols that share the same layout properties from colliding against each other. Bump GL JS pin to get regression test. Rename "bucketName" -> "bucketLeaderID" to make it clearer what it represents.
* | Port global symbol query from GL JS:Chris Loer2018-04-252-13/+6
|/ | | | | | | - Symbol querying is now global instead of per-tile - Symbols that bleed over tile boundaries no longer missed in queries - Symbol results now sorted based on rendering order (ie overlapping symbols change their sort order when a bearing change causes their render order to change) - Placement::retainedQueryData now responsible for maintaining symbol querying data for buckets that may no longer be in the TilePyramid.
* Don't crash on placing symbols with 0 renderable glyphsChris Loer2018-04-192-2/+8
| | | | | | Fixes issue #11729. Close relative of issue #10956. It is possible for us to receive Glyphs from the server that are valid, but have an invalid bitmap. In that case, the glyphs will be present in the `GlyphMap` used for shaping, but not present in the `GlyphPositions` used in `getGlyphQuads`. `SymbolInstance::hasText` looked at the shaping instead of the actual quads. `symbol_projection.cpp` should never try to project a label without any quads, but we'll also try to make it so that it doesn't crash if it does.
* [core] Don't resolve tokens after evaluating a text-field or icon-image ↵John Firebaugh2018-03-221-2/+2
| | | | expression (#11509)
* [core] Add expression filter support (#11251)Lucas Wojciechowski2018-03-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * WIP * WIP * WIP * Remove Filter::operator()(const Feature&) * WIP * WIP * WIP * WIP * Hook up expression filter evaluator * Replace `shared_ptr` with &reference * Fill in implementation of `void operator()(const ExpressionFilter&)` * Fix failing tests * Switch back to a shared_ptr per chat with @anandthakker * Fix benchmark compilation * Shot in the dark to fix CI * Shot in the dark to fix CI (part 2) * Shot in the dark to fix CI (part 3) * In src/mbgl/style/conversion/filter.cpp, add a port of isExpressionFilter and use it to decide in Converter<Filter>::operator() whether to parse the incoming JSON as an ExpressionFilter or one of the legacy filter types * Remove bool Filter::operator()(const GeometryTileFeature&) const * Ensure the map zoom is passed into filtering operations wherever applicable * Add expression filter tests * Addressed PR feedback * Implement `NSPredicate *operator()(mbgl::style::ExpressionFilter filter)` * Fix formatting& nit
* [core] Don't crash on line labels with 0 glyphs.Chris Loer2018-02-071-2/+3
| | | | Fixes issue #10956.
* [core, ios, macos, android] Add data-driven-styling support for `text-font`John Firebaugh2018-01-101-12/+17
|
* [build] Clang-3.8: Explicit mbgl::PlacedGlyph default+copy+move ctorBruno de Oliveira Abinader2017-11-291-0/+8
|
* [core] Cleanup in response to review comments.Chris Loer2017-11-173-4/+4
|