summaryrefslogtreecommitdiff
path: root/src/mbgl/layout/symbol_layout.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [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-181-19/+20
|
* [core] Initial implementation of 'format' expressionChris Loer2018-10-151-38/+42
|
* 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-311-5/+18
|
* [core] Implement CrossFadedDataDrivenProperty to add support for feature ↵Molly Lloyd2018-08-311-5/+4
| | | | 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-031-4/+3
| | | | 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-031-3/+3
| | | | | | | | | | | | | | | | | | 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-251-8/+4
|/ | | | | | | - 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.
* [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, ios, macos, android] Add data-driven-styling support for `text-font`John Firebaugh2018-01-101-12/+17
|
* [core] Cleanup in response to review comments.Chris Loer2017-11-171-2/+2
|
* [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-171-141/+136
| | | | | | | | | | | | - 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][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] improve legibility of labels that follow linesAnsis Brammanis2017-07-111-53/+45
| | | | | | | | | | 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-111-11/+12
|
* [core] retain GeometryTileLayer in SymbolLayoutKonstantin Käfer2017-06-211-6/+7
| | | | 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-131-42/+39
|
* [core] Per-bucket icon atlasesJohn Firebaugh2017-06-131-9/+13
|
* [core] Per-bucket glyph atlasesJohn Firebaugh2017-06-131-8/+11
|
* [core] Simplify and fix sprite atlas coordinate calculationsJohn Firebaugh2017-05-231-1/+2
| | | | | | | | * Always return image metrics exclusive of padding * Work with integer coordinates whenever possible * Eliminate redundant SpriteAtlasElement members * Fix asymmetric re-padding in getIconQuad when pixelRatio != 1 * Add explanatory comments
* [core] Disable letter-spacing for Arabic labels (issue #9057)Chris Loer2017-05-221-1/+1
|
* [core] Don't unnecessarily request glyphs for verticalized punctuation.Chris Loer2017-05-181-2/+7
| | | | Issue #8982.
* [core] Unify {Paint,Layout,Light}PropertiesJohn Firebaugh2017-05-151-2/+2
|
* [core] Move renderer/* files into sub-folders (#8983)Asheem Mamoowala2017-05-121-2/+2
| | | Move renderer/* files into sub-folders
* [core] Immutable ImplsJohn Firebaugh2017-05-121-3/+3
|
* [core] Tweak handling of annotation special case SpriteAtlasJohn Firebaugh2017-04-261-18/+13
| | | | | * Simplify SymbolLayout; it never needs to care about more than one SpriteAtlas. * Move the reference from SymbolLayer::Impl to SymbolBucket. This is a prerequisite for making layer Impls immutable.
* [core] split off render layersIvo van Dongen2017-04-251-8/+9
|
* [core] Safeguard PositionedIcon usage via optionalBruno de Oliveira Abinader2017-04-141-5/+5
|
* [core] Add DDS support for {text,icon}-size (#8593)Anand Thakker2017-04-061-15/+28
| | | | | | | | | | | | | | | | | | | | | | | | * Update gl-js and generate style code * Factor out packUint8Pair() helper function * Draft implementation of DDS for {text,icon}-size Ports https://github.com/mapbox/mapbox-gl-js/pull/4455 * Fix text-size/composite-function-line-placement test * Refactor to PaintPropertyBinders-like strategy * Dedupe gl::Program construction * Use exponential function base for interpolation * Dedupe coveringZoomStops method * Fixup tests * Fix CI errors (hidden within #if block)
* [core] De-mutex GlyphAtlas and SpriteAtlasChris Loer2017-04-041-65/+55
| | | | | | | | | | | | - Expose glyph and icon information to workers via message interface. - Glyph/SpriteAtlas track which tiles have outstanding requests and send messages to them when glyphs/icons become available. - Remove obsolete "updateSymbolDependentTiles" pathway - Symbol preparation for a tile now depends on all glyphs becoming available before it can start. - Start tracking individual icons needed for a tile, although we don't do anything with the information yet. - Introduce typedef for GlyphID
* [core] Add DDS support for icon-imageJohn Firebaugh2017-03-311-16/+17
|
* [core] Pass fully-evaluated layout properties to SymbolInstance and quad methodsJohn Firebaugh2017-03-311-1/+1
|
* [core] implement dds for text-offsetMolly Lloyd2017-03-281-1/+1
|
* [core] Implement data-driven styling for ↵Anand Thakker2017-02-281-19/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | {text,icon}-{color,opacity,halo-color,halo-blur,halo-width} (#7939) * Add symbol dds attributes and adapt style code generation * Update to mapbox-gl-js/master * Refactor SymbolFeature as a subclass of GeometryTileFeature Prepares for enabling DDS on symbol paint properties by allowing the SymbolFeatures, which we keep around after constructing SymbolLayout, to be used in evaluating data-driven paint properties later in the layout process. * Draft approach for splitting icon/text paint properties The `Program` types are set up to bind GL attributes to each of the data-driven paint properties specified in the `PaintProperties` type provided. Since `SymbolPaintProperties` specifies both `Text*` and `Icon*` properties, the symbolIcon, symbolIconSDF, and symbolGlyph programs each attempt to bind roughly double the number of attributes that they actually need. This change addresses this by: - Adding the more specific `IconPaintProperties` and `TextPaintProperties` types, which are subsets of the full `SymbolPaintProperties`. - The symbol layer continues to use its `SymbolPaintProperties paint` member to track layer property state, but it provides helpers that construct objects of each the specific `{Icon,Text}PaintProperties::Evaluated` type, for use by the painter. - The three symbol programs instantiate `Program<>` using the appropriate `{Icon,Text}PaintProperties` type. * check in generated style code * Populate paint buffers for symbol DDS properties * Address first round of review comments * Refactor VectorTile{Layer,Feature} to explicitly share data * Update submodule
* [core] There's only ever one icon quadJohn Firebaugh2017-02-281-68/+77
|
* [core] Eliminate Shaping::textJohn Firebaugh2017-02-281-1/+1
| | | | This was already accessible via SymbolFeature::text.
* [core] Release compareText after symbol preparationJohn Firebaugh2017-02-281-0/+1
| | | | It's a temporary structure and not needed for placement.
* [core] Replace three maps/mutexes in GlyphAtlas with a single map and mutexJohn Firebaugh2017-02-271-1/+1
|
* [core] Enable property functions for text-{field,transform} (#7944)Anand Thakker2017-02-171-6/+22
|