Commit Graph

1006 Commits

Author SHA1 Message Date
Jesse Bounds
e1546644b5 [core] Cache file source base URL and access token
This caches the base URL and access token values when they are set
so that they can still be retrieved even when the thread is paused.
2017-03-01 08:25:44 -08:00
Anand Thakker
f901e776b3 [core] Implement data-driven styling for {text,icon}-{color,opacity,halo-color,halo-blur,halo-width} (#7939)
* Add symbol dds attributes and adapt style code generation

* Update to mapbox-gl-js/master

* Refactor SymbolFeature as a subclass of GeometryTileFeature

Prepares for enabling DDS on symbol paint properties by allowing the
SymbolFeatures, which we keep around after constructing SymbolLayout,
to be used in evaluating data-driven paint properties later in the
layout process.

* Draft approach for splitting icon/text paint properties

The `Program` types are set up to bind GL attributes to each of the
data-driven paint properties specified in the `PaintProperties` type
provided.  Since `SymbolPaintProperties` specifies both `Text*` and
`Icon*` properties, the symbolIcon, symbolIconSDF, and symbolGlyph
programs each attempt to bind roughly double the number of attributes
that they actually need.

This change addresses this by:
- Adding the more specific `IconPaintProperties` and `TextPaintProperties` types, which are subsets of the full `SymbolPaintProperties`.
- The symbol layer continues to use its `SymbolPaintProperties paint` member to track layer property state, but it provides helpers that construct objects of each the specific `{Icon,Text}PaintProperties::Evaluated` type, for use by the painter.
- The three symbol programs instantiate `Program<>` using the appropriate `{Icon,Text}PaintProperties` type.

* check in generated style code

* Populate paint buffers for symbol DDS properties

* Address first round of review comments

* Refactor VectorTile{Layer,Feature} to explicitly share data

* Update submodule
2017-02-28 19:54:24 -08:00
Anand Thakker
4b81c924cc [core] Log Memory.Footprint test results (#8170)
* Log Memory.Footprint test output

* On CI, only run Memory.Footprint test with libjemalloc
2017-02-28 14:11:35 -08:00
John Firebaugh
e18f60229e [core] There's only ever one icon quad 2017-02-28 13:59:14 -08:00
Konstantin Käfer
9ca9adf69c [core] private OffscreenView implementation 2017-02-27 16:51:17 -08:00
John Firebaugh
e3500c1f79 [core] Replace three maps/mutexes in GlyphAtlas with a single map and mutex 2017-02-27 16:19:35 -08:00
Thiago Marcos P. Santos
bc5e9afd0d [tests] Added unit tests for Thread::pause/resume 2017-02-25 14:03:38 +02:00
Konstantin Käfer
9ffbfdc7b9 [core] don't treat empty raster tiles as "DataAvailability::All" 2017-02-22 22:28:29 +01:00
John Firebaugh
5354572620 [core] Eliminate manual HeadlessBackend activation management 2017-02-20 12:04:21 -08:00
Konstantin Käfer
f0ec9fb74b [test] add unit test for DefaultFileSource::setResourceTransform() 2017-02-20 14:36:27 +01:00
John Firebaugh
eb8a1ef7aa [tests] Disable timing-based Timer tests in CI 2017-02-15 15:09:30 -06:00
John Firebaugh
0351e9c370 [core] Eliminate SpritePatternMode 2017-02-14 16:28:12 -06:00
John Firebaugh
d819ece74c [core] Combine SpriteAtlas::getPosition with SpriteAtlas::getImage 2017-02-14 16:28:12 -06:00
John Firebaugh
5524506abd [core] Eliminate SpriteAtlas::updateDirty
Simplify internal datastructures. Properly remove rects from the bin pack when an image is removed.
2017-02-14 16:28:12 -06:00
John Firebaugh
94f011895c [core] Make Image safer
Provide Image::copy, which handles copying rectangles from a source to a destination, with thorough bounds checking.

Also fixes an indexing error in SpriteAtlas, where the top row of pixels in a wrapped image was copied from the wrong source row.
2017-02-14 12:29:01 -06:00
John Firebaugh
c6d5eaf479 [tests] Use test::checkImage 2017-02-14 12:29:01 -06:00
Konstantin Käfer
f97e36acc8 [core] add tests for user/password, port, trailing dot, and IPv4/IPv6 address parsing 2017-02-13 17:23:20 +01:00
Minh Nguyễn
e6c15d0f6f Upright CJK characters in vertically-oriented labels (#7114)
CJK characters and adjacent punctuation now remain upright in vertically oriented labels that have line placement.

Fixes #1682.
2017-02-10 18:57:48 -06:00
John Firebaugh
0bbc6b814c [core] Restore support for GL implementations without VAO extension 2017-02-10 18:04:45 -06:00
John Firebaugh
b6e5edc268 [core] Restore support for *-transition properties 2017-02-09 15:08:51 -06:00
John Firebaugh
f35ca0d9df [core, ios, macos] Refactor composite stop types and conversions 2017-02-09 11:16:26 -06:00
Dane Springmeyer
13e5041553 compare polygon ring areas absolutely
- This ensures we actually keep the largest polygons
  - Adds testcase that fails without this patch
2017-02-09 10:40:30 -06:00
Thiago Marcos P. Santos
9279b198df [test] Added a test to make sure 404 does not trigger a retry 2017-02-07 12:17:40 +01:00
Thiago Marcos P. Santos
318690645e [test] Added unit test for style request failures 2017-02-07 12:17:40 +01:00
Dane Springmeyer
09c6934791 regex is no longer used after 6c91c3e 2017-02-02 15:48:00 -06:00
Ivo van Dongen
8a5bff8ee6 [core] default value support in categorical function conversion 2017-02-02 09:44:42 -08:00
John Firebaugh
141e995806 [core] Add support for data-driven styling 2017-02-02 09:44:42 -08:00
Konstantin Käfer
62ea1f2185 [core] remove trailing whitespace, add trailing newlines, add space after // 2017-01-27 11:44:16 +01:00
Bruno de Oliveira Abinader
88b7fc3929 [Qt] Implement mapbox::sqlite::{Database,Statement} using QtSql 2017-01-23 19:06:53 +02:00
Bruno de Oliveira Abinader
80d72123df [core] Move lastInsertRowId/changes to sqlite::Statement 2017-01-23 19:06:53 +02:00
John Firebaugh
d076ba0567 [core] Clean up merge_lines.cpp and add bounds checking 2017-01-18 13:38:05 -06:00
Bruno de Oliveira Abinader
49da57393a [core] Remove platform-specific main.cpp from MBGL_TEST_FILES 2017-01-18 19:06:32 +01:00
John Firebaugh
531a1c3070 [core] Fix calculation of delayed transitions 2017-01-17 15:18:14 -06:00
Konstantin Käfer
6658268115 [core] abort early when placing a glyph in GlyphAtlas if the bitmap is invalid 2017-01-17 19:23:20 +01:00
Konstantin Käfer
b6c1119172 [core] harden Glyph PBF parsing 2017-01-17 19:23:20 +01:00
Konstantin Käfer
1fc8159481 [test] add tests for paths with leading slashes 2017-01-17 17:38:57 +01:00
Konstantin Käfer
4b0cb858ba [core] include leading slash in URL.path 2017-01-17 17:38:57 +01:00
Konstantin Käfer
3b8e50a2a9 [core] add tests for function parsing 2017-01-16 10:28:21 +01:00
John Firebaugh
b65b1e2c48 [tests] Sidestep a gcc or gtest bug
https://github.com/google/googletest/issues/458
https://github.com/google/googletest/issues/322

Not seen in CI because of 0ef52d7f7c/scripts/travis_setup.sh (L17-L22)
2017-01-11 12:43:15 -08:00
John Firebaugh
e7778509c5 [core] Fix flickering caused by regression in #7586
It should be safe to invoke GeometryTileWorker::setData multiple times without invoking GeometryTileWorker::setLayers. Therefore GeometryTileWorker::redoLayout() must not consume the layers.
2017-01-10 10:15:22 -08:00
John Firebaugh
ea4c0b77c3 [core] Replace FeatureIndex::collisionTile with a method parameter
This reduces state and simplifies the test added in the prior commit.
2017-01-10 10:15:22 -08:00
John Firebaugh
40051fb68e [core] Keep symbol and non-symbol buckets segregated
Discard prior symbol buckets only when new symbol buckets became available, in order to eliminate flickering when tiles are refreshed.
2017-01-10 10:15:22 -08:00
John Firebaugh
0c0064c050 [core] Get rid of user-specified refs 2017-01-04 17:38:33 -08:00
Minh Nguyễn
b35deb85bc Happy new year! 🎉 2017-01-04 14:05:56 -08:00
John Firebaugh
083cee8956 [core] Correct boolean function interpolation 2016-12-22 18:14:00 -08:00
Ansis Brammanis
38b5cb0c77 [core, ios] replace altitude with fov
ported from -js: eb6c6596c6a7a61363d30356674e0002153b1d19

`altitude` was a terribly-named variable that was used to indirectly
control the fov. This should eliminate some confusion.

`altitude` was equivalent to `cameraToCenterDistance / height`
2016-12-21 15:46:36 -08:00
Konstantin Käfer
77db372123 [core] refactor URL parsing 2016-12-21 13:00:32 +01:00
Minh Nguyễn
a6b1773a44 Merge branch 'release-ios-v3.4.0' into 1ec5-release-ios-v3.4.0-beta.5-master
Also reran make style-code and manually discarded anything related to fill extrusion layers.
2016-12-20 12:41:40 -08:00
John Firebaugh
dad57df38e [core] Fix symbol rendering for multipoints
Ports https://github.com/mapbox/mapbox-gl-js/pull/3763 and https://github.com/mapbox/mapbox-gl-js/pull/3806.
2016-12-20 08:30:39 -08:00
Ivo van Dongen
bb6973ae90 [core] guard against duplicate layer ids 2016-12-13 10:03:05 -08:00