| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
std::to_string() potentially uses a decimal point character different
than a dot (.), depending on the environment's locale. But since this
generated string will be part of GLSL code, there needs to be a dot and
nothing else.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
Apply bidi and shaping in symbol_layout.
Add utility functions for converting to and from UTF-16.
|
|
|
|
|
|
|
| |
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] update shaders for line property functions
update deps, define device pixel ratio for all shaders
[core] create ShaderParameter struct to store pixel ratio and overdraw param
repair rebase errs
update shaders to include pixel ratio
make sure collision_box never overdraws
update test suite, move shaders to Painter::render so the correct pixel ratio is applied
move shader compiling back to the Painter constructor
rebase from shader --> program refactor
re-factor parameters for collisionBox and debug programs
remove unused vars from line-program, move blur math to shader
update core files
remove unecessary files
update shaders PR, remove comments
bump test suite sha
fix formatting, incorporate feedback
refactor program.hpp
* [core] remove line transformations that were moved to the shaders, bump shader sha
* [core] shorten ProgramParameter instantiation
* [core] bump shader+test suite shas
|
|
|
|
| |
This is safer now -- it can be an implementation detail of Segment/Context. And the typing of SegmentVector now ensures that the attributes and program match.
|
| |
|
|
|
|
|
|
|
| |
Two reasons to prefer explicit sequential location assignment, rather than relying on the GLSL linker to assign locations:
* For data-driven properties, we want to have the option to use glDisableVertexAttribArray plus glVertexAttrib*. In order to use glDisableVertexAttribArray, we must avoid using attribute location 0, which cannot be disabled.
* We want to use the same VAO in cases where, say, a fill layer might be rendered with FillProgram at first, and then FillPatternProgram later. VAOs do not store the program binding, only the attribute bindings, so as long as the two programs have the same attributes and attribute locations, only a single VAO (per segment) is needed.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* [core] Line-break ideographic text by character
Allow a line break to be inserted after any supported Chinese, Japanese, or Yi character in a point-placed label. Balance the lines unless non-ideographic text such as Latin letters are present.
Fixes #1223.
* [core] Moved more character classing into util::i18n
* [core] Detect character properties by Unicode block
* [test] Reenabled ideographic breaking tests
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
When a source or layer is removed transfer ownership back to the
caller so it can (optionally) take it. Preserve the behavior that
removing a CustomLayer triggers deinitialization. Deinitialize all
custom layers when a style is destroyed in case those layers are not
explicitly removed.
|
| |
|
|
|
|
|
|
| |
* [core] - do not set camera mutated to true when calling Map::getLatLng
* [android] - correctly check if a Map is created without a camera position
|
| |
|
| |
|
|
|
|
|
| |
In FrameHistory::needsAnimation, we are computing "time - previousTime", but since previousTime was
initialized to Duration::min(), we got a integer overflow, which produced invalid values.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
force users to use the actual names to avoid implicit conversion accidentally targeting the wrong shader
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|