Commit Graph

1771 Commits

Author SHA1 Message Date
John Firebaugh
1188707dc3 [core] Use separate attribute component for line normals
Selective cherry pick of 822df3dd51
2017-08-18 11:43:24 +02:00
Ivo van Dongen
733661948c [core] BackendScope prevent double (de-)activation
- Guards against duplicate activations by checking wether the backend of the prior scope is the same as the current ones
- Makes sure that only the most outer backend scope deactivates by tracking activation state
2017-07-19 17:34:07 +02:00
John Firebaugh
1de8aeed31 [core] Fix composite function approximation for non-integer stops 2017-06-19 09:15:08 -07:00
Fabian Guerra Soto
67c09b18e4 MGLLight autogenerate scripts (#9260)
* [ios, macos] Add the MGLLight generation templates

* [ios, macos] Add MGLLight generation script

* [ios, macos] Add the auto-generation script for MGLLight.mm

* [ios, macos] Add the auto-generation script for MGLLightTest.mm

* [core] Add const to Position constructor.

* [ios, macos] Simplify MGLLightTest.mm autogenerate script.
2017-06-16 06:41:51 -07:00
John Firebaugh
d618d4a274 [core] Dynamic program compilation for data-driven properties 2017-06-14 11:13:43 -07:00
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
Konstantin Käfer
b52e171b67 [core] add error for non-virtual destructor deletes + add virtual dtors 2017-05-19 12:12:47 +02: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
6fd40867d6 [core] delegate light changes to render light 2017-05-08 19:39:55 +03:00
Ivo van Dongen
feae5e22ee [core] generated accessor methods on light 2017-05-08 19:39:55 +03:00
Lauren Budorick
1c9af3226f [core] Reuse fill-extrusion textures between frames (#8896) 2017-05-08 09:06:07 -07:00
John Firebaugh
54b7684baa [core] Remove unused declaration 2017-05-05 08:57:30 -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
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
197f0ca6b4 [android] use AAssetManager instead of libzip 2017-04-24 10:42:10 +02:00
John Firebaugh
3c23faf65a [core] More complete fix for composite function interpolation edge case
b5b4549 / #8613 handled the edge case for layout properties, but not paint properties. Move the check for a degenerate range to interpolationFactor in order to handle both correctly.
2017-04-20 16:11:57 -07:00
John Firebaugh
ddecdeca94 [core] Move ProjectedMeters to projection.hpp 2017-04-18 14:43:31 +03:00
John Firebaugh
092da9c956 [core] Remove non-Map-dependent projection methods from Map 2017-04-18 14:43:31 +03:00
Bruno de Oliveira Abinader
2f4d162deb [core] Tighten geo.hpp ctors 2017-04-14 12:33:13 -07:00
Bruno de Oliveira Abinader
8877452ec3 [core] TransitionOptions s/operator bool/isDefined/ 2017-04-14 12:33:13 -07:00
Bruno de Oliveira Abinader
04a3a7383a [core] Remove unused bool() functions 2017-04-14 12:33:13 -07:00
John Firebaugh
7b041b123c [core, darwin] Object identity for MGLSource*, MGLStyleLayer*
All `MGLSource` pointers referencing the same logical source will now be object identical; similarly for `MGLStyleLayer`.
2017-04-13 10:33:18 -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
62576e24a0 [core] Revert use of optional<EdgeInsets>, because EdgeInsets has a natural "empty" state 2017-04-11 14:50:22 -07: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
bc7f6da135 [core] Added LatLngBounds::{valid,constrain} 2017-04-11 12:51:09 +03:00
Bruno de Oliveira Abinader
ddc6dcf9cd [core] Move {Map,Transform}::{get,set}{Min,Max}Zoom to bounds pragma 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
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
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
1a9bccbb85 [core] Add DDS support for icon-image 2017-03-31 14:17:33 -07:00
John Firebaugh
743d954053 [core] Add DDS support for text-rotate 2017-03-31 13:26:27 -07:00
Molly Lloyd
47c1e42ac1 [core] implement dds for text-offset 2017-03-28 11:06:58 -07:00
Konstantin Käfer
f70f604e5b [core] Privatize gl/gl.hpp 2017-03-28 13:53:19 +02:00
Konstantin Käfer
a84aa453a9 [core] Privatize OpenGL/Context headers 2017-03-28 13:53:19 +02:00
Konstantin Käfer
028360b68f [node] Move util/async_task.hpp to public include directory 2017-03-28 13:53:19 +02:00
John Firebaugh
34aa7f880e [core] Move map/change.hpp to public include directory 2017-03-28 13:53:19 +02:00
John Firebaugh
099a1cb9f1 [core] Move actor/{mailbox,scheduler}.hpp to public include directory
Map constructor takes Scheduler&, and consumers are expected to define an implementation. Therefore the interface must be public.
2017-03-28 13:53:19 +02:00
John Firebaugh
54cbdc4812 [core] Move ignore.hpp to public include directory 2017-03-28 13:53:19 +02:00
John Firebaugh
3db027751e [core] Avoid public dtoa.hpp include 2017-03-28 13:53:19 +02:00
John Firebaugh
0be8309446 [core] Avoid public geometry_tile_data.hpp include 2017-03-28 13:53:19 +02:00
John Firebaugh
15833a6b78 [core] Move interpolate.hpp to public include directory 2017-03-28 13:53:19 +02:00