Commit Graph

3431 Commits

Author SHA1 Message Date
Chris Loer
5bdee52e5c [core] Cleanup in response to review comments 2017-11-17 10:05:15 -08:00
Chris Loer
ff58848cfd [core] Remove dead code
- CollisionTile
 - FrameHistory
 - PlacementConfig
2017-11-17 10:05:15 -08:00
Chris Loer
4137f559f0 [core] Use floats instead of ints for Shaping.
Brings gl-native shaping closer to gl-js.
2017-11-17 10:05:15 -08:00
Chris Loer
30de793c2a [core] Update shaders/tests from GL JS. 2017-11-17 10:05:15 -08:00
Chris Loer
77bfb47fda [core] Update queryRenderedFeatures to use global CollisionIndex. 2017-11-17 10:05:15 -08:00
Chris Loer
c0cb210ddc [core] Switch from background to foreground placement
- Background placement code now just generates static symbol buffers
 - Don't render GeometryTiles until their symbols are loaded. This is necessary for the CrossTileSymbolIndex to successfully prevent flicker.
 - SymbolInstances are transferred to SymbolBucket for use on foreground during collision detection
 - Symbols are sorted on foreground by sorting their index buffer but leaving vertex buffers intact (only works within one segment)
 - Vertical glyphs are generated at same time as horizontal glyphs. `reprojectLineLabels` chooses which one to use at render time and hides the other.
 - Icons are now always represented with a single collision box, even if they're placed along a line (this means their rotation alignment may be wrong, but the approach of representing them with multiple collision boxes wasn't very accurate either).
 - Generate vertices for new debug collision boxes and collision circles
 - Only add symbols within tile boundaries (reduces work, avoids double-draw)
 - Update symbol_projection.cpp to support line label projection calls from CollisionIndex.
2017-11-17 10:05:15 -08:00
Chris Loer
9a5b2fdfc3 [core] Enable dynamic updates of index buffers. 2017-11-17 10:05:15 -08:00
Chris Loer
4c6f0e8138 [core] Add global CollisionIndex to replace CollisionTile.
- Switches from tile to viewport coordinates
 - Represents line labels with circle geometries
 - Projects line labels at collision detection time to improve accuracy
 - Adapts tile-based symbol queries to viewport coordinates
2017-11-17 10:05:15 -08:00
Chris Loer
18d735ccc2 [core] Add Placement class.
Responsible for running global collision detection/symbol placement algorithm and updating symbol opacity buffers accordingly.
2017-11-17 10:05:15 -08:00
Chris Loer
601a1c8dcf [core] Add circle geometries to GridIndex.
- Adds early exiting "hitTest" query for fast collision detection
 - GridIndex now determines cell count separately for x and y axes based on grid dimensions.
2017-11-17 10:05:15 -08:00
Chris Loer
31f0f47195 [core] Add CrossTileSymbolIndex.
This class is responsible for tracking which symbols are "the same" between tiles at different zoom levels, so that symbol opacities (fade animations) can be copied smoothly between tiles.
2017-11-17 10:05:15 -08:00
Thiago Marcos P. Santos
92608f5885 [core] Fix build on Android + GCC and Android + armeabi
Sadly we don't have bots for these two setups.
2017-11-12 13:17:57 -02:00
Tobrun
225fba8a0a Merge branch 'release-agua' into tvn-merge-release 2017-11-10 06:16:35 +01:00
Anand Thakker
f648cfeef6 Implement Expressions (#9439)
Ports https://github.com/mapbox/mapbox-gl-js/pull/4777 (and its several follow-ups)
2017-11-08 12:34:02 -05:00
Bruno de Oliveira Abinader
13ec2cc562 Revert "[core] Expose ColorMask in gl::Context::clear()"
This reverts commit e350ef37fe.
2017-11-02 15:14:37 +02:00
Bruno de Oliveira Abinader
68ab4f6cec [core] Let transparency leak in GLContext::Shared mode 2017-11-01 17:45:37 +02:00
Bruno de Oliveira Abinader
e350ef37fe [core] Expose ColorMask in gl::Context::clear() 2017-11-01 17:45:37 +02:00
Bruno de Oliveira Abinader
1262659b8d [core] Move GLContextMode to its own Renderer header 2017-11-01 17:45:37 +02:00
Thiago Marcos P. Santos
c65465c02e [gcc4.9] Keep compatibility with GCC + Android
Needed by Qt builds on Android.
2017-10-31 12:41:40 +02:00
Ivo van Dongen
bf9c1fb1b3 [core] blacklist VAO usage on adreno 3xx
- Causes crashes on usage of glBuffer(Sub)Data
2017-10-26 18:14:45 +02:00
Konstantin Käfer
ab3547a216 [core] fix crash when querying GeoJSON tiles 2017-10-26 14:30:39 +03:00
Ivo van Dongen
45dc313009 [core] blacklist VAO usage on adreno 3xx
- Causes crashes on usage of glBuffer(Sub)Data
2017-10-26 12:00:11 +02:00
Konstantin Käfer
c9d7951e0d [core] fix crash when querying GeoJSON tiles 2017-10-25 22:32:26 +03:00
John Firebaugh
ba8342a12e [core] Add layer before notifying observer 2017-10-25 09:05:00 -07:00
John Firebaugh
01ed21a3c4 [core] Add layer before notifying observer 2017-10-25 08:27:59 -07:00
Thiago Marcos P. Santos
9d87dc8cf1 [core] Make the OpenGL implementation platform specific
Split the headers, so each platform includes the most appropriated
header.
2017-10-25 18:08:28 +03:00
John Firebaugh
4b2e1cddb4 Replace compile-time polymorphism with runtime polymorphism in the conversion system 2017-10-23 09:56:43 -07:00
Konstantin Käfer
61ea2f43e4 [core] limit annotation tile source to z16 2017-10-19 16:50:17 -07:00
Konstantin Käfer
60d635613d [core] limit annotation tile source to z16 2017-10-19 09:22:03 -07:00
Fabian Guerra Soto
b7b8baef9d [ios, macos] Add selection support to MGLMultiPoint annotations. (#9984)
* [ios, macos] Add selection support to MGLMultiPoint annotations.

* [ios, macos] Update changelogs.
2017-10-18 15:18:54 -04:00
Konstantin Käfer
9c12a311f2 [core] correctly alter sprite URLs when attaching sprite.png/sprite.json filenames 2017-10-17 17:31:59 -07:00
Konstantin Käfer
0cd646180e [core] don't generate clip IDs for buckets/layers that don't need to be clipped 2017-10-17 15:48:41 -07:00
Konstantin Käfer
10f7af19ce [core] correctly alter sprite URLs when attaching sprite.png/sprite.json filenames 2017-10-17 15:39:07 -07:00
Konstantin Käfer
cbff0a972a [core] don't generate clip IDs for buckets/layers that don't need to be clipped 2017-10-17 15:08:22 -07:00
Anand Thakker
b8654b3b04 [core] Move SourceType to the 'style' namespace 2017-10-16 16:32:53 -07:00
Lauren Budorick
e43e2aa3d7 [core, node] Support axonometric rendering 2017-10-14 03:15:34 +02:00
Asheem Mamoowala
d7d3d2c731 [core] Fix out-of-bounds array access 2017-10-13 10:48:21 -07:00
Asheem Mamoowala
8bccf657e9 [core] Fix out-of-bounds array access 2017-10-12 12:21:00 -07:00
Konstantin Käfer
78ea88d757 [core] make forcing cache/network only more explicit
Previously, we used the existence of a `prior*` field in the Resource object as an indication for whether we should consult the cache or not. However, this is prone to error, since a failed cache lookup won't set any prior fields. Therefore, we manually set `priorExpires` to 0. This in turn triggered another bug where generated wrong expiration timestamps when the server response we got was expired (or expired between sending and receiving).

This commit changes the flags so that we can now explicitly request CacheOnly/NetworkOnly (or All) loading methods, rather than the implicit Optional/Required naming scheme.
2017-10-12 17:58:03 +02:00
Konstantin Käfer
f4cb3b8a4f [core] make forcing cache/network only more explicit
Previously, we used the existence of a `prior*` field in the Resource object as an indication for whether we should consult the cache or not. However, this is prone to error, since a failed cache lookup won't set any prior fields. Therefore, we manually set `priorExpires` to 0. This in turn triggered another bug where generated wrong expiration timestamps when the server response we got was expired (or expired between sending and receiving).

This commit changes the flags so that we can now explicitly request CacheOnly/NetworkOnly (or All) loading methods, rather than the implicit Optional/Required naming scheme.
2017-10-12 10:41:49 +02:00
Asheem Mamoowala
df20b0cbec [core] Add cameraForLatLngs() method with modified bearing 2017-10-09 13:58:11 -07:00
Asheem Mamoowala
2366487275 [core] Add cameraForLatLngs() method with modified bearing 2017-10-09 11:42:37 -07:00
Bruno de Oliveira Abinader
b1239464c1 [core] Update glyph requestors _before_ requesting from file source 2017-10-09 13:33:30 +03:00
Asheem Mamoowala
a323b0dcec [core] Split GeoJSONTileData and related classes into a separate header 2017-09-28 15:47:21 -07:00
Konstantin Käfer
8fae8a1645 [core] Add minzoom to GeoJSONOptions 2017-09-28 15:47:21 -07:00
Konstantin Käfer
64c75b442c [build] split out DefaultFileSource and dependents to a separate target
We don't want to link it into the node bindings, so keep it in a separate target
2017-09-28 13:48:36 -04:00
Jesse Crocker
a06f4849bc [core] Move *TileID hashing to separate impl 2017-09-26 10:55:40 -07:00
Konstantin Käfer
f281e6ae8a [core] fix loading of stale must-revalidate resources
In https://github.com/mapbox/mapbox-gl-native/pull/9670, we implemented support for the Cache-Control: must-revalidate header. While we now respect this header and don't show resources that are stale and have this header set, the optional cache request never completes. This means we're also never going to try to actually get a fresh tile and just never show this tile anymore.

This commit fixes this by responding with a Not Found error when the resource is unusable (= stale and has must-revalidate set). Since we actually still have the data (but can't use it due to caching rules), we're responding with the data as well. To avoid a second cache hit, tile_loader_impl.hpp now passes on the data from the Optional to the Required request so that it can be reused when we get a 304 Not Modified response from the server.
2017-09-25 10:47:20 +02:00
Ivo van Dongen
97a010cc9b [core] custom layer - add contextLost callback
- optional callback method that can be used to do cleanup when the context has been lost before re-initialisation
2017-09-22 23:33:56 +03:00
Ivo van Dongen
bda6ed26c6 [core] send signal to RenderCustomLayer when gl context has been lost
- Prevents cleaning up of GL resources that no longer exist, resulting in a crash
2017-09-22 23:33:56 +03:00