summaryrefslogtreecommitdiff
path: root/src/mbgl/layout
Commit message (Collapse)AuthorAgeFilesLines
* [core] Get rid of user-specified refsJohn Firebaugh2017-01-042-5/+7
|
* [core] Replace magic number with constant-based calculationJohn Firebaugh2016-12-211-2/+2
|
* [core] Polylabel-based "pole of inaccessibility" symbol placementJohn Firebaugh2016-12-211-5/+15
|
* [core] Fix symbol rendering for multipointsJohn Firebaugh2016-12-203-63/+75
| | | | Ports https://github.com/mapbox/mapbox-gl-js/pull/3763 and https://github.com/mapbox/mapbox-gl-js/pull/3806.
* [core] const correctnessJohn Firebaugh2016-12-202-3/+3
|
* [core] Full support for line breaking bidirectional text using ICU bidi ↵Chris Loer2016-11-302-9/+3
| | | | | | | functionality. - Trim whitespace from labels before determining their max-width for alignment. - Fix crash on labels that contain lines with only a single character of whitespace.
* [build] move logging to utilKonstantin Käfer2016-11-221-2/+2
|
* [core] Cleanup symbol clippingBruno de Oliveira Abinader2016-11-181-15/+16
|
* [core] Convert style properties to a tuple-based approachJohn Firebaugh2016-11-174-58/+55
| | | | | | | | 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] Add minimal line breaking support for RTL text.Chris Loer2016-11-172-1/+6
|
* [core] Add ICU package for Bidirectional text support and arabic text shaping.Chris Loer2016-11-172-1/+6
| | | | | Apply bidi and shaping in symbol_layout. Add utility functions for converting to and from UTF-16.
* [core] Use UTF-16 instead of UTF-32 for label features to avoid extra ↵Chris Loer2016-11-174-8/+8
| | | | | | | conversions and reduce in-memory size. Continue to use uint32 as glyph ID to maintain Glyph PBF, even though we're only using 16 bits of that uint32. Use std::codecvt instead of boost::unicode_iterator for UTF8->UTF16 conversions.
* [core] Use indexed rendering for collision boxesJohn Firebaugh2016-11-151-8/+22
|
* [core] Use gl::Program to resolve some rough edges in the GL binding typesJohn Firebaugh2016-11-081-10/+10
| | | | | | | | | * Extract `ignore` util to separate header. * `Segment` now tracks offset and length of indices, rather than primitives. This is more natural. * Introduce `VertexVector` and `IndexVector` types. These types carry information about the intended draw mode (`Triangles`, `LineStrip`, etc.), and ensure that elements are always appended in a group size appropriate for that draw mode, for both indexed and unindexed rendering. * `Program`, rather than `Drawable`, is now the unifying object for draw calls. `Program` is the best place to type check the draw call, because it is typed to carry information about the intended primitive, vertex type, attributes, and uniforms. * Use the debug shaders for debug tile rendering, like gl-js. * Fix the draw mode for background. It was drawing triangle strips with a triangles array. Surprised this didn’t cause issues. Now it’s type checked.
* [core] Introduce gl::Program templateJohn Firebaugh2016-11-081-8/+8
|
* [core] Make attribute binding more similar to uniform bindingJohn Firebaugh2016-11-081-16/+16
|
* [core] Set bucket segments to initialize emptyBruno de Oliveira Abinader2016-11-021-1/+1
|
* [core] Use numeric_limits<>::max() for checking element groupsBruno de Oliveira Abinader2016-10-311-12/+8
|
* [core] Moved util::log2 to its own headerBruno de Oliveira Abinader2016-10-311-8/+6
| | | | | | - Added util::{MIN,MAX}_ZOOM_F to avoid consecutive conversions from double to float - Move util::log2 to its own header (part of mbgl/math)
* [core] Modern C++ bindings for OpenGLJohn Firebaugh2016-10-281-14/+6
|
* [core] Cleanup SymbolLayoutBruno de Oliveira Abinader2016-10-131-26/+26
| | | | | Reuse reverse rotation matrix from CollisionTile when populating the collision boxes.
* [core] Make ElementGroup saferJohn Firebaugh2016-10-052-21/+20
| | | | | | 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/+18
|
* [core] remove dependence on gl.h typesKonstantin Käfer2016-09-291-3/+3
|
* [core] Convert uses of std::set to std::unordered_set (#6325)Lucas Wojciechowski2016-09-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | * src/mbgl/annotation/annotation_manager.hpp * src/mbgl/algorithm/update_renderables.hpp * src/mbgl/geometry/glyph_atlas.hpp * src/mbgl/renderer/painter.cpp and src/mbgl/renderer/render_item.hpp * src/mbgl/renderer/symbol_bucket.hpp and src/mbgl/text/glyph_store.hpp * src/mbgl/sprite/sprite_atlas.hpp * include/mbgl/storage/network_status.hpp * src/mbgl/text/collision_tile.cpp * src/mbgl/style/update_batch.hpp * platform/default/mbgl/storage/offline_download.hpp * Add GlyphRangeSet typedef * Fix whitespace & unused imports
* [core] Merge GlyphStore and GlyphAtlasJohn Firebaugh2016-09-192-11/+8
|
* [core] Merge SpriteStore and SpriteAtlasJohn Firebaugh2016-09-192-5/+3
|
* [core] Use consistent terms: "text" and "icon"John Firebaugh2016-09-163-15/+15
|
* [core] Use optional to represent possible absence, not empty stringsJohn Firebaugh2016-09-163-18/+16
|
* [core] Move SymbolInstance and SymbolFeature into their own filesJohn Firebaugh2016-09-167-59/+94
|
* [core] Move {clip,merge}_lines to layout directoryJohn Firebaugh2016-09-165-2/+218
|
* [core] Extract SymbolLayout from SymbolBucketJohn Firebaugh2016-09-142-0/+695
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.