Commit Graph

576 Commits

Author SHA1 Message Date
Minh Nguyễn
8bad15bf87 [core] Consolidated zoom and angle anchor logic
Made anchor a CameraOption for easeTo().
2016-01-14 00:40:03 -08:00
Ansis Brammanis
e577354567 [core] remove bilinear, nearest scaling, fix #3164 2016-01-13 15:02:41 -08:00
John Firebaugh
618902e06c [core] Remove request coalescing in OnlineFileSource 2016-01-13 13:43:05 -08:00
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
Minh Nguyễn
61615a44fd [ios] Removed -testCenterSet
This test is causing frequent failures on Bitrise; the failure doesn’t appear to reflect a real-world problem.
2016-01-13 13:17:43 -08:00
Konstantin Käfer
e8705d535d [core] move SourceInfo parsing to StyleParser 2016-01-13 13:04:59 -08:00
Konstantin Käfer
cef05b9017 [core] move invariant Source ID from SourceInfo to Source 2016-01-13 13:04:59 -08:00
Konstantin Käfer
62973f9e5a [core] move raster tile URL normalization to source parsing 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
Konstantin Käfer
13fbf8b39b [test] Fix test case comments
Follow up to a06f28ddb7
2016-01-11 11:14:29 +01: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
John Firebaugh
4b7db28157 [tests] Test that Timer::stop on a stopped timer is a no-op 2016-01-08 12:23:48 -08:00
Konstantin Käfer
a06f28ddb7 [core] only cache successful or NotFound responses
We don't want other types of error end up in our cache, since it'll likely evict perfectly good content.
2016-01-08 16:25:54 +01:00
Konstantin Käfer
7e815aed2e [test] allow aborting rendering after a timeout 2016-01-08 13:23:01 +01:00
Konstantin Käfer
4479f5db6c [core] don't consult cache for asset resources 2016-01-08 13:05:51 +01:00
Thiago Marcos P. Santos
c8a39e1587 [tests] Sleep more than 1s before refreshing accessed time
The cache `accessed` field resolution is 1s, so we
need to sleep a little bit more in order to make
sure that the cache entries we are refreshing will have
a different `accessed` time than the other entries.
2016-01-07 20:54:01 +02:00
Minh Nguyễn
1a501d4ec4 Happy new year! 2016-01-05 14:01:58 -08:00
Thiago Marcos P. Santos
6af69e4e56 [tests] Added utests for cache versioning 2016-01-05 17:32:46 +02:00
Konstantin Käfer
0377e23c20 [test] terminate test server when stdin closes 2016-01-05 14:14:23 +01:00
John Firebaugh
79368a0ecf [test] Remove terminate-when-inactive behavior from the test server
It caused #3163.

Attempts at having the child exit automatically when the parent exits were stymied
by the fact that unix sucks: http://stackoverflow.com/q/284325/52207.
2016-01-04 17:27:01 -08: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
7a6076ea9d [tests] Test with OnlineFileSource
When we introduce OfflineFileSource, the behavior of existing tests should
not change.
2015-12-23 14:55:12 -08:00
John Firebaugh
16de579d7c [core] Rationalize error handling for resource loading
* Standardize on std::exception_ptr as the error representation
  (fixes #2854).
* Don't format textual strings at the error source; pass on the
  constituent data via observer method parameters instead.
* Use the null object pattern to simplify observer notification code.
* Further refactoring for ResourceLoading tests.
2015-12-23 12:50:42 -08:00
Bruno de Oliveira Abinader
2e69d95c6b [tests] Moved lazy source loading tests to ResourceLoading 2015-12-23 10:54:05 -04: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
John Firebaugh
b60b6c47c0 [core] Merge SQLiteCache into the platform library
OfflineFileSource will depend on SQLite too.
2015-12-22 12:09:14 -08:00
Thiago Marcos P. Santos
373916420a [tests] Create less threads on the AsyncTask tests
So we open less fds as new versions of OSX have
a smaller limit (256).
2015-12-21 22:22:11 +02: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
95cef66e22 [core] change RapidJSON usage to use CrtAllocator and bump GeoJSON VT 2015-12-14 16:43:35 -08:00
Konstantin Käfer
2f973d0a7e [core] parse GeoJSON source type 2015-12-11 16:23:42 -08:00
John Firebaugh
65b3220368 [core] Reduce custom layer API to lowest common denominator 2015-12-11 12:44:54 -08:00
Thiago Marcos P. Santos
37ca365469 [tests] Force classic locale on toString tests
Fix an issue where the test result can be affected
depending on the current locale settings of the
machine running the tests.
2015-12-10 18:25:51 -08:00
John Firebaugh
bde07c8f0e [core] Custom layers 2015-12-09 13:51:28 -08:00
John Firebaugh
e04c5f6506 [core] Replace StyleLayerType with RTTI 2015-12-07 18:22:33 -08:00
John Firebaugh
0a0007e0ac [core] More efficient layer cloning 2015-12-07 11:19:08 -08:00
Konstantin Käfer
478472e501 [core] add std::move to constructors 2015-12-03 15:38:36 +01:00
Konstantin Käfer
d5fb535058 [core] add namespace comment to closing brace 2015-12-03 15:38:36 +01:00
Konstantin Käfer
6feb89cbbc [core] fix various errors reported by clang-tidy 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
John Firebaugh
e5181e2668 [core] Use optional where SpriteAtlas return values might not exist
Fixes #3162
2015-12-01 18:05:54 -08:00
John Firebaugh
8afa14fa78 [core] Map::setSprite ⇢ Map::addAnnotationIcon
Fixes #3084
2015-12-01 15:10:28 -08:00
Adam Hunter
e1091db45e [core] Use a separate atlas and store for annotation sprites
Fixes #1488
2015-12-01 09:15:05 -08:00
John Firebaugh
58886842bc [core] Move MapData storage to MapContext
This allows MapData members to hold GL resources which must be released
on the MapContext thread -- necessary for the following commit.
2015-12-01 09:15:05 -08:00
John Firebaugh
f27c28b6c4 Partially revert "[core] Source should receive a ref to MapData just once"
This partially reverts commit d55aa7929c.
2015-12-01 09:07:03 -08:00