Commit Graph

1607 Commits

Author SHA1 Message Date
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
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
Mike Morris
6fe621bbef [core] check GL errors in loop
As recommended in https://www.opengl.org/wiki/GLAPI/glGetError

char* -> std::string
2016-09-21 10:33:40 -04:00
Molly Lloyd
598f7c6ad5 [core] allow offline region metadata to be updated (#6338) 2016-09-20 17:43:00 +02:00
Lucas Wojciechowski
37cb2bd756 [core] Convert uses of std::set to std::unordered_set (#6325)
* src/mbgl/annotation/annotation_manager.hpp

* src/mbgl/algorithm/update_renderables.hpp

* src/mbgl/geometry/glyph_atlas.hpp

* src/mbgl/renderer/painter.cpp and src/mbgl/renderer/render_item.hpp

* src/mbgl/renderer/symbol_bucket.hpp and src/mbgl/text/glyph_store.hpp

* src/mbgl/sprite/sprite_atlas.hpp

* include/mbgl/storage/network_status.hpp

* src/mbgl/text/collision_tile.cpp

* src/mbgl/style/update_batch.hpp

* platform/default/mbgl/storage/offline_download.hpp

* Add GlyphRangeSet typedef

* Fix whitespace & unused imports
2016-09-19 17:26:25 -07:00
John Firebaugh
41bbd4e4f7 [core] Use an actor model for tile worker concurrency 2016-09-16 12:01:06 -07:00
Tobrun
9ef65440b6 [core] [android] - public api configurable base endpoint (#6309)
add runloop to test
2016-09-15 22:01:09 -07:00
Ivo van Dongen
290bd07a92 [core] OnlineFileSource - rate limit 2016-09-13 14:21:37 +02:00
Bruno de Oliveira Abinader
beb67fb7b2 [core] Separate transition options accessors from class API
Now the style class transition options have its own getter/setter, which
persists for each style until a new style is set.
2016-09-13 12:38:59 +03:00
John Firebaugh
29f4204d1c [core] Don't use std::move on forwarding references 2016-09-08 16:36:47 -07:00
John Firebaugh
030234c7a6 [core] Rework invokeWithCallback so that the callback is last 2016-09-08 16:36:47 -07:00
John Firebaugh
e4995e8d3a [core] Extract WorkTaskImpl from run_loop.hpp 2016-09-08 16:36:47 -07:00
John Firebaugh
8e2170c885 [core] Batch source updates 2016-09-06 14:29:22 -07:00
John Firebaugh
b4864ca9d5 [core] Trigger Source::Impl::reload when a filter or layout property is modified 2016-09-06 14:29:22 -07:00
John Firebaugh
fe2a26225f [core, ios, android, qt] Observe style layer mutations rather than requiring SDKs to use Map::update
This paves the way for updates to filter and layout properties to trigger a source reload, without each SDK having to participate in the implementation.
2016-09-06 14:29:22 -07:00
John Firebaugh
3a48c60813 [core] Add missing classed paint property getter 2016-09-06 12:52:14 -07:00
Dane Springmeyer
be08c79b6f update filter doc usage example (#6202) 2016-08-31 15:33:43 -07:00
John Firebaugh
d2abb1b6d5 [core] Change GeoJSONSource::getURL() to return an optional<std::string>
GeoJSON sources may have inline GeoJSON rather than a URL; returning an optional type ensures that consumers handle this case.
2016-08-26 10:30:55 -07:00
Thiago Marcos P. Santos
1d7a5b0fe0 [tests] Add unit test for style loading failures 2016-08-24 20:02:39 +03:00
John Firebaugh
63cce78cf1 [core] Add static getters for property default values (#6124) 2016-08-23 12:49:47 -07:00
John Firebaugh
86cccc4d24 [core] Don't allow style mutations to be overwritten by revalidation
* Once we get a fresh style, stop revalidating.
* If the style is mutated, stop revalidating and preserve the existing mutations.
2016-08-23 09:55:32 -07:00
Ivo van Dongen
df3b44531e [core] #6071 - extract GeoJSONOptions conversion from GeoJSONSource conversion
* [core] geojson_options - retain original error message

* [core] tests - initial style conversion stub methods

* [core] geojsonoptions conversion - initial unit tests

* [core] tests - fix forward reference issue

* [core] geojsonoptions conversion - unit tests

* [core] geojsonoptions conversion - renamed Holder to Value
2016-08-23 14:57:55 +02:00
Konstantin Käfer
e6bcbdd5d3 [core] set correct depth values for CustomLayer so compositing works 2016-08-22 18:32:12 +02:00
Thiago Marcos P. Santos
547af7475e [Qt] Implement a Qt headless renderer
Using legacy QGLWidget because we support Qt4.
2016-08-22 16:52:02 +03:00
Konstantin Käfer
0df60c4651 [core] add ability show visualize the depth buffer to the GLFW and macOS app 2016-08-19 17:41:55 +02:00
Konstantin Käfer
cb33c861b4 [core] parse more Style JSON properties
We're now parsing "name", "center", "zoom", "bearing", and "pitch" from the stylesheet.
2016-08-19 17:34:10 +02:00
Ivo van Dongen
26bdcadf7e [core] added template instances for Source.is<>(). 2016-08-18 11:48:41 +02:00
Konstantin Käfer
18176605f6 [core] support "scheme": "tms" in TileJSON files 2016-08-16 11:04:30 +02:00
Minh Nguyễn
e147887e35 [core, android, ios, macos] Replaced getPointAnnotationsInBounds() w/ queryPointAnnotations() (#5165)
queryPointAnnotations() accepts a screen rectangle instead of a geographic bounding box, so marker hit testing works at the edges of a rotated, tilted map view.

Fixes #5151.
2016-08-12 15:45:18 -07:00
Bruno de Oliveira Abinader
3ae506ee13 [core] Use NDEBUG instead of DEBUG
CMake defines 'NDEBUG' by default for release build, so we can check if
that's not defined instead of using 'DEBUG' for debug build.
2016-08-05 11:42:22 +02:00
Vladimir Agafonkin
9ecc0d9597 GeoJSON point clustering (#5724)
* add supercluster dependency
* prepare GeoJSONTile for Supercluster
* prepare GeoJSONSource for accepting options
* try removing mbgl::GeoJSON
* fix setGeoJSON types
* add GeoJSONSource getURL
* add geojson to include path
* add Supercluster index in GeoJSONSource
* fix GeoJSONSource getZoomRange
* bring back mbgl::GeoJSON header
* fix tidy warnings hopefully
* try test-suite with enabled cluster test
* fix formatting in clustering-related files
2016-07-27 20:18:41 +03:00
Bruno de Oliveira Abinader
0e60238596 [glfw] Added 'addRandomLineAnnotations' 2016-07-23 14:10:33 +03:00
John Firebaugh
da35ef9f49 [core] Add support for $id key to filters
https://github.com/mapbox/mapbox-gl-style-spec/issues/391
2016-07-18 12:37:36 -07:00
Thiago Marcos P. Santos
4a1a7937ae [core] Move set/get thread names to platform::
Android needs its own implementation.
2016-07-16 10:38:42 +03:00
Thiago Marcos P. Santos
389c7615eb [core] Revert workaround for std::atomic on ARMv5
Got fix on r12.

https://github.com/android-ndk/ndk/issues/31
2016-07-13 17:56:51 +03:00
Bruno de Oliveira Abinader
c670b08ecb [core] Use PropertyValue<T> for Annotation line/fill 2016-07-13 11:57:09 +03:00
Thiago Marcos P. Santos
86cebd4cca [core] Report conversion errors using std::string
char* increases the risk of pointing to a invalid reference. Qt had
to use a static variable as retainer to workaround.
2016-07-12 16:04:20 +03:00
Bruno de Oliveira Abinader
0878e09def [core] Added missing pragmas to style conversion headers 2016-07-11 17:01:31 +03:00
Jesse Bounds
626cf54be2 Merge branch 'boundsj-merge-3.3.0.rc.1' 2016-07-08 09:30:22 -07:00
Konstantin Käfer
4f26c8122a [core] track texture state to avoid redundand binds 2016-07-08 13:11:25 +02:00
Jesse Bounds
23caa9f7aa Merge branch 'release-ios-v3.3.0' into master 2016-07-07 15:40:07 -07:00
John Firebaugh
c09fb0f519 [core] Add support for circle-pitch-scale 2016-07-07 14:32:27 -07:00
Konstantin Käfer
2e10c0a866 [core] don't force GL state to be set when calling .reset()
We are using Value::reset() to change a piece of GL state to its default value. However, the current implementation always executes the GL call, even if our state tracking system knows that it's already at that value. The new implementation of Value::reset() now respects that, resulting in a lot fewer GL calls.
2016-07-07 16:29:34 +02:00
Young Hahn
71a3b1d0db [core] geometry@0.8.0 / geojsonvt@6.0.0 (#5514)
* [core] geometry.hpp 0.8.0

* geojsonvt @ 6.0.0

* Update platform deps, build scripts

* Perf optimizations/cleanup

* Rebase in geometry@080

* D.R.Y. etc

* Ensure fill annotation geometries have closed rings.

* Optimizations

* Update to geojsonvt @ 6.1.0 for clean handoff between geojson parsing and geojsonvt

* Apply close multi/poly geoms for line annotations as well
2016-07-06 17:29:34 -04:00
Fredrik Karlsson
546469459f [ios] #3979 compress telemetry events (#5490)
* [ios] #3979 wip gzip telemetry events

* [ios] expose compression from core instead of adding a new dependency

* [ios] #3979 Exposed decompress from mbgl and added a test case

* [ios] #3979 cleanup

* [ios] #3979 cleaned up test case

* [ios] #3979 cleanup

* [ios] #3979 gzip -> deflate
2016-07-05 22:46:04 +02:00
Konstantin Käfer
77e7846756 [core] code style cleanups
- puts function definitions in a namespace ... {} rather than using namespace ...;
- remove trailing whitespace
- add trailing newline
- protect SQL statements from being formatted by clang-format
2016-07-01 12:38:33 +02:00
Bruno de Oliveira Abinader
ad081e698a [core] Added CharArrayBuffer
Implements a custom std::streambuf to avoid creating temporary
std::string objects and thus optimizing image decode.

Suggested by @artemp in
https://github.com/mapbox/mapbox-gl-native/pull/5417#issuecomment-227700063.
2016-06-30 17:56:23 +03:00
Bruno de Oliveira Abinader
1d46e83e30 [core] Use the right types for zoom scale logic
32 bit integers should be enough for zoom scale logic. In shape
annotation logic, 'maxAmountOfTileFeatures' requires 64 bits because we
are multiplying the zoom scale with the extent, which might give a
number higher than std::numeric_limits<uint32_t>::max().
2016-06-28 12:00:53 +03:00
John Firebaugh
021d4199cb [core, node] Implement bindings for addSource 2016-06-24 09:39:51 -07:00
John Firebaugh
16c435b151 [core, node] Implement bindings for addLayer 2016-06-24 09:39:51 -07:00