Commit Graph

8992 Commits

Author SHA1 Message Date
Tobrun
c97a1047df 6453 restore tilt after orientation (#6491)
* [android] - correct tilt value when restoring activity or creating from xml

* correct values requesting camera position adhoc

* updated logic change in unit tests
2016-09-29 11:41:08 +02:00
Konstantin Käfer
1777b8757a [core] don't iterate over references to uint32_t 2016-09-28 19:03:03 +02:00
Konstantin Käfer
068732fc9e [core] don't iterate too much over program objects scheduled for deletion 2016-09-28 19:03:03 +02:00
Jesse Bounds
9a41b8abaf [ios, macos] Guard against nil bundle identifier during tests 2016-09-28 09:44:19 -07:00
Minh Nguyễn
b1518944a7 [ios, macos] Rewrote CI scripts
Broke up the iOS and macOS Bitrise scripts into several steps each for more granular progress and failure reporting and to take advantage of better error reporting in the built-in Bitrise steps. Added a step to deploy Xcode test results and (in the event of a failure) raw xcodebuild output to Bitrise.io, with a handy link from the Bitrise UI.
2016-09-28 09:44:19 -07:00
Minh Nguyễn
255325b44b [macos] Restored unit tests on CI
Restored the make rule for running macOS SDK unit tests. Invoke that rule on Bitrise.

Fixes #5991.
2016-09-28 09:44:19 -07:00
Bruno de Oliveira Abinader
55c4bb98d7 [Qt] Connect to finished() and error() signals from QNetworkReply
Qt macOS network manage implementation differs from linux in a sense
that some requests do not generate a finished() signal, but a error()
instead - that is not caught up by the network access manager. This
made QMapboxGL.styleURL utest hang for macOS.
2016-09-28 18:50:08 +03:00
Thiago Marcos P. Santos
4ef66f36d4 [core] Use geojson as a header only library 2016-09-28 16:35:50 +02:00
Konstantin Käfer
e0ffde7bc2 [build] use git ls-files so we only include tracked files 2016-09-28 16:34:22 +02:00
Konstantin Käfer
3f3fc7b772 [test] add .test.cpp suffix to test case files 2016-09-28 16:34:22 +02:00
Konstantin Käfer
a8b007daa0 [core] remove unused GL_TRACK functions 2016-09-28 16:34:07 +02:00
John Firebaugh
aa0fc68fea [core] Mark tracked state as dirty when the tracked object is destroyed 2016-09-28 10:54:48 +02:00
Tobrun
3835ed556b 6402 update offline metadata android (#6456)
* [android] - update offline metadata jni integration

* extract offline utils for reuse

* add test activity for update metadata

* fix requested signature changes
2016-09-28 07:48:01 +02:00
Jesse Bounds
73baa52710 [ios] Update changelog for annotation view fix 2016-09-27 15:24:19 -07:00
Jesse Bounds
c6abc0ea89 [ios] Always show annotation view even when view reuse is not used
This fixes an issue where the map view would drop annotation views
if the developer did not make full use of the reuse queue. The
fixes are:

- Guard against enqueuing a view for reuse if it does not have
a `viewReuseIdentifier`. Previously, if the app developer created a new
annotation view with no reuse id each time
`[MGLMapViewDelegate mapView:viewForAnnotation:]` was called and then
the view was scrolled offscreen, we  attempted to add the view to the
reuse queue (for no good reason) and  did not update the views center
ever again.  This change avoids the reuse queue and just updates the
center always.

- Add any annotation view that should be displayed but is not in the
annotation container view to the annotation container view. Previously,
if the app developer created a new annotation view with a reuse id
each time `[MGLMapViewDelegate mapView:viewForAnnotation:]` was called,
and then if the annotation was scrolled off and then on screen again,
we did not add the new view to the container view because it was
not happening in the normal `addAnnotation` cycle. This adds add
logic to catch that case and add annotation views created in this
way to the view.
2016-09-27 15:24:19 -07:00
Justin R. Miller
a6aa786f35 [ios, macos] flesh out iOS runtime styling docs (#6466)
- fixes #5959: MGLBaseStyleLayer docs
- fixes #5960: MGLSource & subclasses docs
- fixes #6467: concrete layer subclass docs
- move Core Graphics include
- slight code & template cleanups
- add ./documentation to git ignores
2016-09-27 13:53:32 -07:00
Konstantin Käfer
44c7e9d05e [core] merge gl::ObjectStore into gl::Context 2016-09-27 11:03:29 -07:00
Konstantin Käfer
ce42d22984 [core] rename gl::Config to gl::Context 2016-09-27 11:03:29 -07:00
Konstantin Käfer
21386b3146 [core] move GL value accessors to gl::value namespace 2016-09-27 11:03:29 -07:00
Thiago Marcos P. Santos
e881795ed1 [Qt] Header cleanup (#6477)
Make some headers private, so we only commit with the QML API.
2016-09-27 16:18:04 +03:00
Tobrun
0c0671bff0 [android] - disable general purpose logging during transformation change (#6452) 2016-09-27 15:08:49 +02:00
Konstantin Käfer
c88ce2d51e [core] add ability to render to offscreen textures 2016-09-27 10:42:10 +02:00
Konstantin Käfer
68ec9d3fd5 [core] Make sure textures have a scaling filter set after upload 2016-09-27 10:42:10 +02:00
Konstantin Käfer
63e53de157 [core] standardize on uint16_t for texture sizes 2016-09-27 10:42:10 +02:00
Konstantin Käfer
512037cfdc [core] Allow retrieving texture ID and size 2016-09-27 10:42:10 +02:00
Konstantin Käfer
0c3abb2129 [test] Show error message when expected file does not exist 2016-09-27 10:42:10 +02:00
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