summaryrefslogtreecommitdiff
path: root/src/mbgl/layout
Commit message (Collapse)AuthorAgeFilesLines
* [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
|
* [core] Split MapMode::Still into Static and TileAnsis Brammanis2017-11-171-3/+1
| | | | | `Tile` makes sure the symbols in the resulting tile are tileable while symbols in `Still` match rendering in `Continuous` mode.
* [core] Switch from background to foreground placementChris Loer2017-11-176-223/+315
| | | | | | | | | | | | - Background placement code now just generates static symbol buffers - Don't render GeometryTiles until their symbols are loaded. This is necessary for the CrossTileSymbolIndex to successfully prevent flicker. - SymbolInstances are transferred to SymbolBucket for use on foreground during collision detection - Symbols are sorted on foreground by sorting their index buffer but leaving vertex buffers intact (only works within one segment) - Vertical glyphs are generated at same time as horizontal glyphs. `reprojectLineLabels` chooses which one to use at render time and hides the other. - Icons are now always represented with a single collision box, even if they're placed along a line (this means their rotation alignment may be wrong, but the approach of representing them with multiple collision boxes wasn't very accurate either). - Generate vertices for new debug collision boxes and collision circles - Only add symbols within tile boundaries (reduces work, avoids double-draw) - Update symbol_projection.cpp to support line label projection calls from CollisionIndex.
* [core][ios][macos][android]DDS-ify `text-letter-spacing` and `text-max-width`Asheem Mamoowala2017-08-301-2/+2
|
* Implement icon-anchor propertyLauren Budorick2017-08-281-0/+1
|
* [core] Fix issue #9843 (overzoomed line label rendering glitch).Chris Loer2017-08-251-19/+53
| | | | | | Ports fix for GL JS issue #5112. Line label projection can't be based on tile geometry that's behind the plane of the camera. The relevant tests are still ignored because the overzoomed collision behavior is different between native and JS.
* [core][android][macos][ios] Implement property functions for line-join, ↵Lauren Budorick2017-07-261-44/+2
| | | | text-justify, text-anchor (#9583)
* [core] Update shaders.Chris Loer2017-07-121-1/+4
| | | | | Implements 'icon-pitch-alignment' (issue #9345) Fixes issue #9456 (map-aligned point label regression)
* [core] Base label "keep-upright" orientation on start and end of labelChris Loer2017-07-121-18/+76
| | | | Fixes issue #9457.
* [core] improve legibility of labels that follow linesAnsis Brammanis2017-07-116-69/+361
| | | | | | | | | | port https://github.com/mapbox/mapbox-gl-js/pull/4781 This improves legibility of labels that follow lines in pitched views. The previous approach used the limited information in the shader to calculate put the glyph in approximatelyright place. The new approach does this more accurately by doing it on the cpu where we have access to the entire line geometry.
* [core] Pass pitch-scaling vertex attributes and uniforms to shaders.Chris Loer2017-07-112-12/+14
|
* [core] make{Glyph,Image}Atlas only once for any number of symbol layersJohn Firebaugh2017-07-061-7/+0
|
* [core] retain GeometryTileLayer in SymbolLayoutKonstantin Käfer2017-06-212-8/+11
| | | | We're storing GeometryTileFeature objects in SymbolLayout, but they may reference data in GeometryTileLayer, which could go away if we don't retain it.
* [core] Per-tile glyph/icon atlasesJohn Firebaugh2017-06-134-51/+47
|