Commit Graph

2447 Commits

Author SHA1 Message Date
Bruno de Oliveira Abinader
cfac924606 [core] s/SharedTexture/PooledTexture/ 2016-06-07 22:42:18 +03:00
Bruno de Oliveira Abinader
680fcd09b1 Revert "[core] Use release() instead of get()/reset() in Raster"
No one owned the data after release(), so this wasn't being free'd.
reset() does that, thus this patch causes a huge memory leak.
2016-06-07 16:14:42 +03:00
Bruno de Oliveira Abinader
8b28b6ab6b [core] Renamed OutlineShader's color uniform
Part of https://github.com/mapbox/mapbox-gl-shaders/issues/8.
2016-06-07 15:04:02 +03:00
Konstantin Käfer
aa88ca4757 [core] remove unused code 2016-06-07 13:55:35 +02:00
Bruno de Oliveira Abinader
83d349ee16 [core] Use RAII for TexturePool textures
TexturePool now disposes acquirable ids via SharedTexture, which
guarantees that these are going back to TexturePool once released.
2016-06-07 13:01:58 +03:00
Bruno de Oliveira Abinader
858311d19b [core] Do not expose TexturePool::Impl
Now using the same Pimpl mechanism from mbgl::Map.
2016-06-07 13:01:58 +03:00
Bruno de Oliveira Abinader
5e6f8d4ce5 [core] Use initializer list for Unique* objects 2016-06-07 13:01:58 +03:00
John Firebaugh
47d6903f4e [core] Revert line-round-limit default to 1 (#5260)
Refs #5258, #5234.
2016-06-06 12:45:40 -07:00
Thiago Marcos P. Santos
313d9ce09c [core] log2 polyfill for ARMv5
ARMv5 doesn't have a FPU and apparently the soft code for log2()
is wrong and giving weird results. log() works, so we use a log()
based log2() implementation for ARMv5.
2016-06-06 22:19:25 +03:00
Thiago Marcos P. Santos
7b8698b47a [core] Naive atomic type for ARMv5
std::atomic<bool> is implemented lock free which doesn't work
on ARMv5 and seems like the compiler is generating bogus code.

This workaround is a naive implementation using regular mutexes.
2016-06-06 22:19:25 +03:00
Konstantin Käfer
c3cbe67c01 [core] code style and remove unused code 2016-06-06 17:55:01 +02:00
Bruno de Oliveira Abinader
679a68078c [core] Refresh Texture Pool logic
Take advantage of mbgl::gl::ObjectPool being iterable, and also let
TexturePool update the texture ID value when releasing.
2016-06-03 11:03:16 +03:00
Bruno de Oliveira Abinader
61dad6eae5 [core] Use release() instead of get()/reset() in Raster 2016-06-03 11:03:16 +03:00
Bruno de Oliveira Abinader
650b988874 [core] Perform GL object store cleanup on low memory 2016-06-03 11:03:16 +03:00
John Firebaugh
5928e4e52a [core] Clean up style.cpp 2016-06-02 16:33:56 -07:00
John Firebaugh
e802aedb8c [core, node, android] Remove used "base" parameter from setStyleJSON 2016-06-02 16:33:56 -07:00
John Firebaugh
e1a58565c8 [core] Move RenderData alongside RenderItem 2016-06-02 15:44:39 -07:00
John Firebaugh
c902f9098b [core] Rationalize naming for style-related code 2016-06-02 14:51:39 -07:00
John Firebaugh
18149cbcc2 [core] Add {min,max}Zoom accessors 2016-06-02 14:51:39 -07:00
John Firebaugh
67ee51360c [core] Add Filter accessors 2016-06-02 14:51:39 -07:00
John Firebaugh
cadc617c76 [core] Introduce PropertyValue<T>
PropertyValue<T> represents the three possible types of style property value: undefined, constant, or function.
2016-06-02 14:51:39 -07:00
John Firebaugh
d7e1ecd19e [core] Generalize Map::{add,remove}CustomLayer 2016-06-02 14:51:39 -07:00
John Firebaugh
a43940afb2 [core] Runtime style layer API 2016-06-02 14:51:39 -07:00
John Firebaugh
1fb96d38a0 [tests] Tweak LineAnnotation test so that it reveals a bug; fix the bug 2016-06-02 14:47:35 -07:00
John Firebaugh
3689f52ef3 [core] Constrain annotation API to the supported geometry types 2016-06-01 17:37:01 -07:00
John Firebaugh
0fba70d5a8 [all] Rationalize annotation API 2016-06-01 17:37:01 -07:00
John Firebaugh
8985b1311b [core] Use geometry.hpp types for shape annotations 2016-06-01 17:36:50 -07:00
John Firebaugh
aa1a54c577 [core] Do annotation longitude wrapping together with latitude clamping 2016-06-01 17:36:50 -07:00
Minh Nguyễn
fcacbb87ef [core] Store feature keys in same order as in vector tile
The keys in the vector tile may not be in alphabetical order. Building a vector of keys by looping over std::map<std::string, …> effectively sorts the keys by alphabetical order without sorting the associated values. This change inserts keys in the same order in which they appear in the vector tile.
2016-06-01 12:07:53 -07:00
Bruno de Oliveira Abinader
31753583da [test] Added GL objects tests 2016-06-01 15:28:59 +03:00
Bruno de Oliveira Abinader
1b0683b94c [core] Use unique_resource for GL objects
Source: https://github.com/okdshin/unique_resource

These replace the complexity of manually handling moveable-RAII objects
with a type specific for that purpose.

As suggested in https://github.com/mapbox/mapbox-gl-native/pull/5141#issuecomment-221719872.
2016-06-01 13:53:39 +03:00
Bruno de Oliveira Abinader
2038a21cb5 [core] s/GLObjectStore/ObjectStore/ 2016-06-01 13:53:39 +03:00
Bruno de Oliveira Abinader
59f9a9f93c [core] Update sdf shader code
Ported the following patch:
- [convert mat4 exMatrix to a vec2 extrudeScale](a8d549b7a4)
2016-06-01 11:18:43 +03:00
Bruno de Oliveira Abinader
5e7736ce87 [core] Update icon shader code
Ported the following patch:
- [convert mat4 exMatrix to a vec2 extrudeScale](a8d549b7a4)
2016-06-01 11:18:18 +03:00
Young Hahn
a800d33dd8 [core] Don't earcut more than 500 inner rings 2016-05-31 10:15:18 -07:00
John Firebaugh
a475f1d813 [core] Run fixupPolygons on geojson-vt-cpp polygon output 2016-05-31 10:15:18 -07:00
John Firebaugh
25eec28588 [core] Fix up v1 vector tile geometries with clipper 2016-05-31 10:15:18 -07:00
John Firebaugh
58a9ca8042 [core] Run fix_members.sh on clipper code
https://github.com/mapnik/clipper/blob/r496-mapnik/cpp/fix_members.sh
2016-05-31 10:15:18 -07:00
John Firebaugh
f2427c8066 [core] Re-add clipper from https://github.com/mapnik/clipper/blob/r496-mapnik
Revision ac8d6bf2517f46c05647b5c19cac113fb180ffb4
2016-05-31 10:15:18 -07:00
John Firebaugh
faaafb8387 [core] Replace clipper and libtess with earcut.hpp 2016-05-31 10:15:18 -07:00
Bruno de Oliveira Abinader
cbfc84aff4 [core] Use init list for shader attributes
Shader parent object has been safely created, so it is safe to
initialize the *Shader attributes via initialization list.
2016-05-31 18:15:09 +03:00
Bruno de Oliveira Abinader
62b4dd554a [core] Update circle shader code
Ported the following patches:
 - [convert mat4 exMatrix to a vec2 extrudeScale](a8d549b7a4)
 - [Enabled data-driven styling for circle-radius](4356e41fa6)
 - [Reduce shader boilerplate, refactor "Bucket"](7d3da8f191)
2016-05-31 18:02:40 +03:00
Minh Nguyễn
de905ab64c [ios, osx] Holes in polygons
MGLPolygon (and by extension MGLMultiPolygon) now supports interior rings. The data is preserved in feature querying results, and interior rings are respected when adding polygon overlays to the map.

Fixes #1729.

[ios, osx] Updated changelog
2016-05-27 21:42:38 -07:00
Thiago Marcos P. Santos
9db75f1be3 [core] Fill the initial changeTimes with the reference timestamp of the first frame
On the Javascript implementation the array is automatically filled with
zeroes which is not the same thing as `TimePoint::min()`. Here we need
to get our own "zero" which is the timestamp of the first frame.

Fixes #5109
2016-05-27 23:30:12 +03:00
Konstantin Käfer
1b8d280e3f [core] refactor updateRenderables algorithm 2016-05-27 10:15:06 +02:00
Konstantin Käfer
ebff2234e4 [core] remove unused template definition 2016-05-27 10:15:02 +02:00
Minh Nguyễn
8ace0d37d1 [core] AnnotationTileLayer vends its own name (#5163)
Fixes #5159.
2016-05-26 13:12:23 -07:00
Bruno de Oliveira Abinader
c111250fcc [core] s/operator bool/created()/ in {GL,TexturePool}Holder
Prevents confusing usage of GL holder objects.
2016-05-26 19:36:52 +03:00
Bruno de Oliveira Abinader
b2b2797c2a [core] Move objectStore in {GL,TexturePool}Holder::reset()
Fixes an issue where a moved {GL,TexturePool}Holder would use an invalid
pointer when accessing 'objectStore'.

Fixes #5136.
2016-05-26 19:36:51 +03:00
John Firebaugh
172e645686 [core] Port "combine line-width and line-gap-width in shader"
a9559e911b
fcb9bcebae
2016-05-25 21:37:58 -07:00