Commit Graph

1737 Commits

Author SHA1 Message Date
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
Bruno de Oliveira Abinader
80915992ab [core] Added Map::latLngBoundsForCamera 2017-03-24 13:51:35 +02:00
Konstantin Käfer
234384ece9 [core] Move OpenGL extension initialization to Backend 2017-03-23 14:50:11 -07: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
John Firebaugh
e488ca702e Merge branch 'release-ios-v3.5.0-android-v5.0.0' 2017-03-21 12:04:20 -07:00
Bruno de Oliveira Abinader
1f8910de18 Make Source::getZoomRange return an optional range 2017-03-21 19:33:36 +02:00
Bruno de Oliveira Abinader
c1a410be8b [core] s/onSourceDidChange/onSourceChanged/ + source ref 2017-03-21 17:36:56 +02:00
Bruno de Oliveira Abinader
24198ebca8 [core] Expose Source::getZoomRange 2017-03-20 18:25:04 +02:00
Jesse Bounds
73ed8aa7be [ios] Guard against over calling pause or resume 2017-03-18 19:09:45 -07:00
Bruno de Oliveira Abinader
5ff4110243 [core] Pass std::exception_ptr in MapObserver::onDidFailLoadingMap 2017-03-17 11:25:48 +02:00
Bruno de Oliveira Abinader
e10e37bc20 [core] Pass std::exception_ptr in style::Observer::onStyleError 2017-03-17 11:25:48 +02:00
John Firebaugh
841da960bc [node] Work around a link error on macOS release builds (#8409) 2017-03-15 08:39:21 -07:00
Bruno de Oliveira Abinader
fc70cbf1e1 [core] Replace MapChange enum with MapObserver 2017-03-15 14:53:32 +02:00
Fabian Guerra Soto
20712b7c84 Per-attribute transition properties on MGLStyleLayer (#8225)
* [ios, macos] new struct MGLTransition

* [ios] MGLTransition struct moved to MGLTypes.h

* [ios] MGLTransition implemented for style layer properties

* [ios, macos] added support for getting property transitions

* [ios, macos] updated to MGLDurationFromTimeInterval and MGLTimeIntervalFromDuration

* [ios, macos] added transition properties test

* [ios, macos] modified key strings imp

* [ios, macos] The impl for transition properties were changed to public methods

* [ios, macos] Changelog update

* [ios] Fixed layer space formatting

* [core] The name space was fixed for getters that returned TransitionOptions

* [ios, macos] Added rawLayer transition property tests

* [ios] Added a factory method for MGLTransition and transition-related methods to NSValue(MGLAdditions)

* [ios, macos] Copyedited changelog blurbs about transition properties
2017-03-10 11:33:31 -08:00
Ivo van Dongen
517659b1b4 [core] query source features 2017-03-10 11:08:32 -08:00
Ivo van Dongen
4d325879b8 [core] rename query options for query rendered features 2017-03-10 11:08:32 -08:00
John Firebaugh
42ad77a888 [core] Avoid -Wundefined-var-template warnings with clang 3.9+ 2017-03-09 17:32:24 -08:00
Ivo van Dongen
0d10d2df1c [core] query source features 2017-03-09 13:11:23 -08:00
Ivo van Dongen
548675a196 [core] rename query options for query rendered features 2017-03-09 13:11:23 -08:00
John Firebaugh
e044e0aab9 [core] Avoid using std::function in property_setter.hpp 2017-03-08 16:50:28 -08:00
Anand Thakker
bb846fd6cd For data-driven paint setters, transition immediately to target value (#8306)
Closes #8237
2017-03-08 11:53:44 -05:00
Asheem Mamoowala
60d10dd27d [core] Add support for queryRenderedFeatures filter 2017-03-04 15:42:07 -08:00
Minh Nguyễn
ac4e13416a [core] Enable debug events in Debug configuration 2017-03-04 12:48:33 -08:00
Thiago Marcos P. Santos
f6cd017f58 [Qt] Remove legacy QOpenGL dependency from Qt5 build
OpenGL on Qt5 is offered via QtGui.
2017-03-03 17:28:07 -08:00
Bruno de Oliveira Abinader
c461dad5ee [core] Safeguard ICU UChar usage 2017-03-02 11:40:42 -08:00
Jesse Bounds
e1546644b5 [core] Cache file source base URL and access token
This caches the base URL and access token values when they are set
so that they can still be retrieved even when the thread is paused.
2017-03-01 08:25:44 -08:00
Anand Thakker
f901e776b3 [core] Implement data-driven styling for {text,icon}-{color,opacity,halo-color,halo-blur,halo-width} (#7939)
* Add symbol dds attributes and adapt style code generation

* Update to mapbox-gl-js/master

* Refactor SymbolFeature as a subclass of GeometryTileFeature

Prepares for enabling DDS on symbol paint properties by allowing the
SymbolFeatures, which we keep around after constructing SymbolLayout,
to be used in evaluating data-driven paint properties later in the
layout process.

* Draft approach for splitting icon/text paint properties

The `Program` types are set up to bind GL attributes to each of the
data-driven paint properties specified in the `PaintProperties` type
provided.  Since `SymbolPaintProperties` specifies both `Text*` and
`Icon*` properties, the symbolIcon, symbolIconSDF, and symbolGlyph
programs each attempt to bind roughly double the number of attributes
that they actually need.

This change addresses this by:
- Adding the more specific `IconPaintProperties` and `TextPaintProperties` types, which are subsets of the full `SymbolPaintProperties`.
- The symbol layer continues to use its `SymbolPaintProperties paint` member to track layer property state, but it provides helpers that construct objects of each the specific `{Icon,Text}PaintProperties::Evaluated` type, for use by the painter.
- The three symbol programs instantiate `Program<>` using the appropriate `{Icon,Text}PaintProperties` type.

* check in generated style code

* Populate paint buffers for symbol DDS properties

* Address first round of review comments

* Refactor VectorTile{Layer,Feature} to explicitly share data

* Update submodule
2017-02-28 19:54:24 -08:00
Tobrun
34fef22d95 [core] [android] - allow zooming/scaling to use AnimationOptions (#8181)
[glfw] - allow glfw binding to use AnimationOptions instead of using direction directly
2017-02-28 13:22:47 -05:00
Thiago Marcos P. Santos
4c2e720b15 [core] Add a pause/resume API to the DefaultFileSource
It will halt the networking thread completely. Expired and error'ed
tiles won't get re-requested until resume() is called again.
2017-02-25 14:03:38 +02:00
Tobrun
a0992f0550 [core] - allow moveBy to use AnimationOptions
[android] - update jni bindings for moveBy with an interpolator
2017-02-20 16:52:18 -08:00
John Firebaugh
7d3c9338c9 [core] Link BackendScopes in a list for additional assertions 2017-02-20 12:04:21 -08:00
John Firebaugh
773f330774 [core] Ensure that context resources are destroyed before context is destroyed 2017-02-20 12:04:21 -08:00
John Firebaugh
694159c49e [core] Nestable BackendScope 2017-02-20 12:04:21 -08:00