Commit Graph

2930 Commits

Author SHA1 Message Date
John Firebaugh
f0d4411871 [node] Temporary: exit(0) on exception in Painter::render
Hope to get complete apitrace with a clean exit rather than an abort.
2017-02-06 17:57:37 -06:00
Ivo van Dongen
8a5bff8ee6 [core] default value support in categorical function conversion 2017-02-02 09:44:42 -08:00
John Firebaugh
141e995806 [core] Add support for data-driven styling 2017-02-02 09:44:42 -08:00
John Firebaugh
67e157e8b4 [core] Move fill-outline special case to FillLayer::Impl::evaluate 2017-02-02 09:44:06 -08:00
Konstantin Käfer
62ea1f2185 [core] remove trailing whitespace, add trailing newlines, add space after // 2017-01-27 11:44:16 +01:00
John Firebaugh
68440ee6c2 [core] Allow tile cache size to change with viewport size 2017-01-26 17:48:44 +02:00
John Firebaugh
44b960fb92 [core] Scale tile cache size based on tile size 2017-01-26 17:48:44 +02:00
Konstantin Käfer
a37ae27aed [core] fix rendering 180° line joins 2017-01-23 17:02:40 +01:00
Thiago Marcos P. Santos
181b3635f1 [core][Qt] Use Qt for UTF16, since codecvt is not always available 2017-01-20 18:50:45 +01:00
Thiago Marcos P. Santos
7b61324d13 [core] Remove unused include
pthread is not used directly, but per platform basis.
2017-01-19 12:47:33 +01:00
John Firebaugh
d076ba0567 [core] Clean up merge_lines.cpp and add bounds checking 2017-01-18 13:38:05 -06:00
John Firebaugh
531a1c3070 [core] Fix calculation of delayed transitions 2017-01-17 15:18:14 -06:00
John Firebaugh
b04e11b5ca [core] Disable debug groups in release builds 2017-01-17 14:45:29 -06:00
John Firebaugh
ed80755084 [core] Restore GL_KHR_debug messages in release builds
This reverts commit 8c4da72d09.
2017-01-17 14:45:29 -06:00
Konstantin Käfer
6658268115 [core] abort early when placing a glyph in GlyphAtlas if the bitmap is invalid 2017-01-17 19:23:20 +01:00
Konstantin Käfer
b6c1119172 [core] harden Glyph PBF parsing 2017-01-17 19:23:20 +01:00
Bruno de Oliveira Abinader
4439aecbcc [core] Use std::tie in tileCover sort 2017-01-17 17:39:54 +01:00
Bruno de Oliveira Abinader
8847192694 [core] Use std::tie in *TileID operator< 2017-01-17 17:39:54 +01:00
Bruno de Oliveira Abinader
54d937c738 [core] Use std::tie in Source::Impl::queryRenderedFeatures sort 2017-01-17 17:39:54 +01:00
Konstantin Käfer
4b0cb858ba [core] include leading slash in URL.path 2017-01-17 17:38:57 +01:00
Konstantin Käfer
7983e3a67c [core] update CSSColorParser 2017-01-16 19:01:22 -06:00
Minh Nguyễn
cf166717b8 Merge branch '1ec5-release-ios-v3.4.0-beta.7' 2017-01-16 15:08:17 -08:00
Thiago Marcos P. Santos
bd71eb8681 [core] Fix ambiguous condition on the sort criteria
The previous sorting criteria would sometimes allow

C > B, B > A but A > C, making the internal std::sort
code sometimes point to an invalid reference.

Fixes #7737
2017-01-16 14:30:36 -06:00
Minh Nguyễn
7ef2843e6a Merge branch 'release-ios-v3.4.0' into 1ec5-release-ios-v3.4.0-beta.7 2017-01-16 11:38:35 -08:00
John Firebaugh
e7778509c5 [core] Fix flickering caused by regression in #7586
It should be safe to invoke GeometryTileWorker::setData multiple times without invoking GeometryTileWorker::setLayers. Therefore GeometryTileWorker::redoLayout() must not consume the layers.
2017-01-10 10:15:22 -08:00
John Firebaugh
ea4c0b77c3 [core] Replace FeatureIndex::collisionTile with a method parameter
This reduces state and simplifies the test added in the prior commit.
2017-01-10 10:15:22 -08:00
John Firebaugh
40051fb68e [core] Keep symbol and non-symbol buckets segregated
Discard prior symbol buckets only when new symbol buckets became available, in order to eliminate flickering when tiles are refreshed.
2017-01-10 10:15:22 -08:00
Minh Nguyễn
84f90697df [core] Avoid clustering unclusterable GeoJSON
Ignore empty feature collections or non–feature collections for the purposes of clustering or tiling. A source’s clustering option can only be set when the source is constructed, but setGeoJSON() enables the developer to swap a clusterable feature for an unclusterable geometry and back.
2017-01-08 17:45:18 -08:00
John Firebaugh
b6894dd4fc [core] Unify update and render into a single step
Update only when, and just prior to, rendering, giving no opportunity to interleave unexpected state changes. This means that every time anything about the state is changed, we'll have to attempt a render to reflect that change. In the case of continuous rendering this has happened before this change as well, but it leaves no room for time to pass between an update and a render. In the case of still image rendering, a render call will only actually paint something to the view when all resources have been loaded.
2017-01-06 12:03:48 -08:00
Chris Loer
d5b878a553 Small line breaking improvements based on testing with Chinese data:
- Put "breakable" punctuation (such as a hyphen) on the line that starts the break, not the line after the break.
- Process all characters with the line breaking algorithm, even if we don't have glyphs for them. Some fonts have glyph-less breakable characters (we end up treating them similarly to a "zero-width space").
- Don't include trailing white space in raggedness calculations
- Make the "favor short final lines" rule more aggressive (unlike the other changes, this one is purely an aesthetic choice)
2017-01-05 10:22:53 -08:00
Chris Loer
12a9932ebc Port raggedness-minimizing line breaking from gl-js. 2017-01-05 10:22:53 -08:00
Chris Loer
35ccb01dbd Render newlines in labels even if there's nothing else on the line. 2017-01-05 10:22:53 -08:00
Chris Loer
f68449aeb8 Cleaning up line breaking code.
* Don't include trailing spacing (as opposed to whitespace) in lineLength
* Modify BiDi interface to require initial bidi layout and linebreaking to happen in one call.
* Code style changes suggested by @kkaefer
2017-01-05 10:22:53 -08:00
John Firebaugh
0c0064c050 [core] Get rid of user-specified refs 2017-01-04 17:38:33 -08:00
John Firebaugh
4d6c5b2d3b [core] Remove constexpr from Color
GCC can't cope with it.
2017-01-04 12:10:27 -08:00
John Firebaugh
65c28deefe [core] Update gl-js for shader change 2016-12-23 10:49:51 -08:00
John Firebaugh
083cee8956 [core] Correct boolean function interpolation 2016-12-22 18:14:00 -08:00
Ansis Brammanis
2cf238f74e [core] fix matrix z range and remove hack
ported from -js: 0b5520fa5ab2a4659d80dcffa8b035a0d84fe1ca

This should fix the issue behind #2270 and remove the need for the hack
added in #3740.
2016-12-21 15:46:36 -08:00
Ansis Brammanis
29099399a9 [core] clearer pitched line antialiasing
ported from -js: ef5582dd3bc5c15a3112e875ed66494dab8e9d0b

Project the extrusion and compare it's projected pixel length with the
actual pixel length and adjust antialiasing accordingly.

The previous approach calculated the adjustment much more indirectly and
had no intuitive explanation.
2016-12-21 15:46:36 -08:00
Ansis Brammanis
38b5cb0c77 [core, ios] replace altitude with fov
ported from -js: eb6c6596c6a7a61363d30356674e0002153b1d19

`altitude` was a terribly-named variable that was used to indirectly
control the fov. This should eliminate some confusion.

`altitude` was equivalent to `cameraToCenterDistance / height`
2016-12-21 15:46:36 -08:00
Ansis Brammanis
ebd241363d [core] fix text blurriness at different FOVs
ported from -js: c52a09639ceeeb809cd837360993df9c45b45420

This replaces a hardcoded shader approximation with a more correct,
FOV-dependent one.

`gl_Position.w - 0.5`
is replaced with
`gl_Position.w / tan(fov)`

The `/ tan(fov)` is handled by multiplying `1 / tan(fov)` into `u_gamma`
outside the shader.

I think `- 0.5` was just chosen as something that looked right for the
default fov.lease enter the commit message for your changes. Lines starting
2016-12-21 15:46:36 -08:00
John Firebaugh
029805f729 [core] Replace magic number with constant-based calculation 2016-12-21 13:42:30 -08:00
John Firebaugh
bcf2c3ff9e [core] Polylabel-based "pole of inaccessibility" symbol placement 2016-12-21 13:42:30 -08:00
John Firebaugh
8a0dee6ebd [core] Remove unused BucketParameter members 2016-12-21 08:45:08 -08:00
John Firebaugh
f6985cf6ff [core] Convert BucketParameters#layer to a separate parameter
This parameter varies between Buckets, while the others are constant. It makes more sense as an individual parameter.
2016-12-21 08:45:08 -08:00
Konstantin Käfer
77db372123 [core] refactor URL parsing 2016-12-21 13:00:32 +01:00
Minh Nguyễn
117c8ed1d1 [core] Added URL accessor for tile sources 2016-12-20 21:05:40 -08:00
Minh Nguyễn
a6b1773a44 Merge branch 'release-ios-v3.4.0' into 1ec5-release-ios-v3.4.0-beta.5-master
Also reran make style-code and manually discarded anything related to fill extrusion layers.
2016-12-20 12:41:40 -08:00
John Firebaugh
dad57df38e [core] Fix symbol rendering for multipoints
Ports https://github.com/mapbox/mapbox-gl-js/pull/3763 and https://github.com/mapbox/mapbox-gl-js/pull/3806.
2016-12-20 08:30:39 -08:00
John Firebaugh
3dcff6c3e1 [core] const correctness 2016-12-20 08:30:39 -08:00