Commit Graph

67 Commits

Author SHA1 Message Date
Chris Loer
7f42e3970e [core] Convert GeometryTileWorker to "one-phase" loading
Modest simplification refactoring (issue #10457).
Also, fixes issue #11538, which was caused in part by a hole in the vestigial two-phase loading.
2018-04-02 10:39:22 -07:00
Molly Lloyd
8a283b0306 [core] add support for mapzen terrarium (#11154)
* add support for mapzen terrarium

* Encoding --> DEMEncoding, avoid if statement when unpacking elevation values

* add Terrarium test

* update submodule

* remove redundant checks
2018-02-14 13:17:55 -08:00
Molly Lloyd
f3294200c6 [core] add raster-dem source type and hillshade layer type (#10642) 2018-01-23 10:49:23 -08:00
Asheem Mamoowala
acae193861 [core] Custom Geometry Sources 2017-11-22 13:56:38 -08:00
Chris Loer
54b990eb33 [core] Update unit tests for viewport collision.
Add 'GridIndex' unit test.
2017-11-17 10:05:15 -08:00
Konstantin Käfer
f659aa4eda [core] make sure tiles are not treated as complete until all worker operations completed
Previously, when we started a worker operation that eventually throws an exception (e.g. due to the tile not being parseable), and then enqueue another worker operation while the first one is processing, we treated the worker as idle once the first operation's error callback fired, even though the second operation was still in progress. Due to our use of coalescing, I was unable to come up with a reliable test since we'd need to reproduce the behavior described above, which is timing dependent.
2017-09-21 12:20:54 +02:00
Konstantin Käfer
1a684c1f48 [core] keep tiles renderable even if a subsequent error occurs
Since 9a9408e811, we marked tiles as non-renderable if an error occured. This lead to situations where a tile was loaded + parsed successfully, then a revalidation attempt occured (e.g. because the resource was stale) which failed. In this case, we used to mark the tile as non-renderable although we could've used the perfectly parsed (stale) resource.
2017-09-21 12:20:54 +02:00
John Firebaugh
e706ed4b2e [core] Avoid RenderStyle dependency in query code 2017-08-24 13:06:23 -07:00
Ivo van Dongen
a5a0558bde [test] allow only a single shared display to avoid egl errors 2017-07-18 10:45:12 +02:00
Ivo van Dongen
46c43510d7 [core] rename backend to renderer backend 2017-07-18 10:45:12 +02:00
Ivo van Dongen
3832f8d0d8 [core] renderer interface 2017-07-18 10:45:12 +02:00
Ivo van Dongen
e35cbbae55 [core] mutate style on annotation mutations immediately 2017-07-18 10:45:12 +02:00
Asheem Mamoowala
8ae7010546 [core][ios][android][macos] Use premultiplied image directly for RasterTile and ImageSource, un-premultiply in the shader for blending 2017-07-17 12:20:03 -07:00
Bruno de Oliveira Abinader
4014aa6721 [core] GCC 4.9 bracket initialization issues 2017-07-12 20:42:29 +03:00
Bruno de Oliveira Abinader
2fae373fc9 [core] GCC 4.9 is unable to deduce ctors when using bracket init 2017-07-12 20:42:29 +03:00
Chris Loer
a432a289a3 [core] Change OverscaledTileID to also include a "wrap" value.
This prevents TilePyramid from sharing wrapped copies of tiles.
This is necessary because two wrapped tiles no longer share the same CollisionTile.
2017-07-11 09:10:24 -07:00
John Firebaugh
be7e9bbb8d [core] Refactor CustomLayer internals
Move the responsibility for initialization/deinitialization/rendering to RenderCustomLayer. This eliminates special case code from Map and Style.
2017-06-22 08:04:39 -07:00
Konstantin Käfer
7b90af5d35 [core] always return owning pointers for GeometryTileData::getLayer() 2017-06-21 17:18:08 -07:00
John Firebaugh
3270440f23 [core] Per-tile glyph/icon atlases 2017-06-13 10:18:43 -07:00
John Firebaugh
0b68731207 [core] Per-bucket icon atlases 2017-06-13 10:18:43 -07:00
John Firebaugh
92252849c1 [core] Per-bucket glyph atlases 2017-06-13 10:18:43 -07:00
John Firebaugh
74af076d40 [core] Split RenderStyle from Style 2017-06-05 19:38:08 -07:00
John Firebaugh
591af0021b [core] Refactor RenderSource updates
* Eliminate updateBatch in favor of diffing layers and detecting changes to properties upon which layout depends.
* Replace RenderSource::{update,remove,invalidate,reload}Tiles with a single update method
* Replace TilePyramid::{update,remove,invalidate,reload}Tiles with a single update method
* Remove Style& dependency TODO from GeometryTile and TileParameters
2017-06-05 19:38:08 -07:00
John Firebaugh
32589c271c [core] Thread Style parameter through queryRenderedFeatures 2017-06-05 19:38:08 -07:00
John Firebaugh
d766af44c8 [core] Auto-growable SpriteAtlas using shelf-pack 2017-05-26 11:21:56 -07:00
John Firebaugh
da4d735e2c [core] Unify {Paint,Layout,Light}Properties 2017-05-15 09:45:55 -07:00
Asheem Mamoowala
84e39611a0 [core] Move renderer/* files into sub-folders (#8983)
Move renderer/* files into sub-folders
2017-05-12 17:07:48 -07:00
John Firebaugh
c2a5894f2d [core] Immutable Impls 2017-05-12 11:26:27 -07:00
Bruno de Oliveira Abinader
baeaad83a3 [tidy] modernize-use-emplace 2017-05-12 18:07:36 +03:00
John Firebaugh
89f1ffc6d2 [core] UpdateParameters ⇢ TileParameters 2017-05-04 07:29:08 -07:00
John Firebaugh
d5f4d0f05f [core] Move render-related sources out of style directory/namespace
Moves the following to the renderer directory and out of the style namespace:

* CascadeParameters
* PropertyEvaluationParameters
* UpdateParameters
* PropertyEvaluator
* DataDrivenPropertyEvaluator
* CrossFadedPropertyEvaluator
* PaintPropertyBinder
* PaintProperyStatistics
* PossiblyEvaluatedPropertyValue
* TransitioningLight
* EvaluatedLight
2017-05-03 08:30:17 -07:00
John Firebaugh
3f0c89d633 [core] Refactor Source::*Impls into RenderSources and TilePyramid 2017-05-02 08:45:09 -07:00
John Firebaugh
c2b00378b7 [all] Push querySourceFeatures back out to Map
Once Source and RendererSource are split, Source will no longer have access to tiles.
2017-05-02 08:45:09 -07:00
Ivo van Dongen
3c175adf30 [core] split off render layers 2017-04-25 17:23:54 -07:00
Konstantin Käfer
59055cf403 [core] Move Sprite parsing to thread pool 2017-04-24 10:42:47 +02:00
Konstantin Käfer
9a9408e811 [core] Render parent raster tiles when ideal tile can't be loaded 2017-04-20 09:38:18 +02:00
Bruno de Oliveira Abinader
98e2e59e5e [core] Safeguard PositionedIcon usage via optional 2017-04-14 12:33:13 -07:00
Fabian Guerra
12b6fdbe3b Merge branch 'release-ios-v3.5.0-android-v5.0.0' into boundsj-merge-release-branch
# Conflicts:
#	cmake/core-files.cmake
#	mapbox-gl-js
#	platform/android/CHANGELOG.md
#	platform/ios/CHANGELOG.md
#	platform/macos/CHANGELOG.md
#	platform/qt/bitrise-qt5.yml
#	src/mbgl/gl/attribute.hpp
#	src/mbgl/gl/context.cpp
#	src/mbgl/gl/program.hpp
#	src/mbgl/map/map.cpp
#	src/mbgl/programs/program.hpp
#	src/mbgl/renderer/painter.cpp
2017-04-11 21:46:23 -04:00
Anand Thakker
693c9f3641 [core] Add DDS support for {text,icon}-size (#8593)
* Update gl-js and generate style code

* Factor out packUint8Pair() helper function

* Draft implementation of DDS for {text,icon}-size

Ports https://github.com/mapbox/mapbox-gl-js/pull/4455

* Fix text-size/composite-function-line-placement test

* Refactor to PaintPropertyBinders-like strategy

* Dedupe gl::Program construction

* Use exponential function base for interpolation

* Dedupe coveringZoomStops method

* Fixup tests

* Fix CI errors (hidden within #if block)
2017-04-06 15:29:59 -04:00
John Firebaugh
16a2839e23 [all] Make LatLng coordinates read-only 2017-04-06 09:22:51 -07:00
John Firebaugh
d7a55a4be1 [core] Introduce a fully-evaluated tuple type for layout properties 2017-03-31 13:26:27 -07:00
John Firebaugh
1edbb0f24b [core] check null data in query source features (#8553)
* [core] check null data in query source features

* Include what you use
2017-03-28 16:02:48 -07:00
Ivo van Dongen
b3ffeceb9e [core] check null data in query source features 2017-03-28 21:31:35 +03:00
John Firebaugh
c16bd14416 [core] Prefer std::map to std::unordered_map for smaller binary size 2017-03-21 09:27:22 -07:00
Bruno de Oliveira Abinader
fc70cbf1e1 [core] Replace MapChange enum with MapObserver 2017-03-15 14:53:32 +02:00
Ivo van Dongen
7a13bee72e [core] don’t query rendered features until all data is available 2017-03-14 13:28:32 -07:00
Ivo van Dongen
96a53156c2 [core] don’t query rendered features until all data is available 2017-03-14 17:27:59 +02: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
Konstantin Käfer
9ffbfdc7b9 [core] don't treat empty raster tiles as "DataAvailability::All" 2017-02-22 22:28:29 +01: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