Commit Graph

1574 Commits

Author SHA1 Message Date
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
John Firebaugh
c4e4cc5081 [core] Adjust layer source properties to better reflect reality
* Layer source ID is immutable; must be provided to the constructor
* Layer source layer is mutable
* Layers with GeoJSON sources do not have a source layer

While here, make Layer::copy impl-private.
2016-06-24 09:39:15 -07:00
John Firebaugh
089c4e413f [core] Split up and clean up conversion.hpp 2016-06-24 09:39:15 -07:00
John Firebaugh
3459b83736 [core, node] Node bindings for setFilter 2016-06-21 18:24:49 -07:00
John Firebaugh
a18d6dda5d [core] Rewrite style parsing logic for reuse in node bindings 2016-06-21 15:38:13 -07:00
Bruno de Oliveira Abinader
97dffeb03d [core] s/Wireframe/Overdraw/g 2016-06-20 13:24:20 +03:00
Bruno de Oliveira Abinader
7e549b9020 [core] Added BlendColor GL config value 2016-06-20 13:24:20 +03:00
Bruno de Oliveira Abinader
9038d66af6 [core] Added missing BlendFunc operator 2016-06-20 13:24:20 +03:00
Bruno de Oliveira Abinader
2f8fce7bdb [core] Cleaned up TransitionOptions 2016-06-20 13:01:59 +03:00
Bruno de Oliveira Abinader
5792091e9d [core] Added mbgl::util::DEFAULT_TRANSITION_EASE 2016-06-20 13:01:59 +03:00
Bruno de Oliveira Abinader
22aa22c99c [core] UnitBezier ctor is now constexpr 2016-06-20 13:01:59 +03:00
Bruno de Oliveira Abinader
c20c1d6a6b [core] Avoid redundant 'inline' usage 2016-06-18 23:46:50 +03:00
Bruno de Oliveira Abinader
41497e9c41 [core] Cleaned up enum classes
- Replaced static_cast with C++ casts.
- Replaced inline with constexpr.
2016-06-18 20:23:00 +03:00
John Firebaugh
2921127bdb [core] Avoid unnecessary work when a symbol annotation is updated
In particular, if only the geometry changes, don't cascade and recalculate the style.
2016-06-17 11:38:04 -07:00
John Firebaugh
5254127e8c [core] Runtime source API: Map methods 2016-06-16 13:27:15 -07:00
John Firebaugh
900568cfb0 [core] Runtime source API: private impls 2016-06-16 13:27:15 -07:00
John Firebaugh
19158d9f01 [core, node] Implement setPaintProperty for color properties (#5380) 2016-06-16 13:25:06 -07:00
John Firebaugh
a0b2982119 [core] Prepare Filter and FilterEvaluator for extraction (#5366) 2016-06-15 14:55:45 -07:00
Young Hahn
199ea2a82a Support for icon-text-fit, icon-text-fit-padding (#5334)
* Add support for icon-text-fit

* Port unit tests for getIconQuads() from js => cpp

* Add support for padding in all 4 directions.

* Update all hashes post-merge
2016-06-15 17:13:31 -04:00
John Firebaugh
a020e535ca [core] Add a few conveniences to Color 2016-06-15 13:22:00 -07:00
Bruno de Oliveira Abinader
121b4ca9ca [core] Added mbgl::util::convert helper function
Converts a given std::array into another using a different (convertible)
type.
2016-06-15 18:41:56 +03:00
Young Hahn
24b66bc8cd Color class (#5361)
* Color class

* Switch to list initialization
2016-06-15 11:38:22 -04:00
Bruno de Oliveira Abinader
6b5caf4b2c [tidy/linux] modernize-use-nullptr 2016-06-14 22:14:11 +03:00
John Firebaugh
6eab895bc0 [core] Use Range<uint8_t> instead of full Tileset where possible 2016-06-14 11:25:45 -07:00
John Firebaugh
1529116ef6 [core] Introduce Map::getLayer 2016-06-13 17:22:05 -07:00
John Firebaugh
039b05ebb4 [core] Extract code templates to individual .ejs files 2016-06-13 17:22:05 -07:00
John Firebaugh
282e626ac1 [core] Make enum ↔ string conversion more generic-friendly
Rewrite enum.hpp in such a way that parseConstant can be defined generically for all enumerated types.

While there, properly validated enumerated property values.
2016-06-13 17:22:05 -07:00
Bruno de Oliveira Abinader
4d75001e9a [tidy] Check modernize-use-override
Ref: http://clang.llvm.org/extra/clang-tidy/checks/modernize-use-override.html
2016-06-13 23:32:06 +03:00
Bruno de Oliveira Abinader
4161d197fd [tidy] Check modernize-pass-by-value
Ref: http://clang.llvm.org/extra/clang-tidy/checks/modernize-pass-by-value.html
2016-06-13 23:32:05 +03:00
Bruno de Oliveira Abinader
9142c447e8 [tidy] Check llvm-namespace-comment
Ref: http://clang.llvm.org/extra/clang-tidy/checks/llvm-namespace-comment.html
2016-06-13 23:32:05 +03:00
Konstantin Käfer
2bdecdf9f9 [core] fix pedantic warning messages 2016-06-13 11:16:19 +02:00
Bruno de Oliveira Abinader
9b6c2e6940 [test] Added Projection tests 2016-06-13 10:11:20 +03:00
Young Hahn
ecd4aa1439 text-pitch-alignment (#5288)
* First pass at port of https://github.com/mapbox/mapbox-gl-js/pull/2668

* RotationAlignmentType => AlignmentType

* Handle undefined default value for text-pitch-alignment and implement inheritance for this value from text-rotation-alignment

* Update dependencies

* Move handling fo undefined default value out of camelize functions
2016-06-10 23:05:15 -04:00
Konstantin Käfer
91895b9aec [core] only perform optional requests if the FileSource supports it 2016-06-10 12:42:14 +02:00