Commit Graph

26 Commits

Author SHA1 Message Date
John Firebaugh
2066295e35 Install RapidJSON from mason 2015-10-01 11:40:47 -07:00
John Firebaugh
af392b9434 Rewrite annotation invalidation strategy
First, move style mutation code out of StyleParser and into AnnotationManager,
coalescing it with the mutation code for shape layers.

Second, allow AnnotationManager to keep track of stale tiles entirely
internally. There's no reason to pass sets of TileIDs around.

Third, correct the logic for invalidating the shape source. Since
AnnotationManager does not track shape invalidations on a tile-by-tile basis,
don't try to invalidate the shape source tile-by-tile.

Fixes #1675
Fixes #2322
Fixes #2095
2015-09-28 14:10:23 -07:00
Justin R. Miller
d57b47b1eb fixes #1675: abstract annotation tile refresh check/render; trigger post-sprite/sprite store load 2015-09-11 15:09:40 -07:00
Bruno de Oliveira Abinader
227776dee0 Style no longer requires mainloop access 2015-09-02 23:18:29 +03:00
Thiago Marcos P. Santos
234a653931 Use the observer pattern for GlyphPBF loading
This will make the code a lot more clear and it will
also move how parsing is initiated to the GlyphPBF
class, to be initiated after the request, like we do
for other resources.
2015-07-17 21:00:34 +03:00
Thiago Marcos P. Santos
0d44402628 Move MockFileSource to fixtures
It is going to be used by another test that needs to emulate
asynchronous requests.
2015-07-10 21:03:23 +03:00
Thiago Marcos P. Santos
7fc6d0444c Re-enable Sprite resource loading tests 2015-07-10 10:48:46 +03:00
Konstantin Käfer
b2a3314192 replace Style object immediately
this makes sure that adding custom sprite imagery will add them to the new Style object rather than
the old one in case a user adds new custom sprites immediately after changing a stylesheet
2015-07-08 19:46:01 +02:00
Konstantin Käfer
4f48874ef0 we're no longer throwing exceptions when loading invalid sprite resources 2015-07-08 19:46:01 +02:00
Konstantin Käfer
afaf74e41a use SpriteStore from the SpriteAtlas 2015-07-08 19:46:00 +02: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
Thiago Marcos P. Santos
f74bc9d8ce Update the unit tests to check for raster tiles failures 2015-07-02 23:21:42 +03:00
John Firebaugh
e466348dea Remove unnecessary use of optional 2015-07-01 17:12:21 -07:00
Thiago Marcos P. Santos
d30fce5f7d Catch exceptions when parsing tile PBFs
Also improved the error message and updated the test case.
2015-07-01 15:21:10 -07:00
John Firebaugh
e6a576f6eb currentState() ⇢ getState() 2015-06-26 10:32:07 -07: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
7a30a0d316 Be more strict on escaping at the test regex
Apparently libc++ is more strict about escaping
than libstdc++.

Also, restrict the set of tiles we expect to the
only possible tiles.
2015-06-25 18:13:01 +03:00
Thiago Marcos P. Santos
07086981fe Get rid of Environment et al.
mbgl::Environment is not used anymore and can
removed.
2015-06-25 16:26:22 +03:00
Thiago Marcos P. Santos
be4cb6786b Make the FileSource available from the ThreadContext
For now we set the FileSource for the Worker context
but in the future after fixing #1664 we can assert()
that FileSource are set only for the Map thread context.
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
Thiago Marcos P. Santos
43d69b6a65 Fix resource loading flaky test
When testing failed vector tiles requests, we check for error messages
of a very specific tiles, but mbgl will requests 4 tiles.

We might get the error callback before the tile we are checking for
reports error, so the test fails.

Now we use a regex to match the log message we are looking for.
2015-06-22 22:00:24 +03:00
Thiago Marcos P. Santos
22acc2f14c Remove cleanup call on the ResourceLoading test case
We should not be able to create GL objects with a no-op view, so
there is nothing to cleanup.
2015-06-18 14:00:46 +03:00
Thiago Marcos P. Santos
d7465061f8 Do not call update() asynchronously on the test case
We need to call it before checking if the tiles are loaded
to give the Source a chance to request for more tiles if
it is needed.
2015-06-02 20:43:29 +03:00
Thiago Marcos P. Santos
5c4c6648d1 Rebase the resource loading tests
Update the ResourceLoader tests to reflect the changes
after we merged ResourceLoader with Style.
2015-06-02 20:43:00 +03:00