Commit Graph

10702 Commits

Author SHA1 Message Date
John Firebaugh
4416441663 [core] Revert conditional attribute binding
Reverts eed89fcf9d, which causes issues on certain Android devices. We don't actually need this change on this branch, I brought it over only to make the subsequent commits cleanly cherry-pickable.
2017-07-19 10:44:00 -07:00
Ivo van Dongen
e7f45e0b19 [android] remove manual ref counting on activation/deactivation 2017-07-19 17:34:07 +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
2d147470a5 [android] Force previously cached program binaries to be regenerated 2017-07-17 09:19:02 -07:00
John Firebaugh
550da70cf7 [core] Pass correct sources to programIdentifier 2017-07-17 09:19:02 -07:00
John Firebaugh
902d9442da [core] No need for optional in map of VertexArrays 2017-07-17 09:19:02 -07:00
John Firebaugh
cf83f117f0 [core] Reduce memory requirements of VertexArrays 2017-07-17 09:19:02 -07:00
John Firebaugh
de91e68090 [core] Per-segment-per-layer vertex arrays
Reduces rebinding, matches gl-js, and works around the buggy VAO implementation on PowerVR SGX544 GPUs.
2017-07-17 09:19:02 -07:00
John Firebaugh
d7bdc7a60d [core] Rework attribute binding (again)
These changes are necessary for programs whose set of active attributes is not fixed at compile time by a template parameter pack, but rather varies based on the generated shader text at runtime. In such cases, the attribute location of a given named attribute may vary between instances of the same Program.

Previously, attribute bindings were implicitly associated with a location based on template parameter order, and -1 was used to indicate an inactive attribute. This left us unable to disable the appropriate attribute when it went from active to inactive. Now, the state tracker for bindings explicitly associates locations and state, and an empty optional is used to indicate an inactive attribute.

In addition, a gl::VertexArray class is now exposed, allowing more flexibility in the relationship between Programs, Segments, and attribute bindings. In this commit, that relationship does not change, but the subsequent commit adjusts it to match gl-js, reduce rebinds, and work around buggy VAO implementations.

VertexArray uses a pimpl idiom in order to support implementations that lack the VAO extension. In that case, all VertexArrays share global binding state, reflecting the platform reality in the absence of VAOs, while still providing a uniform API.
2017-07-17 09:19:02 -07:00
John Firebaugh
fbd4376899 [core] Inline getActiveAttributes details 2017-07-17 09:19:02 -07:00
John Firebaugh
f9fe0de806 [core] Include what you use 2017-07-17 09:19:02 -07:00
Lauren Budorick
eed89fcf9d [core] Bind only active attributes in order to avoid exceeding attribute limits (#9373)
Introducing two new attributes to enable property functions for line-width (#9250) pushed the attribute count over GL_MAX_VERTEX_ATTRIBS on some devices. Now we selectively bind only attributes that are used, making it unlikely to surpass GL_MAX_VERTEX_ATTRIBS.
2017-07-17 09:19:02 -07:00
Konstantin Käfer
e8272ebdbb [core] rename a_gap_width => a_gapwidth, u_gap_width => u_gapwidth to reflect naming in the shader
not sure how this ever worked
2017-07-17 09:19:02 -07:00
John Firebaugh
874244a656 [core] Eliminate constant attribute bindings
Rather than binding constant attributes that will never be used, just disable the attribute.
2017-07-17 09:19:02 -07:00
John Firebaugh
ccb5255537 [core] Don't use "current" icon/text-size when binding
The current value is not passed to `SymbolSizeBinder::uniformValues`, so we shouldn't check `currentValue.isConstant()` in `SymbolSizeBinder::attributeBindings`. If it were true, then we might end up using attribute bindings that are appropriate only for a constant property, but uniform bindings that are appropriate only for a source or composite function.

Instead, just wait for a new bucket to be generated. This will happen automatically, since icon/text-size are layout properties.
2017-07-17 09:19:02 -07:00
Jason Wray
76caec25c7 [ios] Update changelog; kick-off 3.6.1 2017-07-13 01:52:55 -04:00
Konstantin Käfer
f16a4e5da6 [all] make default_styles header-only 2017-07-13 01:39:00 -04:00
Konstantin Käfer
629922f557 [build] enable -fvisibility=hidden for iOS 2017-07-13 01:38:29 -04:00
Jason Wray
3fce13349c [darwin] Include polylabel via cmake 2017-07-13 01:36:36 -04:00
Minh Nguyễn
c966c0e12f [ios] Update SMCalloutView to fix iOS 10 build warnings
Reapplied 76a2a2db28, which was partially rolled back in f6e79d7073.
2017-07-13 01:35:15 -04:00
Łukasz Paczos
eb7926d205 [android] - invible marker views performance fix #9419 (#9420) 2017-07-05 17:32:23 +02:00
Tobrun
d2d8a575be [android] - update changelog for 5.1.0 release (#9405) 2017-07-01 17:38:44 +02:00
Tobrun
b9a4addac6 [android] - bump Mapbox Android Services to latest for 5.1.0 final release (#9402) 2017-06-30 16:47:31 +02:00
Tobrun
95735c06f6 Downgrade location provider dependency (#9394)
* [android] - downgrade LOST to Mapbox SDK 5.0.2 version.

* bump LOST back to Mapbox Android SDK version 4.x
2017-06-30 11:21:39 +02:00
Minh Nguyễn
3821ce27de macos-v0.5.0 2017-06-29 17:46:40 -07:00
Minh Nguyễn
47ca78b705 [macos] Updated screenshot
The new screenshot features 3D extruded buildings, vertical CJK, and right-to-left Arabic, all via runtime styling.
2017-06-29 17:45:41 -07:00
Fabian Guerra
dafba03bbc ios] Update pods spec for iOS v3.6.0 2017-06-29 14:52:32 -04:00
Minh Nguyễn
92157762cf [macos] Fixed cursor shifting after drag gesture
When redisplaying the mouse cursor after a modified drag gesture, incorporate the conversion from view coordinates to window coordinates. Previously, this code performed the conversion but threw away the results.

Fixes #8670.
2017-06-29 10:10:31 -07:00
Minh Nguyễn
ae7dc8ce48 [macos] Reorganized changelog 2017-06-29 10:10:31 -07:00
Jordan Kiley
8abe210964 [ios] moved changes to darwin (#9387) 2017-06-29 03:33:20 -07:00
Tobrun
200d184738 OnCameraIdle hook into quickzoom gesture (#9339)
* [android] - OnCameraIdle hook into quickzoom gesture

* double tap fix

* show MyLocationView bearing for GPS when Compass is not available, only show error about missing compass once, fix test activity.

* fix accessor lint warning
2017-06-29 09:29:23 +02:00
John Firebaugh
34453eb4e2 [core] Fix iterator invalidation in erase_if
vector::erase invalidates iterators. It's not safe for erase_if to cache the end iterator nor increment, then erase.
2017-06-28 17:56:51 -07:00
Jason Wray
6aecc66fc8 [ios] Minimize tilt gesture delay 2017-06-28 16:21:41 -04:00
Jason Wray
361dda25a6 [ios, macos] Fix size and color of default marker image 2017-06-26 14:56:21 -04:00
Minh Nguyễn
9b0b74dba6 [ios] Fixed infinite loop zooming in past z23
At zoom levels where the minimum 1 meter or 4 feet would be wider than the scale bar’s maximum width, the local variable holding the preferred row was left undefined. A loop that later iterated based on this row would effectively iterate infinitely until memory pressure forces the system to quit the application.
2017-06-24 13:14:05 -07:00
Fabian Guerra
3e40cab22d [ios] Update pods spec for iOS v3.6.0-rc.1 2017-06-22 16:39:04 -04:00
Minh Nguyễn
50922433cd [ios, macos] Updated changelogs
Also corrected the version number in the macOS changelog.
2017-06-22 12:28:35 -07:00
Minh Nguyễn
5b4f8fd822 [ios] Updated German localization 2017-06-22 12:24:42 -07:00
Minh Nguyễn
9436eca1d4 [ios] Added Hungarian localization from Transifex 2017-06-22 12:24:42 -07:00
Minh Nguyễn
eedd0553b4 [ios] Allow delegate to keep wandering pinch from panning map
MGLMapView consults MGLMapViewDelegate about whether to zoom the map in response to a pinch gesture, but it should also account for the delegate’s response when panning the map due to the pinch’s center point wandering.

Fixes #9168.
2017-06-22 12:17:17 -07:00
Fabian Guerra Soto
a1c5b32da6 Boxing ObjC structs (#9343)
* [ios, macos] Make structs boxable

* [ios, macos] Update changelogs.
2017-06-22 14:36:21 -04:00
Minh Nguyễn
b7ec96d352 [ios, macos] Corrected MGLSource subclassing documentation 2017-06-22 09:58:47 -07:00
Minh Nguyễn
2a5dc2d55b [ios, macos] Rewrote MGLStyle class documentation
The documentation comment now provides a high-level overview of the runtime styling API and its components, as well as the main workflow for using a style.
2017-06-22 09:58:47 -07:00
Romain Quidet
d3730241bb 7910: cancel tracking if ongoing animation is stopped manually (#7916)
* 7910: cancel tracking if ongoing animation is stopped manually

* 7910 updating change log

* [ios] Fix map camera animation when a significant change occurs

* [ios] Update cancel tracking documentation.
2017-06-22 06:50:09 -07:00
John Firebaugh
72e71658bc [build] Unbreak Travis 2017-06-21 14:19:31 -07:00
Tobrun
d47eab05f6 [android] - restore LatLngBounds conversion, add regression test (#9324) 2017-06-21 15:43:02 +02:00
Tobrun
651e70aec7 [android] - update CHANGELOG for release 5.1.0-beta.5 (#9316) 2017-06-21 09:14:11 +02:00
Antonio Zugaldia
584bfb7733 [android] update mapboxServicesVersion to 2.1.2 (#9311) 2017-06-20 16:21:31 -04:00
Tobrun
a9f52e24e6 Revisit Javadoc for 5.1.0 (#9266)
* [android] - revisit public API javadoc

* [android] fix javadoc minor mistakes and typos

* grammar tweak

* add missing public javadoc
2017-06-20 09:48:24 -04:00
Antonio Zugaldia
899d2b0de9 [android] Update to LOST 3.0.1 (#9302) 2017-06-20 08:59:15 -04:00