Commit Graph

164 Commits

Author SHA1 Message Date
Amy Lee Walton
b0cb8715ed CJK overflow - update to match gl-shader (#5908)
* update vertex array ushorts

* update atlas size

* testing latest cjk test-suite branch

* update shader ref

* update shaders

* update icon buffer

* shaders

* updated tests

* buffer fix

* updated make tests

* annotation expected updates

* final push

* final fonts

* a_data1 removal

* remove cjk-mixed test

* hiring threshold for cjk-chinese

* update to new test suite

* Rename a_data2 to a_data in sdf and icon shaders

* update test-suite sha
2016-08-11 09:49:36 -07:00
Konstantin Käfer
03ebae0f2e [core] don't crash when the version number is not a number 2016-07-20 15:33:09 +02:00
Konstantin Käfer
a07fbe8e34 [core] fix crash when the style JSON doesn't have an object at its root 2016-07-20 15:33:09 +02:00
Minh Nguyễn
74fe96d261 [core] Restored shape annotation z-order
Shapes are once again always added to the top z-index.

Fixes #5691.
2016-07-18 14:43:44 -07:00
Young Hahn
71a3b1d0db [core] geometry@0.8.0 / geojsonvt@6.0.0 (#5514)
* [core] geometry.hpp 0.8.0

* geojsonvt @ 6.0.0

* Update platform deps, build scripts

* Perf optimizations/cleanup

* Rebase in geometry@080

* D.R.Y. etc

* Ensure fill annotation geometries have closed rings.

* Optimizations

* Update to geojsonvt @ 6.1.0 for clean handoff between geojson parsing and geojsonvt

* Apply close multi/poly geoms for line annotations as well
2016-07-06 17:29:34 -04:00
Bruno de Oliveira Abinader
33a8856c2a [test] Added max zoom annotation tests 2016-06-28 12:02:43 +03:00
John Firebaugh
021d4199cb [core, node] Implement bindings for addSource 2016-06-24 09:39:51 -07:00
John Firebaugh
16c435b151 [core, node] Implement bindings for addLayer 2016-06-24 09:39:51 -07:00
John Firebaugh
a18d6dda5d [core] Rewrite style parsing logic for reuse in node bindings 2016-06-21 15:38:13 -07:00
Thiago Marcos P. Santos
ddc6bc330f [tests] Add memory tests
Simple tests that will render a raster and a vector map and
hopefully the valgrind bot will detect something wrong if any.

The other test will look for application lifetime leaks that cannot
be detected with valgrind. It can also detect GL leaks if they are
very expressive.  A threshold is needed because of memory will grow
anyway due to fragmentation.
2016-06-21 19:12:32 +02:00
Thiago Marcos P. Santos
178e0e9da9 [tests] Add resources for rendering offline
The StupFileSource of the memory test will do the rendering
completely offline with a vector tile that is densly populated
with features and a raster tile of the same region.

The styles are streets and satellite respectivelly.
2016-06-21 18:58:48 +02:00
John Firebaugh
2921127bdb [core] Avoid unnecessary work when a symbol annotation is updated
In particular, if only the geometry changes, don't cascade and recalculate the style.
2016-06-17 11:38:04 -07:00
John Firebaugh
ba4a8a9731 [tests] Add basic tests for Map::{add,remove}Layer 2016-06-02 14:51:39 -07:00
John Firebaugh
1fb96d38a0 [tests] Tweak LineAnnotation test so that it reveals a bug; fix the bug 2016-06-02 14:47:35 -07:00
Molly Lloyd
c86f558e9d [core] port outlinepattern for fill-pattern anti-aliasing from gl-js to native
add outlinepattern shader class to relevant files

add outlinepattern code to painter_fill.cpp

add outlinepattern code to fill_bucket

refactor painter_fill, fix tests

fix merge conflicts and setDepthSublayer

update render test to no antialiasing so travis will be happy
2016-04-28 17:13:20 -07:00
John Firebaugh
e916cc811c [tests] Rationalize test fixtures (#4834)
Place them in a directory corresponding to the test .cpp file name.
2016-04-25 14:51:27 -07:00
John Firebaugh
5eda74a514 Merge branch 'release-ios-3.2.0-android-4.0.0' 2016-03-30 17:43:37 -07:00
Konstantin Käfer
db5ac4785f [test] rearrange test files so they're not in the fixtures folder 2016-03-22 11:56:01 -07:00
Konstantin Käfer
1dd81d9776 [test] remove crc64 and compare images
boost's crc64 breaks on iOS
2016-03-22 11:56:01 -07:00
John Firebaugh
5130ca8843 [core] Implement a vacuum strategy for the offline database
Enable `PRAGMA auto_vacuum = INCREMENTAL`, and perform a `PRAGMA incremental_vacuum` when deleting an offline region.
2016-03-17 14:17:59 -07:00
John Firebaugh
065cda83fa [core] Limit total number of offline Mapbox tiles 2016-02-24 13:38:14 -08:00
John Firebaugh
ce1d8561b4 [tests] Add test for Map::updatePointAnnotation 2016-02-12 16:47:24 -08:00
John Firebaugh
0cf450e3e5 [core] Retry errors encountered during offline downloads 2016-02-10 15:40:20 -08:00
John Firebaugh
c3c4c7b9a6 [core] Interface and implementation for offline 2016-02-10 15:40:20 -08:00
John Firebaugh
cdedb66387 [core] Reimplement existing caching within an offline-capable database schema 2016-02-10 15:40:20 -08:00
John Firebaugh
025375ad0b [core] Cache with mapbox:// tile URLs 2016-02-10 15:40:20 -08:00
John Firebaugh
f3d4107d19 [core] Add a method for statically evaluating font stacks used by a style 2016-02-10 15:40:20 -08:00
John Firebaugh
19aa090bdc [tests] Don't call the callback for cancelled responses
StubFileSource gets an optional Response return type. Returning null means "cancelled; don't call the callback".

Fixes #3784
2016-02-04 13:18:14 -08:00
John Firebaugh
52689796df [core] Normalize only raster source tile URLs 2016-02-01 20:25:55 -08:00
John Firebaugh
716997b99e [tests] Refactor and make MockFileSource more general
Now it works more like StubStyleObserver: you can assign std::functions to specific slots based on resource type.

Rewrite resource loading tests in that style, making them less like integration tests of Style and more like unit tests of Source, GlyphStore, and SpriteStore.
2016-02-01 15:29:42 -08:00
Bruno de Oliveira Abinader
2f86467586 Cleanup std::chrono usage
Use mbgl::Duration and mbgl::{,Milli}Seconds whenever possible.
2016-01-25 15:11:18 +02:00
Bruno de Oliveira Abinader
9cd9065031 Revert "Revert WebP support due to broken builds"
This reverts commit 6709bdcacd.

There was an issue with the script that removes '-lwebp' from WebP
linker flags, since we're statically linking. This is now fixed.
2016-01-20 10:35:44 +02:00
Ansis Brammanis
d34f8eb674 [core][ios][osx][android] make SpriteImage accept PremultipliedImage
the SpriteImage constructor signature changes from

SpriteImage(
        uint16_t width, uint16_t height, float pixelRatio,
        std::string&& data, bool sdf = false);

to

SpriteImage(PremultipliedImage&&, float pixelRatio, bool sdf = false)
2016-01-19 18:23:21 -08:00
John Firebaugh
6709bdcacd Revert WebP support due to broken builds
This reverts commits 2010fbb0e6, a361ce47a1, and d004bb275a.
2016-01-19 13:34:56 -08:00
Bruno de Oliveira Abinader
a361ce47a1 [linux] Added WebP tile support
- Android support is currently disabled due to a libwebp build issue.
- iOS and OS X support will appear after the next Mapbox iOS SDK release.

Related: #https://github.com/mapbox/mapbox-gl-native/issues/2354
2016-01-19 16:06:36 +02:00
Konstantin Käfer
a88e58ef3a [core] use stale glyphs
Updating glyphs is still unsupported, and there's no good use case for doing so. When we're using a stale glyph PBF, and the fresh answer contains changed to that glyph, we will continue to use the old glyph.
2016-01-15 17:04:08 +01:00
Konstantin Käfer
bd1f71cdbd [core] use stale sprite data
This is a naïve implementation that essentially merges updated data into existing data. It will *not* remove icons from the stale sprite if they aren't present in the fresh sprite (we aren't tracking the source of a sprite, and the user could have changed it as well). Similarly, it will not update icons that have changed in dimension. This is a rare edge case and probably not worth implementing.
2016-01-15 17:04:07 +01:00
Konstantin Käfer
5fe586633c [test] ensure static rendering finishes when a tile can't be loaded 2016-01-15 12:48:23 +01:00
Konstantin Käfer
8a964fb931 [core] use stale and refreshing TileJSON/GeoJSON data
We're now supporting using stale TileJSON and GeoJSON data. When we receive a new answer with an updated TileJSON file, we're replacing the Source's metadata with the new one and trigger updates to make sure we're loading the correct tiles. Similarly, GeoJSON data will be reparsed.
2016-01-15 12:48:23 +01:00
Konstantin Käfer
21e4029acf [core] use stale styles
This adds support for using cached styles that are stale. They're treated like changing styles; when the refreshed style changed compared to the one we've already had, we're swapping out the entire style, which might cause a slight flicker.
2016-01-15 11:59:26 +01: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
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