John Firebaugh
8baa804a44
[core] Fix swapped lat/lon in geo.cpp
2015-10-20 13:54:19 -07:00
John Firebaugh
2066295e35
Install RapidJSON from mason
2015-10-01 11:40:47 -07:00
Konstantin Käfer
a84cf62424
[core] include api.mapbox.com in canonicalization
...
and move the canonicalization to mapbox.cpp since it's not specific to the SQLiteCache
2015-09-28 15:06:41 +02:00
John Firebaugh
15a66b8989
Consolidate test-suite rendering harnesses ( #2236 )
2015-09-04 10:52:14 -07:00
Ansis Brammanis
d703e58c79
add Point <--> LatLng conversion tests
2015-08-27 14:00:43 -04:00
Lucas Wojciechowski
648b587959
Fixed missing labels and icons
2015-08-24 14:22:02 -07:00
Lucas Wojciechowski
e97662972f
Support v8 sprite, glyph, and style mapbox:// urls
2015-08-21 14:39:26 -07:00
Lucas Wojciechowski
a85fd681fc
Support new glyph URL syntax
2015-08-20 11:59:07 -07:00
jakepruitt
14ba3cfd6a
Adding special case for non-fontstack "glyph" resource URLs
...
- does not prepend /v4/ to api endpoints like /fonts/v1/
- only prepends it to things starting with /fontstack
- solves the problem in #1918
- refs mapbox/mapbox-gl-style-spec#309
2015-07-27 10:16:14 -04:00
Thiago Marcos P. Santos
7d4349e308
Added unit tests for the WorkQueue
2015-07-16 19:38:38 +03:00
Bruno de Oliveira Abinader
0ea8a37cb0
Unify default transition values in MapData
...
Relevant changes:
- Added 'defaultFadeDuration' and 'defaultTransitionDelay' to MapData;
- Painter & StyleParser now receives a reference to MapData;
- As previously seen on the code: 300ms is the default fade duration
and 0ms is the default transition duration;
- We no longer pass the current time point to Style, since it now uses
MapData.animationTime, which gets updated in MapContext::update().
- Updated StyleParser check to use a mock MapData;
2015-07-14 16:58:32 +03:00
Konstantin Käfer
675ddddee7
Make pixelRatio constant across a Map object lifetime
...
also moves framebuffer size out of TransformState into its own object
2015-07-08 10:40:05 +02:00
Thiago Marcos P. Santos
ec1b4c43fd
Do not force uv_loop_t as the first parameter for a threaded object ctor
2015-07-06 16:01:59 +03:00
John Firebaugh
fc64e97bce
Simplify RunLoop
...
Instead of transforming between return value and callback, pass
the wrapped callback on to the invoked function as the last argument.
This eliminates the need for multiple invokeWithArgument overloads
and permits invoked functions to be asynchronous.
2015-07-01 16:12:12 -07:00
John Firebaugh
3670a78569
Convert Worker tests to Thread tests
2015-07-01 15:21:10 -07:00
John Firebaugh
5fadda53e5
Move WorkerTask functionality into RunLoop core
...
As a byproduct, this makes FileCache get requests properly
cancelable.
2015-07-01 15:21:10 -07:00
Konstantin Käfer
45d0cbb4c7
add assert_always() macro for release build assertions
2015-06-29 11:32:19 +02:00
John Firebaugh
07a6d2ef64
Move Transform from MapData to Map
...
Pass current state to MapContext where needed. Remove mutex from
Transform.
2015-06-26 10:32:07 -07:00
Konstantin Käfer
84e2ea886d
drive map rendering from main thread
2015-06-26 10:32:06 -07:00
Thiago Marcos P. Santos
57ddb386d8
Add unit tests for ThreadContext
2015-06-25 16:26:21 +03:00
Thiago Marcos P. Santos
a8b6b67dfe
Introduce the ThreadContext
...
mbgl::Thread will keep a ThreadContext for each running instance
in a thread_local so we don't need to lookup a man in the Environment
every time we need some info about the current thread.
This patch is moving the ::currentlyOn check used on Debug build from
the Environment class to the ThreadContext.
2015-06-25 16:26:21 +03:00
Konstantin Käfer
f85889dc75
allow constructing LatLng/LatLngBounds objects from TileIDs
2015-06-08 16:13:37 -04:00
Thiago Marcos P. Santos
b09df7acb5
Cleanup the MapContext before the util::Thread destructor
...
The util::Thread will call the stop() method of the MapContext's RunLoop
which will wait for the pending tasks tied to it to complete.
If we have a request that is timeout'ing, this could mean a really long
wait. Instead, we now send a cleanup message that will reset all the
attributes first (canceling the pending requests) so the the MapContext
gets destructed quickly.
2015-06-04 14:44:34 +03:00
Ansis Brammanis
9c03b396c0
Merge remote-tracking branch 'origin/master' into HEAD
...
Conflicts:
src/mbgl/renderer/painter_fill.cpp
2015-06-03 19:20:41 -04:00
John Firebaugh
ec06bb7e3c
Merge ResourceLoader into Style and move atlas ownership
2015-06-01 13:22:02 -07:00
Ansis Brammanis
ff6a5ce5bc
Merge remote-tracking branch 'origin/master' into new-labelling
...
Conflicts:
src/mbgl/map/source.cpp
src/mbgl/map/source.hpp
src/mbgl/map/tile_data.cpp
src/mbgl/map/tile_parser.cpp
src/mbgl/map/vector_tile_data.cpp
src/mbgl/renderer/painter.cpp
src/mbgl/renderer/symbol_bucket.cpp
src/mbgl/text/glyph.hpp
src/mbgl/text/glyph_store.cpp
src/mbgl/text/placement.cpp
test/suite
2015-05-28 20:01:15 -04:00
Ansis Brammanis
1e044a175c
Reparse tiles when zoom level > source maxzoom
...
so that layout property functions are applied correctly
and so that label placement is redone
js:
https://github.com/mapbox/mapbox-gl-js/pull/1005
and
440bc02505
2015-05-28 19:17:07 -04:00
Konstantin Käfer
f4707f72e0
Replace mbgl::util::make_unique<> with std::make_unique<>
2015-05-26 17:57:38 +02:00
John Firebaugh
b304b20073
Add Thread tests; get argument transfer working for all cases
2015-05-21 19:57:28 -07:00
Ansis Brammanis
7abd7950c9
Merge branch 'master' into new-labelling
...
Conflicts:
src/mbgl/map/tile_parser.cpp
src/mbgl/map/tile_parser.hpp
src/mbgl/renderer/painter.hpp
src/mbgl/renderer/painter_symbol.cpp
src/mbgl/renderer/symbol_bucket.cpp
src/mbgl/renderer/symbol_bucket.hpp
src/mbgl/text/collision.cpp
src/mbgl/text/collision.hpp
src/mbgl/text/placement.cpp
2015-05-19 11:09:33 -04:00
Thiago Marcos P. Santos
d0b2db3826
Removed unneeded unique_ptr
2015-05-15 16:49:02 +03:00
Thiago Marcos P. Santos
b162fb7c6f
Make the MapContext object run on its own thread on the tests
...
The MapContext can only run on its own thread because it is
registering a EnvironmentScope and it is making many assertions
on Debug mode if its methods are being called on the Map thread.
2015-05-15 13:06:23 +03:00
Konstantin Käfer
40b604448f
add BinPack test
2015-05-12 20:46:56 -07:00
Brad Leege
d4fcb5bb98
Merge pull request #1469 from mapbox/1435-android-gl-crash
...
Android GL Crash
2015-05-11 11:42:21 -05:00
Leith Bade
703e0bc2ee
Ignore deactivate when no valid EGL display. Fixes #1435
...
Initialise NativeMapView's EGL variables before Map
Fix hang
Add check for double pause
Add test for double pause
2015-05-09 12:02:39 +10:00
Konstantin Käfer
24ea920810
ignore Transform changes with NaN parameters
2015-05-08 20:25:47 +02:00
Konstantin Käfer
8ee40a544e
make WorkRequests cancelable
2015-05-08 16:43:18 +02:00
Konstantin Käfer
e20faf7a8d
add worker cancellation test (failing)
2015-05-08 16:43:18 +02:00
Minh Nguyễn
53586f89b3
Added tests for 6292e95f80
2015-05-07 11:05:05 -07:00
John Firebaugh
5b4015ccba
Reference safety for Worker after callbacks
...
Joining a WorkRequest now ensures that either the after callback has
already been executed, or will never be executed.
Fixes #1438
2015-05-06 14:30:02 -07:00
John Firebaugh
a7df0781f8
Don't crash if ResourceLoader::_sprite is null
2015-05-05 13:34:46 -07:00
Jason Wray
4d631623c7
Merge master @ 353e5661de
2015-04-27 17:49:24 -04:00
John Firebaugh
691756d7dd
Move ClipID to clip_id.hpp/cpp
2015-04-09 10:58:11 -07:00
John Firebaugh
d8411f26d2
Tile::ID ⇢ TileID
...
This allows making both Tile and TileID private.
2015-04-06 13:58:56 -07:00
Ansis Brammanis
148294d3ac
Merge branch 'master' into new-labelling
...
Conflicts:
src/mbgl/renderer/symbol_bucket.cpp
src/mbgl/renderer/symbol_bucket.hpp
src/mbgl/text/collision.cpp
src/mbgl/text/glyph_store.cpp
src/mbgl/text/placement.cpp
src/mbgl/text/rotation_range.cpp
2015-04-03 12:04:31 -07:00
Ansis Brammanis
1dcd1cf509
remove tests for deleted rotation_range
2015-04-02 12:52:55 -07:00
Justin R. Miller
78085458f5
add style URL tests
2015-03-31 13:54:51 -07:00
Ansis Brammanis
14e8b4bb09
support wrapped bilinear scaling
...
to get rid of seams in repeating patterns.
https://github.com/mapbox/mapbox-gl-styles/issues/50#issuecomment-86159351
2015-03-26 10:45:23 +01:00
Konstantin Käfer
48c55af5c1
fix sprites for pixel ratios that are not 1 and 2
...
- OpenGL ES 2 doesn't allow NPOT textures with wrap-around
- The Sprite object reported the map's pixelRatio, even though it loaded @2x assets
- Copying icons from the sprite into the atlas now uses bilinear scaling to scale up to the actual size
2015-03-17 12:30:40 +01:00
John Firebaugh
0c985c024b
Revert "Move atlas ownership to Style"
...
This reverts commit bffee07154 .
2015-03-13 13:05:32 -07:00