Commit Graph

23 Commits

Author SHA1 Message Date
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