Commit Graph

8966 Commits

Author SHA1 Message Date
Konstantin Käfer
ffa8a7668b [core] store viewport and FBO binding 2016-09-27 10:42:10 +02:00
Minh Nguyễn
0f5b194617 [core, qt] Generalized source change notification
This same notification can in the future be used for other changes to a source.
2016-09-26 15:43:01 -07:00
Minh Nguyễn
7ff036cd01 [core] Removed map attribution API
Since client code can readily access the individual sources, Map doesn’t need to expose a dedicated API for iterating over them.
2016-09-26 15:42:57 -07:00
John Firebaugh
a9842dbd6b [core] Extract some GlyphRange-related constants 2016-09-26 14:55:49 -07:00
John Firebaugh
8764c20621 [core] Provide rationale for blocking queue while errors resolve 2016-09-26 14:55:49 -07:00
John Firebaugh
570bafcfec [core] Don't allow OfflineDownload to flood the request queue 2016-09-26 14:55:49 -07:00
John Firebaugh
f34ba23d85 [core] Avoid some copies 2016-09-26 14:55:49 -07:00
Minh Nguyễn
f307652548 [core] Source-driven attribution
Implemented observer callbacks so the style knows when the source’s attribution changes and the map knows when the style’s attribution changes. Also implemented a getter for a tile source’s attribution.

Fixes #2723.
2016-09-26 11:37:06 -07:00
Thiago Marcos P. Santos
78af55f30a [core] Fix initialization race on util::mapbox::isMapboxURL (#6455)
This function can be called from different threads and was depending
on a global `std::string protocol` which can do heap allocations.

The first thread to use it would initialized it which is not exactly
safe, so this patch moves it to a `char *` that is just a pointer to
the data segment, so no races.

Valgrind detected it on #6431.

```
==9874== Conditional jump or move depends on uninitialised value(s)
==9874==    at 0x4C307C2: __memcmp_sse4_1 (in /home/travis/build/mapbox/mapbox-gl-native/mason_packages/linux-x86_64/valgrind/latest/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==9874==    by 0x79896E: mbgl::util::mapbox::isMapboxURL(std::string const&) (in /home/travis/build/mapbox/mapbox-gl-native/build/qt-linux-x86_64/Release/mbgl-test)
==9874==    by 0x6DC756: mbgl::style::TileSourceImpl::parseTileJSON(std::string const&, std::string const&, mbgl::SourceType, unsigned short) (in /home/travis/build/mapbox/mapbox-gl-native/build/qt-linux-x86_64/Release/mbgl-test)
==9874==    by 0x6DDA6A: std::_Function_handler<void (mbgl::Response), mbgl::style::TileSourceImpl::loadDescription(mbgl::FileSource&)::{lambda(mbgl::Response)#1}>::_M_invoke(std::_Any_data const&, mbgl::Response&&) (in /home/travis/build/mapbox/mapbox-gl-native/build/qt-linux-x86_64/Release/mbgl-test)
==9874==    by 0x50BE80: std::_Function_handler<void (), mbgl::StubFileSource::StubFileSource()::{lambda()#1}>::_M_invoke(std::_Any_data const&) (in /home/travis/build/mapbox/mapbox-gl-native/build/qt-linux-x86_64/Release/mbgl-test)
==9874==    by 0x70972A5: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.2.1)
==9874==    by 0x70A3621: QTimer::timerEvent(QTimerEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.2.1)
==9874==    by 0x7098053: QObject::event(QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.2.1)
==9874==    by 0x60CCC8B: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.2.1)
==9874==    by 0x60D1E55: QApplication::notify(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.2.1)
==9874==    by 0x706FC2C: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.2.1)
==9874==    by 0x70BC1AC: QTimerInfoList::activateTimers() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.2.1)
==9874==
```
2016-09-26 20:43:06 +03:00
Thiago Marcos P. Santos
968190827b [Qt] Simplify QML example 2016-09-26 17:30:24 +02:00
Bruno de Oliveira Abinader
9eb33d6669 [Qt] Implement QQuickMapboxGL::error{,String} properties 2016-09-26 11:47:34 +02:00
Bruno de Oliveira Abinader
5a12539d34 [Qt] Replace remaining Mapbox-specific features as MapParameter 2016-09-26 11:47:34 +02:00
Bruno de Oliveira Abinader
546109d642 [Qt] Update QML runtime style example 2016-09-26 11:47:34 +02:00
Bruno de Oliveira Abinader
327cb22095 [Qt] Added 'image' MapParameter type 2016-09-26 11:47:34 +02:00
Bruno de Oliveira Abinader
3e42a0de9f [Qt] s/QQuickMapboxGL{Style,StyleProperty}/QQuickMapboxGLMapParameter 2016-09-26 11:47:34 +02:00
Bruno de Oliveira Abinader
478241a90f [Qt] Added QQuickMapboxGLMapParameter 2016-09-26 11:47:34 +02:00
Bruno de Oliveira Abinader
1d1b3f5882 [Qt] Qt conversion toNumber() should accept QVariant::Int 2016-09-26 11:47:34 +02:00
Bruno de Oliveira Abinader
15f7b21c4b [Qt] Fix RVO warning in QMapbox::addAnnotationIcon 2016-09-26 11:47:34 +02:00
Bruno de Oliveira Abinader
39e30c7687 [Qt] QQuickMapboxGLRenderer is now a friend of QQuickMapboxGL
Simplify implementation by removing unsafe accessors from
QQuickMapboxGL meant only to be used by QQuickMapboxGLRenderer.
2016-09-26 11:47:34 +02:00
Bruno de Oliveira Abinader
1ce6e1b4bb [Qt] Move QMapboxGL::MapChange to QMapbox namespace 2016-09-26 11:47:34 +02:00
Bruno de Oliveira Abinader
2ed81bbaae [core] Trigger Update::RecalculateStyle when toggling layer visibility 2016-09-26 11:47:34 +02:00
Bruno de Oliveira Abinader
ae3a02babe [core] Reuse Map::update() 2016-09-26 11:47:34 +02:00
Konstantin Käfer
afb93d4d3a [core] track VAOs and Buffers 2016-09-26 11:14:40 +02:00
Konstantin Käfer
adcb449ff3 [core] make GL value defaults constexpr 2016-09-26 11:14:40 +02:00
David Clark
bf18c33040 [ios, macos] Doc gen handles arrays as required property values (#6448) 2016-09-24 07:39:56 -07:00
Justin R. Miller
b9fafbc2ee clarify circle color as fill (#6447) 2016-09-23 16:16:47 -07:00
Minh Nguyễn
a0e20a6b0f [ios, macos] Allow full hexadecimal colors in layer documentation (#6444)
* [ios, macos] Allow full hex colors in layer docs

CSS hexadecimal RGB syntax can contain all the hexadecimal digits, not just the decimal digits.

* [ios, macos] Parse colors with csscolorparser
2016-09-23 16:04:37 -07:00
Mike Morris
8bc8713e70 [node] fix bad conditional, actually run tests 2016-09-23 12:52:59 -07:00
John Firebaugh
ea80168b42 [tests] Update test-suite 2016-09-23 12:52:59 -07:00
Justin R. Miller
6aa00afd31 [ios, android] add visual tests for fill, line, & numeric filter styling (#6433) 2016-09-23 10:13:11 -07:00
Thiago Marcos P. Santos
a03e6c14b6 [Qt] Add a more compelling runtime style example 2016-09-23 16:43:37 +03:00
Thiago Marcos P. Santos
8f965b2c25 [Qt] Add map pitch support on the example app 2016-09-23 16:43:37 +03:00
Thiago Marcos P. Santos
746bb678c8 [Qt] Add API for adding icon to the style 2016-09-23 16:43:37 +03:00
Ivo van Dongen
c4420d081c [core] ensure network::Reachable is called only once 2016-09-23 10:47:55 +02:00
Ivo van Dongen
4969043066 [core] OnlineFileSource - prevent double scheduling of requests 2016-09-23 10:47:55 +02:00
Ivo van Dongen
71c71e43e6 [android] offline - prevent OOME 2016-09-23 10:47:54 +02:00
Ivo van Dongen
e968f4ed55 [android] timer - prevent overflow in due time 2016-09-23 10:47:54 +02:00
Ivo van Dongen
742d6d8275 [android] set connectivity state pro-actively 2016-09-23 10:47:54 +02:00
Jesse Bounds
3ddb8dfc86 [ios, macos] Add tile template option to raster and vector sources
A new MGLTileSet class that wraps all available core Tileset options can be created and passed into the sources. The sources pass that tileset object along to core.
2016-09-22 17:30:47 -07:00
Young Hahn
08c08f6705 [core] Don't use depth test unless text is pitch-aligned to map (#6404)
* [core, ios, android] Use `auto` value for properties with calculated defaults

* Fix render tests

* [core] Don't use depth test unless text is pitch-aligned to map.

* Bump mapbox-gl-test-suite

* TransformState pitch is already in radians

* Reduce setDepthSublayer calls

* Bump test suite
2016-09-22 19:51:41 -04:00
Thiago Marcos P. Santos
4d3356dc1e [tests] Add tests for Map::[add|remove]Image 2016-09-22 17:43:28 +03:00
Thiago Marcos P. Santos
486bdddb23 [core] Add interface to add sprites to the style
Unlike annotations, they will go away when we change the style.
2016-09-22 17:43:28 +03:00
Tobrun
e8d47269f8 [android] #5737 - disable tracking when a camera change occurs, treat camera change equal to gesture (#6414) 2016-09-22 10:30:24 -04:00
Bruno de Oliveira Abinader
d3eaf98ca1 [glfw, qt] Added missing docs (#6428) 2016-09-22 15:38:03 +03:00
Bruno de Oliveira Abinader
d5679b07be [qt] Initial style from MAPBOX_STYLE_URL if set 2016-09-22 15:23:43 +03:00
Bruno de Oliveira Abinader
e84b4042de [glfw] Initial style from MAPBOX_STYLE_URL if set 2016-09-22 15:23:43 +03:00
Thiago Marcos P. Santos
8efe31b7e3 [Qt] Added missing qt-lib target (#6427)
Build the shared library.

Fixes #6415
2016-09-22 14:50:01 +03:00
Fredrik Karlsson
c00b129e80 [ios, macos] increase timeout to 2 seconds 2016-09-21 16:13:35 -07:00
Minh Nguyễn
2c8e030550 [ios, macos] Short-circuit packs test
If the packs property is already populated, there’s no need to wait for a change notification.
2016-09-21 16:13:35 -07:00
Young Hahn
6a2ce352d1 Better handling for undefined icon|text-rotation-alignment (#6253)
* [core, ios, android] Use `auto` value for properties with calculated defaults

* Fix render tests
2016-09-21 16:07:33 -07:00