summaryrefslogtreecommitdiff
path: root/src/mbgl/renderer/symbol_bucket.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [core] Move renderer/* files into sub-folders (#8983)Asheem Mamoowala2017-05-121-86/+0
| | | Move renderer/* files into sub-folders
* [core] split off render layersIvo van Dongen2017-04-251-4/+4
|
* [core] Add DDS support for {text,icon}-size (#8593)Anand Thakker2017-04-061-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | * 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] Introduce a fully-evaluated tuple type for layout propertiesJohn Firebaugh2017-03-311-1/+1
|
* [core] Prefer std::map to std::unordered_map for smaller binary sizeJohn Firebaugh2017-03-211-1/+1
|
* [core] Avoid copy construction of PaintPropertyBindersJohn Firebaugh2017-03-151-4/+7
|
* [core] Implement data-driven styling for ↵Anand Thakker2017-02-281-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | {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-4/+14
|
* [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] Use indexed rendering for collision boxesJohn Firebaugh2016-11-151-1/+2
|
* [core] Set bucket segments to initialize emptyBruno de Oliveira Abinader2016-11-021-1/+1
|
* [core] Modern C++ bindings for OpenGLJohn Firebaugh2016-10-281-67/+4
|
* [core] Rationalize shader namesJohn Firebaugh2016-10-061-5/+5
| | | | {layer type}{subtype}Shader
* [core] Make ElementGroup saferJohn Firebaugh2016-10-051-17/+15
| | | | | | Template on shader types, rather than count. This allows the compiler to enforce using the correct VAO for the shader and PaintMode. This fixes OverdrawMode with circle layers. While here, avoid using unique_ptrs for groups. Instead, ensure ElementGroup is movable.
* [core] Refactor BufferJohn Firebaugh2016-10-051-14/+19
|
* [core] remove dependence on gl.h typesKonstantin Käfer2016-09-291-0/+1
|
* [core] merge gl::ObjectStore into gl::ContextKonstantin Käfer2016-09-271-13/+9
|
* [core] rename gl::Config to gl::ContextKonstantin Käfer2016-09-271-13/+13
|
* [core] track VAOs and BuffersKonstantin Käfer2016-09-261-24/+35
|
* [core] Avoid gratuitous SymbolBucket creationJohn Firebaugh2016-09-141-1/+2
|
* [core] Extract SymbolLayout from SymbolBucketJohn Firebaugh2016-09-141-571/+24
| | | | | | | | | | | | | | 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] change bool *AlongLine to SymbolPlacementTypeKonstantin Käfer2016-09-071-25/+27
|
* [core] change bool overdraw to PaintMode::OverdrawKonstantin Käfer2016-09-071-9/+15
|
* [core] change bool wrap/repeating to enum class SpritePatternModeKonstantin Käfer2016-09-071-1/+1
|
* [core] Add support for $id key to filtersJohn Firebaugh2016-07-181-1/+1
| | | | https://github.com/mapbox/mapbox-gl-style-spec/issues/391
* [core] Pass RenderTile rather than individual parametersJohn Firebaugh2016-07-111-3/+2
|
* [core] Introduce PaintParametersJohn Firebaugh2016-07-111-1/+2
| | | | Use it to DRY selection of regular vs. overdraw shaders and VAOs.
* [core] track texture state to avoid redundand bindsKonstantin Käfer2016-07-081-1/+1
|
* [core] Fix overdraw mode on LinuxBruno de Oliveira Abinader2016-07-011-6/+6
| | | | | | | | | | - Use glBindAttribLocation for GLSL attributes. - Create a separate shader for each shader that supports overdraw. Needed because each uniform location must be known for every program. - Create a separate VAO for each shader inside buckets. Needed because we can only bind a VAO to a specific shader. Fixes #5435.
* [core] code style cleanupsKonstantin Käfer2016-07-011-1/+1
| | | | | | | - puts function definitions in a namespace ... {} rather than using namespace ...; - remove trailing whitespace - add trailing newline - protect SQL statements from being formatted by clang-format
* [core] Merge TexturePool into ObjectStore; pool all textures (#5477)John Firebaugh2016-06-271-1/+1
|
* [core] remove TexturePool dependency from Raster constructorKonstantin Käfer2016-06-221-1/+1
|
* [core] Update test suite; use linear interpolation for rotated iconsJohn Firebaugh2016-06-151-0/+2
|
* [core] Prepare Filter and FilterEvaluator for extraction (#5366)John Firebaugh2016-06-151-3/+1
|
* Support for icon-text-fit, icon-text-fit-padding (#5334)Young Hahn2016-06-151-1/+1
| | | | | | | | | | * Add support for icon-text-fit * Port unit tests for getIconQuads() from js => cpp * Add support for padding in all 4 directions. * Update all hashes post-merge
* [tidy] Check modernize-pass-by-valueBruno de Oliveira Abinader2016-06-131-3/+3
| | | | Ref: http://clang.llvm.org/extra/clang-tidy/checks/modernize-pass-by-value.html
* [core] *Tile ↔ *TileDataJohn Firebaugh2016-06-131-1/+1
| | | | Tile is now the main base class; RasterTile, VectorTile, etc are its subclasses. GeometryTileData and its subclasses form the piece that's passed to the worker.
* [core] fix pedantic warning messagesKonstantin Käfer2016-06-131-1/+1
|
* text-pitch-alignment (#5288)Young Hahn2016-06-101-9/+12
| | | | | | | | | | | | * 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-1/+3
|
* [core] Runtime style layer APIJohn Firebaugh2016-06-021-1/+1
|
* [core] s/GLObjectStore/ObjectStore/Bruno de Oliveira Abinader2016-06-011-13/+13
|
* [core] box_shader ⇢ collision_box_shaderJohn Firebaugh2016-05-251-1/+1
|
* [core] Normalize tile coordinates in VectorTile (#4966)John Firebaugh2016-05-111-2/+1
| | | Previously, vector tile coordinates were being normalized to util::EXTENT in each place they were used, and for annotation and GeoJSON sources that don't require normalization.
* [core] move Painter and dependents to new *TileID classesKonstantin Käfer2016-05-101-2/+2
|
* [core] Use geometry.hpp's pointJohn Firebaugh2016-05-051-15/+14
|
* [core] Privatize math.hpp and vec.hppJohn Firebaugh2016-05-051-0/+1
|
* [core] Simplify FilterEvaluator and fix crashJohn Firebaugh2016-05-041-1/+1
| | | | Previous implementation was assigning a temporary to FilterEvaluator<T>::extractor.
* [core] implement queryRenderedFeaturesAnsis Brammanis2016-04-291-14/+18
|
* [core] Prepare Filter for public API (#4900)John Firebaugh2016-04-281-5/+18
|