Commit Graph

1071 Commits

Author SHA1 Message Date
Tobrun
6ec5e4f8cd Cherry picks to release branch (#9230)
* [ios][macos] test remove source in use

* [android] test remove source in use

* [core] check source usage before remove

* [core] ensure layer::accept works with non-void return values on gcc

* [android] - remove upgrade runtime exceptions (#9191)
2017-06-09 12:05:54 +02:00
Bruno de Oliveira Abinader
0d171dbe0e [core] Make TransformState LatLngBounds optional 2017-06-01 13:46:53 -04:00
Minh Nguyễn
0ef1293dad [core, android, ios, macos, qt] v10 default styles
Upgraded from v9 default styles to v10 wherever the developer expects to get the latest and greatest, as well as in a couple tests where it may be beneficial to ensure that we can handle a two-digit version number in the style URL.

Cherry-picked from ed54849e99.
2017-05-12 10:02:27 -07:00
John Firebaugh
baaae99a03 [core, android] Factor JSON string conversions
This adds a `convertJSON` template, to be used like:

   Error error
   optional<Foo> foo = convertJSON<Foo>(string, error);

Internally, it parses the string with RapidJSON and then calls `convert<Foo>(parsed, error)`.

While here, rationalize GeoJSON converters and fix error handling for Tileset conversion in OfflineDownload.
2017-05-08 13:48:57 -07:00
Ivo van Dongen
feae5e22ee [core] generated accessor methods on light 2017-05-08 19:39:55 +03:00
John Firebaugh
e7d2796762 [core] Omnibus Style::update method
Combine Style::cascade, recalculate, relayout, and updateTiles into a single method. This allows multiple loops over sources and layers to be consolidated and prepares for additional Style-Map decoupling: rather than tracking pending updates via a set of Update flags held by the Map and passed to the Style, the Style can use its own data to determine what to update.
2017-05-04 09:59:56 -07:00
John Firebaugh
89f1ffc6d2 [core] UpdateParameters ⇢ TileParameters 2017-05-04 07:29:08 -07:00
John Firebaugh
d5f4d0f05f [core] Move render-related sources out of style directory/namespace
Moves the following to the renderer directory and out of the style namespace:

* CascadeParameters
* PropertyEvaluationParameters
* UpdateParameters
* PropertyEvaluator
* DataDrivenPropertyEvaluator
* CrossFadedPropertyEvaluator
* PaintPropertyBinder
* PaintProperyStatistics
* PossiblyEvaluatedPropertyValue
* TransitioningLight
* EvaluatedLight
2017-05-03 08:30:17 -07:00
Asheem Mamoowala
5c52401d55 [core] Make Map.addImage tests pass (#8843)
Fix Node tests suite implementation to parse pixelRatio from style json
Premultiply images in the node binding before sending to mbgl core
2017-05-02 09:54:06 -07:00
John Firebaugh
3f0c89d633 [core] Refactor Source::*Impls into RenderSources and TilePyramid 2017-05-02 08:45:09 -07:00
John Firebaugh
197751bace [core] Load source TileJSON immediately
This reverses #3095. Rationale:

* We're now exposing source attributes as a public API. Making those attributes unavailable at certain times complicates that API.
* We're preparing to split RenderSource out of Source. Removing this removes a point of coupling between the two.
2017-05-02 08:45:09 -07:00
John Firebaugh
c2b00378b7 [all] Push querySourceFeatures back out to Map
Once Source and RendererSource are split, Source will no longer have access to tiles.
2017-05-02 08:45:09 -07:00
Lauren Budorick
f6e79d7073 [core] Render fill-extrusion layers (#8431) 2017-04-27 15:56:55 -07:00
Ivo van Dongen
3c175adf30 [core] split off render layers 2017-04-25 17:23:54 -07:00
John Firebaugh
5dd98df50b [all] Rationalize style::Image
A style has a collection of images, just as it has collections of sources and layers.

* Name things appropriately
* Use std::unique_ptr
2017-04-24 15:52:28 -07:00
Konstantin Käfer
59055cf403 [core] Move Sprite parsing to thread pool 2017-04-24 10:42:47 +02:00
Konstantin Käfer
197f0ca6b4 [android] use AAssetManager instead of libzip 2017-04-24 10:42:10 +02:00
Konstantin Käfer
9a9408e811 [core] Render parent raster tiles when ideal tile can't be loaded 2017-04-20 09:38:18 +02:00
John Firebaugh
ddecdeca94 [core] Move ProjectedMeters to projection.hpp 2017-04-18 14:43:31 +03:00
John Firebaugh
a50d7a331b [core] Replace GlyphRangeSet in onGlyphsAvailable with optionals in the map
GlyphRangeSet isn't keyed by FontStack, so using it to indicate that a particular range was loaded could have produced false positives.
2017-04-14 15:39:31 -07:00
Bruno de Oliveira Abinader
09a2271576 [core] Ignore shortest path in Map::pixelForLatLng 2017-04-14 12:52:20 -07:00
Bruno de Oliveira Abinader
98e2e59e5e [core] Safeguard PositionedIcon usage via optional 2017-04-14 12:33:13 -07:00
Bruno de Oliveira Abinader
2f4d162deb [core] Tighten geo.hpp ctors 2017-04-14 12:33:13 -07:00
John Firebaugh
f1c06f8d83 [all] Remove redundant scale-related camera methods
We don't need to have two different measurement systems for map zoom.
2017-04-13 10:28:44 -07:00
John Firebaugh
a2670336d4 [tests] Rewrite GlyphAtlas tests to use public API 2017-04-13 10:10:56 -07:00
John Firebaugh
0810192163 [core] Inline GlyphSet into GlyphAtlas 2017-04-12 16:57:52 -07:00
Fabian Guerra
12b6fdbe3b Merge branch 'release-ios-v3.5.0-android-v5.0.0' into boundsj-merge-release-branch
# Conflicts:
#	cmake/core-files.cmake
#	mapbox-gl-js
#	platform/android/CHANGELOG.md
#	platform/ios/CHANGELOG.md
#	platform/macos/CHANGELOG.md
#	platform/qt/bitrise-qt5.yml
#	src/mbgl/gl/attribute.hpp
#	src/mbgl/gl/context.cpp
#	src/mbgl/gl/program.hpp
#	src/mbgl/map/map.cpp
#	src/mbgl/programs/program.hpp
#	src/mbgl/renderer/painter.cpp
2017-04-11 21:46:23 -04:00
Bruno de Oliveira Abinader
c4fc89977b [core] Added {set,get}{Min,Max}Pitch 2017-04-11 12:51:09 +03:00
Bruno de Oliveira Abinader
c1c6c1e298 [core] Added Map::{get,set}LatLngBounds 2017-04-11 12:51:09 +03:00
Bruno de Oliveira Abinader
e5aa4d70cd [core] Updated Size::isEmpty and TransformState::valid checks 2017-04-10 18:01:28 +03:00
John Firebaugh
5621a08f89 [core] Test glyph PBF parsing independently of GlyphAtlas 2017-04-06 12:46:06 -07:00
Anand Thakker
693c9f3641 [core] Add DDS support for {text,icon}-size (#8593)
* Update gl-js and generate style code

* Factor out packUint8Pair() helper function

* Draft implementation of DDS for {text,icon}-size

Ports https://github.com/mapbox/mapbox-gl-js/pull/4455

* Fix text-size/composite-function-line-placement test

* Refactor to PaintPropertyBinders-like strategy

* Dedupe gl::Program construction

* Use exponential function base for interpolation

* Dedupe coveringZoomStops method

* Fixup tests

* Fix CI errors (hidden within #if block)
2017-04-06 15:29:59 -04:00
John Firebaugh
16a2839e23 [all] Make LatLng coordinates read-only 2017-04-06 09:22:51 -07:00
John Firebaugh
0314a46ee4 [core] Tighten LatLng and other geo.hpp classes
* Remove LatLng::null and enforce invariants
* Remove unnecessary operator bool()
2017-04-06 09:22:51 -07:00
Chris Loer
5cdf838a38 [core] De-mutex GlyphAtlas and SpriteAtlas
- Expose glyph and icon information to workers via message interface.
 - Glyph/SpriteAtlas track which tiles have outstanding requests
    and send messages to them when glyphs/icons become available.
 - Remove obsolete "updateSymbolDependentTiles" pathway
 - Symbol preparation for a tile now depends on all glyphs becoming
    available before it can start.
 - Start tracking individual icons needed for a tile, although we don't
    do anything with the information yet.
 - Introduce typedef for GlyphID
2017-04-04 11:33:12 -07:00
Ivo van Dongen
1d1ea2fa24 [core] fixup stale constants references in test fixtures 2017-04-04 18:31:11 +03:00
Konstantin Käfer
f86333961e [core] cache binary shaders on Android 2017-04-03 11:01:43 -07:00
Anand Thakker
b5b4549b6d Fix edge case in composite function interpolation (#8613)
This fixes a bug where, for a zoom value greater than that of the highest zoom
stop, composite function interpolation would return nan. (Blocking a render
test over in #8593)

* Add failing tests for composite function edge case

The failing cases here are:
 - Should interpolate before the first stop
 - Should interpolate past the last stop

* Fix edge case in composite function interpolation

* Hold functions constant outside stop-defined domain
2017-04-03 12:25:36 -04:00
John Firebaugh
c4f9582bfa [core] Pass fully-evaluated layout properties to SymbolInstance and quad methods 2017-03-31 13:26:27 -07:00
John Firebaugh
d7a55a4be1 [core] Introduce a fully-evaluated tuple type for layout properties 2017-03-31 13:26:27 -07:00
John Firebaugh
1edbb0f24b [core] check null data in query source features (#8553)
* [core] check null data in query source features

* Include what you use
2017-03-28 16:02:48 -07:00
Ivo van Dongen
b3ffeceb9e [core] check null data in query source features 2017-03-28 21:31:35 +03:00
Dane Springmeyer
cfb26c0a79 [test] Fix polygon construction to compile with clang 3.9.x 2017-03-28 10:13:35 -07:00
Konstantin Käfer
14bf47c296 [glfw] Remove GL state restoration
We're doing all of this in our own context anyway, so no need to restore the state
2017-03-28 13:53:19 +02:00
Konstantin Käfer
68e032e505 [core] Remove private header includes from CLI utilities 2017-03-28 13:53:19 +02:00
Tobrun
83cef9eb68 [android] - update VectorSource javadoc (#8521)
* [android] - update VectorSource docs on VectorSource creation

* [tests] Test only CameraOptions center, zoom in CameraToLatLngBounds
2017-03-24 17:55:55 +01:00
Bruno de Oliveira Abinader
80915992ab [core] Added Map::latLngBoundsForCamera 2017-03-24 13:51:35 +02:00
Konstantin Käfer
8e5214144e [core] Ensure that a BackendScope exists when doing GL calls 2017-03-23 14:50:11 -07:00
John Firebaugh
d7227e13a7 [all] Replace Result<T> with optional<T> plus out Error parameter 2017-03-23 13:31:13 -07:00
Konstantin Käfer
3c91b6b7de [core] cache binary shaders on Android 2017-03-22 15:59:10 +01:00