Commit Graph

3027 Commits

Author SHA1 Message Date
Ivo van Dongen
b3ffeceb9e [core] check null data in query source features 2017-03-28 21:31:35 +03:00
Molly Lloyd
47c1e42ac1 [core] implement dds for text-offset 2017-03-28 11:06:58 -07:00
John Firebaugh
5f40297526 [core] Update mapbox-gl-js submodule
Includes lowp ⇢ highp fix for shader color attributes / uniforms.
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
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
Bruno de Oliveira Abinader
9b39013ce4 [core] Internalize rapidjson.hpp 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
15833a6b78 [core] Move interpolate.hpp to public include directory 2017-03-28 13:53:19 +02:00
Anand Thakker
0abaae23b6 Small edit to improve code resiliency (#8540)
h/t @ChrisLoer catching this place where we were relying on member
initialization order.  While it _happened_ to be okay here, it's
unnecessarily fragile.
2017-03-28 07:41:03 -04:00
Bruno de Oliveira Abinader
80915992ab [core] Added Map::latLngBoundsForCamera 2017-03-24 13:51:35 +02:00
Konstantin Käfer
e67abfbe67 [core] Refactor OpenGL extension loading mechanism
Previously, we initialized global variables that held pointers to the extension functions. While this seemed to work, the spec doesn't guarantee that the function pointers are identical for different OpenGL contexts. Therefore, we are now making them a member variable of the Context object.
2017-03-23 14:50:11 -07: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
Chris Loer
a3f40d0c0c Verbose commenting on getSegmentGlyphs (#8361)
* Verbose commenting on getSegmentGlyphs
 This came out of @cloer and @anandthakker trying to figure out
 how getSegmentGlyphs actually worked.
 Goal is to use this commented version as the base for a refactor.

* Refactor getSegmentGlyphs for clarity.

* Add more documentation, inline helper functions

* Initialize VirtualSegments directly

* Fix virtual anchor diagram
2017-03-22 17:27:06 -04: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
John Firebaugh
86cddaf751 [core] Remove unnecessary unordered_map includes 2017-03-21 09:27:22 -07:00
John Firebaugh
c16bd14416 [core] Prefer std::map to std::unordered_map for smaller binary size 2017-03-21 09:27:22 -07: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
John Firebaugh
8552d6312b [core] Use core wagyu algorithm; move results into GeometryCollection 2017-03-17 08:28:51 -07:00
Blake Thompson
fb37f5e543 Added wagyu and removed angus clipper 2017-03-17 08:28:51 -07:00
John Firebaugh
ff413f6b99 [core] Fix overspecialization of PaintPropertyBinder template
PaintPropertyBinder and subclass templates were being instantiated for every unique attribute type (e.g. a_color, a_fill_color, a_halo_color) even though they behave identically for a given property value type (e.g. Color). To fix this, a unique type such as a_color no longer derives from gl::Attribute<...> -- instead it has an inner Type typedef, which should be used wherever neither a unique type nor attribute name is required. This reduces binary size substantially:

     VM SIZE                               FILE SIZE
 ++++++++++++++ GROWING                 ++++++++++++++

 -------------- SHRINKING               --------------
  -2.0% -49.3Ki __TEXT,__text           -49.3Ki  -2.0%
  -3.1% -5.21Ki [None]                  -2.79Ki  -1.6%
  -2.1% -4.12Ki __TEXT,__const          -4.12Ki  -2.1%
  -1.4% -4.04Ki __TEXT,__gcc_except_tab -4.04Ki  -1.4%
 -19.3% -3.62Ki __DATA,__data           -3.62Ki -19.3%
  -2.5% -1.65Ki __TEXT,__unwind_info    -1.65Ki  -2.5%
  -4.2%      -8 __DATA,__mod_init_func        0  [ = ]

  -1.9% -68.0Ki TOTAL                   -65.6Ki  -1.9%
2017-03-17 08:27:53 -07:00
John Firebaugh
0dca6cd9bf [core] Don't need to use normalized attributes anymore 2017-03-17 08:27:53 -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
Justin R. Miller
aae11a3430 [core] fixes #8433: don't skip style recalculations for fade-from-zero transitions (#8440) 2017-03-16 16:23:15 -07:00
Anand Thakker
458de43b9e Increase precision of shader variable (#8423)
Fixes #7599
2017-03-15 15:02:02 -04:00
John Firebaugh
af3898d980 [core] Avoid copy construction of PaintPropertyBinders 2017-03-15 11:43:42 -07:00
John Firebaugh
cee26ee3c8 [core] Replace variant with polymorphic PaintPropertyBinder class 2017-03-15 11:43:42 -07: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
Ivo van Dongen
7a13bee72e [core] don’t query rendered features until all data is available 2017-03-14 13:28:32 -07:00
John Firebaugh
bd05bcfe9f [core] Never join coincident start/end points of LineStrings 2017-03-14 09:31:59 -07:00
Ivo van Dongen
96a53156c2 [core] don’t query rendered features until all data is available 2017-03-14 17:27:59 +02:00
Thiago Marcos P. Santos
a0da2fb5d1 [build] Fix build when using a Z_PREFIX zlib
It will redefine mbgl::util::compress to mbgl::util::z_compress and
cause a link error. Aka pre-processor hell.
2017-03-14 11:18:55 +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
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
d5c2920104 [core] Extract and de-templatize several Program static methods 2017-03-09 10:32:34 -08:00