summaryrefslogtreecommitdiff
path: root/src/mbgl/style/layers/symbol_layer_impl.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [core] Refactor RenderSource updatesJohn Firebaugh2017-06-051-0/+9
| | | | | | | * Eliminate updateBatch in favor of diffing layers and detecting changes to properties upon which layout depends. * Replace RenderSource::{update,remove,invalidate,reload}Tiles with a single update method * Replace TilePyramid::{update,remove,invalidate,reload}Tiles with a single update method * Remove Style& dependency TODO from GeometryTile and TileParameters
* [core] Replace createRender{Source,Layer} with Render{Source,Layer}::createJohn Firebaugh2017-05-121-5/+0
| | | | | * Eliminates the need for EnableImmutableFromThis * Eliminates the dependency of {Source,Layer}::Impl on corresponding Render class (circular dependency)
* [core] Immutable ImplsJohn Firebaugh2017-05-121-1/+1
|
* [core] split off render layersIvo van Dongen2017-04-251-93/+3
|
* [core] Add DDS support for {text,icon}-size (#8593)Anand Thakker2017-04-061-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | * 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-2/+6
| | | | | | | | | | | | - 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] Introduce a fully-evaluated tuple type for layout propertiesJohn Firebaugh2017-03-311-2/+2
|
* [core] Implement data-driven styling for ↵Anand Thakker2017-02-281-15/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | {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] Add support for data-driven stylingJohn Firebaugh2017-02-021-42/+7
|
* [core] Fix flickering caused by regression in #7586John Firebaugh2017-01-101-1/+1
| | | | It should be safe to invoke GeometryTileWorker::setData multiple times without invoking GeometryTileWorker::setLayers. Therefore GeometryTileWorker::redoLayout() must not consume the layers.
* [core] Get rid of user-specified refsJohn Firebaugh2017-01-041-2/+4
|
* [core] Convert BucketParameters#layer to a separate parameterJohn Firebaugh2016-12-211-4/+4
| | | | This parameter varies between Buckets, while the others are constant. It makes more sense as an individual parameter.
* [core] Convert style properties to a tuple-based approachJohn Firebaugh2016-11-171-50/+45
| | | | | | | | 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] Modern C++ bindings for OpenGLJohn Firebaugh2016-10-281-0/+34
|
* Better handling for undefined icon|text-rotation-alignment (#6253)Young Hahn2016-09-211-7/+17
| | | | | | * [core, ios, android] Use `auto` value for properties with calculated defaults * Fix render tests
* [core] Extract SymbolLayout from SymbolBucketJohn Firebaugh2016-09-141-40/+31
| | | | | | | | | | | | | | SymbolLayout lives on the worker thread and contains the persistent data needed for repeated placement. SymbolBucket contains the data generated during placement, and is transferred to the main thread for rendering. This eliminates the risky sharing of GeometryTile::buckets between the main thread and worker thread during TileWorker::redoPlacement. While here, rationalize the names of states a SymbolLayout may be in: * Pending: Waiting for the necessary glyphs or icons to be available. * Prepared: The potential positions of text and icons have been determined. * Placed: The final positions have been determined, taking into account prior layers. In TileWorker, all SymbolLayouts are stored in a single vector. Each SymbolLayout knows what state it is in, and TileWorker can easily determine how much progress it can make toward a final result.
* [core, node] Implement bindings for addLayerJohn Firebaugh2016-06-241-8/+0
|
* Color class (#5361)Young Hahn2016-06-151-2/+2
| | | | | | * Color class * Switch to list initialization
* text-pitch-alignment (#5288)Young Hahn2016-06-101-2/+7
| | | | | | | | | | | | * First pass at port of https://github.com/mapbox/mapbox-gl-js/pull/2668 * RotationAlignmentType => AlignmentType * Handle undefined default value for text-pitch-alignment and implement inheritance for this value from text-rotation-alignment * Update dependencies * Move handling fo undefined default value out of camelize functions
* [core] Rationalize naming for style-related codeJohn Firebaugh2016-06-021-0/+82