summaryrefslogtreecommitdiff
path: root/src/mbgl/layout/symbol_instance.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [core] Enable `text-offset` with variable label placementMikhail Pozdnyakov2019-09-031-2/+2
| | | | Port of https://github.com/mapbox/mapbox-gl-js/pull/8642
* [core] fix mixed sdf + non-sdf icon rendering in one layer (#15456)zmiao2019-08-261-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [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-2/+19
| | | | text-writing-mode
* [core] Rotate text collision box based on text-rotation valueAlexander Shalamov2019-08-131-4/+5
|
* [core] Implement support for "text-writing-mode" layout propertyAlexander Shalamov2019-08-131-5/+12
|
* [core] Release quad data after vertex buffers are createdAlexander Shalamov2019-07-231-42/+94
|
* [core] clang-tidy fixesKonstantin Käfer2019-04-051-2/+3
|
* [core] Single line optimization for variable label placementMikhail Pozdnyakov2019-03-291-8/+19
|
* [core] Introduce variable text placement for point labels - Layout partMikhail Pozdnyakov2019-03-291-20/+48
|
* [Core] Ensure queryRenderedFeatures accounts for icon-rotate (#13105)Ryan Hamley2018-10-181-3/+4
|
* [core] Initial implementation of 'format' expressionChris Loer2018-10-151-1/+1
|
* [core] Fix sort order for queryRenderedFeatures when features are filtered.Chris Loer2018-07-031-4/+4
| | | | Fixes issue #12104.
* Don't crash on placing symbols with 0 renderable glyphsChris Loer2018-04-191-1/+3
| | | | | | 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] Cleanup in response to review comments.Chris Loer2017-11-171-1/+1
|
* [core] Switch from background to foreground placementChris Loer2017-11-171-18/+15
| | | | | | | | | | | | - 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] improve legibility of labels that follow linesAnsis Brammanis2017-07-111-9/+14
| | | | | | | | | | 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] Per-tile glyph/icon atlasesJohn Firebaugh2017-06-131-3/+3
|
* [core] Safeguard PositionedIcon usage via optionalBruno de Oliveira Abinader2017-04-141-7/+2
|
* [core] Add DDS support for {text,icon}-size (#8593)Anand Thakker2017-04-061-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | * 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] Pass fully-evaluated layout properties to SymbolInstance and quad methodsJohn Firebaugh2017-03-311-1/+1
|
* [core] Introduce a fully-evaluated tuple type for layout propertiesJohn Firebaugh2017-03-311-1/+1
|
* [core] Fix whitespace; no need for explicit on multi-parameter constructorsJohn Firebaugh2017-03-021-6/+16
|
* [core] Implement data-driven styling for ↵Anand Thakker2017-02-281-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | {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-6/+4
|
* Upright CJK characters in vertically-oriented labels (#7114)Minh Nguyễn2017-02-101-11/+28
| | | | | CJK characters and adjacent punctuation now remain upright in vertically oriented labels that have line placement. Fixes #1682.
* [core] Convert style properties to a tuple-based approachJohn Firebaugh2016-11-171-1/+1
| | | | | | | | This converts the style property classes (CirclePaintProperties and so on) to the same tuple-based approach as gl::Attribute and gl::Uniform. The approach is outlined in https://github.com/mapbox/cpp/blob/master/C%2B%2B%20Structural%20Metaprogramming.md. The main advantage of this approach is it allows writing algorithms that work on sets of style properties, without resorting to code generation or manually repetitive code. This lets us iterate on approaches to data-driven properties more easily. Another advantage is that the cascading, unevaluated, and evaluated states of a set of properties exist as independent structures, instead of individual properties holding their own state. This is a more functional approach that makes data flow clearer and reduces state.
* [core] Move SymbolInstance and SymbolFeature into their own filesJohn Firebaugh2016-09-161-0/+34