John Firebaugh
5a7d2fd60e
[core] Eliminate platform::assetRoot()
...
I regenerated assets.zip so that all file paths have an `assets/` prefix, as the Android AssetFileSource implementation asserts, and removed `TEST_DATA` from the paths.
2016-01-13 13:40:31 -08:00
John Firebaugh
86c8446d3a
[core] Simplify asset:// implementation
...
* Move asset:// URL handling to DefaultFileSource.
* AssetFileSource implements FileSource interface and follows familiar implementation patterns.
* Move default implementation to platform/default, zip implementation to platform/android.
* Don't bother with modified / expires / etag -- assets are not cached so it doesn't matter.
* Don't bother with interleaving individual IO calls on the implementation thread. That adds a lot of complexity for very little benefit.
2016-01-13 13:40:31 -08:00
Konstantin Käfer
e8705d535d
[core] move SourceInfo parsing to StyleParser
2016-01-13 13:04:59 -08:00
Thiago Marcos P. Santos
259fe1c81d
[tests] Fix how we launch the test server
...
`execl` uses varargs thus must be NULL terminated.
2016-01-11 15:40:10 +02:00
Thiago Marcos P. Santos
d7fdcc73bf
[core] Get rid of ::unref() for Timer and AsyncTask
...
Not need, legacy from libuv. The RunLoop keep the main
loop running until is explicitly no longer needed.
2016-01-09 01:26:29 +02:00
Konstantin Käfer
7e815aed2e
[test] allow aborting rendering after a timeout
2016-01-08 13:23:01 +01:00
Konstantin Käfer
0377e23c20
[test] terminate test server when stdin closes
2016-01-05 14:14:23 +01:00
Thiago Marcos P. Santos
e6dc4fe49d
[tests] Add unit tests for SQLiteCache size limit
2015-12-28 14:48:02 +02:00
John Firebaugh
845699e698
[tests] Simplify MockFileSource
2015-12-24 08:17:42 -08:00
John Firebaugh
338f94e7ed
[tests] Rewrite {Sprite,Glyph}Store tests in the style of ResourceLoading
2015-12-24 08:17:42 -08:00
John Firebaugh
7c22792bdf
[tests] Rewrite resource loading test
...
Make it more readable and easier to debug.
2015-12-22 18:00:30 -08:00
Bruno de Oliveira Abinader
3e00ab1582
[core] Add more tests to on-demand source load
2015-12-17 18:15:06 -08:00
Bruno de Oliveira Abinader
9d3fe01991
[core] Tests for style with unused sources
2015-12-17 16:53:37 -08:00
Bruno de Oliveira Abinader
93725e062a
[core] Load sources only if there is at least one visible layer
2015-12-17 16:53:37 -08:00
Minh Nguyễn
e304033552
[core] Fixed annotation icon replacement
...
Another pass at #3146 , including a unit test.
2015-12-15 21:04:15 -08:00
Konstantin Käfer
2f973d0a7e
[core] parse GeoJSON source type
2015-12-11 16:23:42 -08:00
John Firebaugh
bde07c8f0e
[core] Custom layers
2015-12-09 13:51:28 -08:00
Konstantin Käfer
d5fb535058
[core] add namespace comment to closing brace
2015-12-03 15:38:36 +01:00
Konstantin Käfer
dc620f48de
[core] Fix std::move() misuse that disables copy elision
2015-12-03 15:38:36 +01:00
Thiago Marcos P. Santos
7caaebb162
[tests] Fix/improve Asset utests
...
ASSET=zip make test-* was broken and now works.
Also added a test stressing concurrent file access.
2015-12-01 11:49:02 +02:00
Thiago Marcos P. Santos
cb06526b10
[tests] Remove libuv dependency from the tests
2015-12-01 11:49:02 +02:00
John Firebaugh
12fc949006
[tests] Don't use icons from the style for annotations
2015-11-30 12:40:09 -08:00
John Firebaugh
1d33790dc0
[core] Fix image type of Map::renderStill
...
It's a premultiplied image. This implies that we were misusing encodePNG
in most cases, as we were passing premultiplied pixels which were then
interpreted as unmultiplied. I changed encodePNG to accept premultipled
pixels, and unpremultiply in the implementations.
2015-11-25 15:57:37 -08:00
John Firebaugh
ed5eb9edc1
[test] Add pixelmatch; use in annotation tests
2015-11-25 15:57:37 -08:00
John Firebaugh
54eff4b4c1
[core] Add image tests
2015-11-25 15:57:36 -08:00
John Firebaugh
d08861daf4
[core] Force style-sourced annotations to be visible
2015-11-19 19:50:29 -08:00
John Firebaugh
f2772309fe
Rewrite CustomSpriteImages test
...
Previous test was invalid; Map::setSprite is only for annotations.
2015-11-18 16:29:18 -08:00
John Firebaugh
7137239cbd
[core] Use std::unique_ptr for FileSource request
2015-11-16 12:25:47 -08:00
Thiago Marcos P. Santos
36581f3d30
[core] Do not pass uv_loop_t around
...
This should be abstracted by util::RunLoop
2015-11-16 12:25:47 -08:00
John Firebaugh
a562567589
[core] Eliminate use of ClassProperties for layout
2015-11-10 11:33:17 -08:00
Konstantin Käfer
4d5c6333be
[core] move retry logic to DefaultFileSource
2015-11-02 17:24:40 +01:00
John Firebaugh
7821dccae5
[core] Polymorphic layout and paint parsing
2015-10-29 16:46:49 -07:00
Konstantin Käfer
b9452bcbba
[core] refactor test server startup
2015-10-28 16:51:13 +01:00
Konstantin Käfer
5173bf1bb8
[core] Make response data shared to avoid excessive copying
2015-10-26 15:54:27 +01:00
John Firebaugh
c46a8254c4
[core] Style-sourced shape annotation properties
...
This introduces the possibility to source the type and style properties
of a shape annotation from a designated layer in the style.
2015-10-22 15:27:53 -07:00
John Firebaugh
3afc8b4a29
[core] Introduce StyleLayer subclasses
2015-10-22 09:34:40 -07:00
John Firebaugh
028abaab00
Ensure that LiveTileData can be reparsed
...
Annotation tiles may become partially parsed just like regular tiles,
for example if a point annotation is added to the map before the style's
sprite has been loaded. In such cases, they need to be reparsed or the
annotation will not be rendered. Previously, the code path for reparsing
would be short-circuited by a dynamic_cast<VectorTileData*> followed by
a null check. This commit removes that case and adds (back) a virtual
reparse method to the TileData interface.
2015-09-28 14:10:00 -07:00
Mike Morris
4540c3c0e8
View::swap -> View::beforeRender View::afterRender
...
To be able to resize the framebuffer on the map thread
in HeadlessView.
2015-08-25 14:39:49 -04:00
Bruno de Oliveira Abinader
98534631e0
Add circle render type
...
As specified in:
https://github.com/mapbox/mapbox-gl-style-spec/blob/v8-circle/reference/v8.json
Part of #1740 .
2015-08-20 11:59:07 -07:00
Tom MacWright
6df50dba45
Font stacks as arrays
2015-08-20 11:58:57 -07:00
John Firebaugh
e42cfa239f
Update test-suite and test fixtures for v8
2015-08-20 11:58:57 -07:00
Thiago Marcos P. Santos
06e27f905e
Mark overrides
...
Detected by clang++-3.6
2015-07-11 12:42:45 +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
1fbbedd47b
Make FixtureLogObserver thread-safe
...
We can log for different threads (main, map, workers, etc) so
we need to lock before adding the messages on the list.
This was causing few tests to randomly crash.
2015-07-08 23:48:05 +03:00
Konstantin Käfer
1f4b5e7736
add custom imagery visual test
2015-07-08 19:46:03 +02:00
Konstantin Käfer
c66ec8739b
show info message when Sprite does not exist
2015-07-08 19:46:03 +02:00
Konstantin Käfer
493c72b1f4
move crc64() to test fixture
2015-07-08 19:46:03 +02:00
Konstantin Käfer
a96a8fef76
add a separate SpriteParser object
...
transforms a JSON and an associated PNG file into individual SpriteImage objects that can be inserted into a SpriteStore
2015-07-08 19:45:59 +02:00
Konstantin Käfer
9991f9da54
add RAII-style FixtureLog
2015-07-08 19:45:59 +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