Commit Graph

949 Commits

Author SHA1 Message Date
John Firebaugh
7d16824fda [core] Functions must have at least one stop
This is already enforced by the style validator in mapbox-gl-style-spec. Enforce it here too.
2016-12-01 09:00:06 -08:00
Chris Loer
5f29c3ba26 [core] Full support for line breaking bidirectional text using ICU bidi 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.
2016-11-30 11:54:08 -08:00
Ivo van Dongen
60e451174f [core] guard against duplicate source id’s 2016-11-30 19:35:29 +02:00
John Firebaugh
3d2d57cd30 [core] Assert valid range for color components 2016-11-29 06:52:24 -08:00
Konstantin Käfer
4fe071b518 [build] upgrade to variant 1.1.4 and dependencies 2016-11-28 18:02:00 +01:00
Ivo van Dongen
c810d16f0d [android][build] core tests - initial setup for rendering tests 2016-11-27 18:50:24 +02:00
Ivo van Dongen
d2c9750b6d [core] fix up online file source test so it compiles on android 2016-11-27 18:50:24 +02:00
Konstantin Käfer
e76de05402 [build] move logging to util 2016-11-22 20:58:51 +01:00
Konstantin Käfer
117863f111 [build] move headless rendering files to platform/default 2016-11-22 20:58:51 +01:00
Konstantin Käfer
3bc79e316e [build] move default ThreadPool implementation to platform/default 2016-11-22 20:58:51 +01:00
Bruno de Oliveira Abinader
97288cae96 [test] Check all zoom levels in Annotations.SymbolAnnotation 2016-11-18 09:13:53 +01:00
John Firebaugh
38fcbe21d4 [core] Convert style properties to a tuple-based approach
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.
2016-11-17 15:13:38 -08:00
Chris Loer
d4fc66af39 [core] Add minimal line breaking support for RTL text. 2016-11-17 14:33:03 -08:00
Chris Loer
40b0c8d076 [core] Use UTF-16 instead of UTF-32 for label features to avoid extra 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.
2016-11-17 14:33:03 -08:00
Bruno de Oliveira Abinader
ad38ff230b [linux] Ensure EGL uses OpenGL ES 2.0 client API 2016-11-17 01:01:15 +01:00
Bruno de Oliveira Abinader
50f0f919c3 [test] Use shared headless display
Prevents some OpenGL implementations from bailing out.
2016-11-17 01:01:15 +01:00
John Firebaugh
d9862fa38c [tests] Disable "ContinuousRendering" test; causing spurious CI failures 2016-11-15 13:55:16 -08:00
Ivo van Dongen
39b0bc0a40 [core] symbol layer - recalculate style on icon/text size changes 2016-11-11 20:18:16 +01:00
Konstantin Käfer
16def03117 [core] add continuous rendering test that terminates once it settles down
This is to test that continuous mode stops rerendering once no further changes are needed, i.e. to test the absence of "busy rendering".
2016-11-09 17:55:59 +01:00
Konstantin Käfer
bcdbbbcac2 [core] don't assign clip IDs to tiles that aren't rendered 2016-11-08 18:09:58 +01:00
John Firebaugh
66bdbc3b96 [core] Introduce gl::Program template 2016-11-08 08:09:29 -08:00
Konstantin Käfer
afd43eea3a [core] remove gl.hpp from all headers that don't need it 2016-11-04 21:24:05 +01:00
Mike Morris
39e9b30ebc [core] add more detail to invalid metrics error in createSpriteImage 2016-11-04 14:47:34 -04:00
Bruno de Oliveira Abinader
48a082a91b [linux] Use OSMesa when running Node tests 2016-11-04 18:43:08 +02:00
Bruno de Oliveira Abinader
549929cefd [core] Set bucket segments to initialize empty 2016-11-02 18:12:28 +02:00
Konstantin Käfer
7b50cac49f [core] convert GlyphAtlas to use managed texture handling 2016-11-01 18:41:52 +01:00
Konstantin Käfer
9e3839781f [core] convert SpriteAtlas to use managed texture handling 2016-11-01 18:41:52 +01:00
Bruno de Oliveira Abinader
e2981c890e Revert "[core] Don't use GL_LINEAR if panning w/o rotation nor pitch"
This reverts commit a70bfd8910.
2016-11-01 17:44:34 +02:00
Bruno de Oliveira Abinader
7b3e24d74a [core] Cleanup TransformState::getIntegerZoom 2016-10-31 16:53:07 +02:00
Bruno de Oliveira Abinader
a70bfd8910 [core] Don't use GL_LINEAR if panning w/o rotation nor pitch 2016-10-31 16:53:07 +02:00
John Firebaugh
39d5cb3250 [core] Use VAOs internally 2016-10-28 17:14:07 -07:00
John Firebaugh
0e57d10d77 [core] Modern C++ bindings for OpenGL 2016-10-28 17:14:01 -07:00
Konstantin Käfer
62b56b799a [core] change std::array<uint16_t, 2> to mbgl::Size 2016-10-27 18:30:58 -07:00
Konstantin Käfer
91272992f3 [core] don't load tiles from sources that aren't used 2016-10-27 16:15:36 -07:00
Konstantin Käfer
a4d259c33f [core] move gl::Context to Backend and refactor View 2016-10-25 13:52:36 -07:00
Konstantin Käfer
5cc390d694 [core] separate Backend from View for headless rendering 2016-10-25 13:52:36 -07:00
Ivo van Dongen
e31a2c1c11 [core] fixup formatting 2016-10-21 10:05:00 -07:00
Mike Morris
817c26111a [core] [node] pass thread pool impl to Map constructor
Updates mbgl::Map constructor usage everywhere

Adds NodeThreadPool implementation using AsyncQueue to call
Nan::AsyncQueueWorker from main thread
2016-10-20 14:37:36 -04:00
Ivo van Dongen
ab63a9494f [core] reload geojson source on url change 2016-10-20 16:18:08 +03:00
Bruno de Oliveira Abinader
c50577d039 [core] Fix SymbolAnnotation coordinate system conversions 2016-10-19 08:11:41 +03:00
Bruno de Oliveira Abinader
ef62b78fce [core] TileCoordinate::fromLatLng no longer depens on TransformState 2016-10-19 08:11:41 +03:00
Tore Halset
a4b79ac289 [core] Optimize OfflineDownload::ensureResource (#6707)
Add `OfflineDatabase::hasRegionResource`, for use when the actual contents are not needed by the caller, avoiding IO and decompression costs.
2016-10-17 09:27:07 -07:00
Bruno de Oliveira Abinader
436a22efe9 [core] Skip duplicated IDs when querying point annotations 2016-10-12 18:58:22 +03:00
Bruno de Oliveira Abinader
9946e60536 [test] Added TileCoordinate tests 2016-10-11 19:36:21 +03:00
Bruno de Oliveira Abinader
ccef4be995 [test] Added Annotations.VisibleFeatures test
This provides a means of testing cases where an updated geometry tile
would return wrong results for `queryRenderedFeatures`.
2016-10-11 12:10:32 +03:00
Bruno de Oliveira Abinader
efc1bff65f [core] Ignore placement for symbol annotations 2016-10-11 09:55:32 +03:00
Bruno de Oliveira Abinader
3b8b68d028 [core] Fix Map::setLatLng behavior
We were erroneously assigning a value to optional<ScreenCoordinate>
(null island), causing it to be a valid anchor for Transform::easeTo.
2016-10-07 17:23:17 +03:00
Konstantin Käfer
08809b4d44 [macos,ios] initialize util::RunLoop in SDK rather than by default 2016-10-06 10:16:45 -07:00
John Firebaugh
7a3bef091e [core] Refactor Buffer 2016-10-05 10:52:19 -07:00
John Firebaugh
31be5d3c3a [core] Tiles that error on load are not renderable 2016-10-05 10:26:04 -07:00