Commit Graph

3745 Commits

Author SHA1 Message Date
Bruno de Oliveira Abinader
db2e1b2e5f [core] Add RendererState::{pixelForLatLng,latLngForPixel} 2018-11-14 12:22:22 +02:00
Bruno de Oliveira Abinader
bf8b24fa8d [build] Update to geometry v1.0.0 2018-11-13 17:28:26 +02:00
Mikhail Pozdnyakov
5a70f2b150 noexcept specifier for layer factory methods 2018-11-07 16:34:20 +02:00
Mikhail Pozdnyakov
ffdeef3a26 Refer corresponding LayerFactory instance from the Layer::Impl 2018-11-07 16:34:20 +02:00
Alexander Shalamov
f2d9d92d26 [core] Change toLowerHex to produce lower hex sequences 2018-11-07 11:29:40 +02:00
Thiago Marcos P. Santos
7ff85374a7 [build] Remove #pragma diagnostic for boost
Boost is now included as a system header and the compiler
should ignore it when issuing warnings.
2018-11-01 16:29:37 +02:00
Mikhail Pozdnyakov
cfcb53128b Introduce the style::Layer factory classes
This patch introduces the initial implementation of
- A `LayerFactory` abstract class that creates `style::Layer` instances of
  a certain layer type (line, hillshade, round, ..)
- A singleton `LayerManager` class, which is responsible for initializing
  the `LayerFactory` instances and forwarding the `create()` calls to the
  corresponding factory.
2018-10-31 18:05:01 +02:00
Mikhail Pozdnyakov
56808731b6 Remove style::Layer::is()/as() 2018-10-31 11:22:46 +02:00
Mikhail Pozdnyakov
7a9461a8d4 Consolidate style::Layer properties API
The `style::Layer` class now exposes all the properties contained at `style::LayerImpl`.
This allowed to drop `style::Layer::accept()` method usage, avoid the repeated generated code
and thus save some binary size.

This patch is a part of the layers modularization effort.
2018-10-25 22:42:43 +03:00
Bruno de Oliveira Abinader
55710cbb67 [core] Added RendererState::has{Image,Layer,Source} 2018-10-25 16:23:40 +03:00
Huyen Chau Nguyen
1e3a744d22 [core] add priorities to resources
- priorities can be low or regular
- offline downloads should have low priority to not throttle "regular requests"
2018-10-23 12:47:10 +02:00
Konstantin Käfer
9afe75aa76 [core] address nits 2018-10-23 12:23:40 +02:00
Konstantin Käfer
7692be5d15 [core] refactor util::toString to use RapidJSON's stringification 2018-10-23 12:23:40 +02:00
Konstantin Käfer
59c5754fa8 [core] remove special case for Windows 2018-10-23 12:23:40 +02:00
Konstantin Käfer
8bf66ef7a7 [core] remove some uses of <iostream> and <sstream> 2018-10-23 12:23:40 +02:00
Konstantin Käfer
70d5972e10 [core] don't use <boost/functional/hash.hpp> to avoid <locale> include 2018-10-23 12:23:40 +02:00
Konstantin Käfer
282c71e8e9 [core] unify UTF-8/16 conversion to <boost/locale/encoding_utf.hpp> 2018-10-23 12:23:40 +02:00
Konstantin Käfer
729eeeb3f8 [core] remove use of <boost/algorithm/string.hpp> 2018-10-23 12:23:40 +02:00
Konstantin Käfer
c87c25cc84 [core] don't use <sstream> and <iomanip> for string construction 2018-10-23 12:23:40 +02:00
Konstantin Käfer
eb828dfd29 [core] add the ability to stringy numbers as hex 2018-10-23 12:23:40 +02:00
Konstantin Käfer
43687b4781 [core] add ability to stringify doubles that are integer with and without trailing ".0" 2018-10-23 12:23:40 +02:00
Konstantin Käfer
decbde1616 [core] deduplicate dtoa() from RapidJSON and add tests 2018-10-23 12:23:40 +02:00
Bruno de Oliveira Abinader
ea51b11dcc [core] Introduce mbgl::RendererState 2018-10-19 12:05:16 +02:00
Bruno de Oliveira Abinader
b94be6e68f [core] Add TransformState::getCameraOptions() 2018-10-19 12:05:16 +02:00
Bruno de Oliveira Abinader
98c36fc06e [core] CameraOptions receives and outputs angle and pitch as degrees, not radians 2018-10-19 12:05:16 +02:00
Ryan Hamley
0c6b1629ef [Core] Ensure queryRenderedFeatures accounts for icon-rotate (#13105) 2018-10-18 12:14:52 -07:00
Chris Loer
d4c9b21bae [core, tests] Don't break text-field support "identity functions" 2018-10-15 13:15:46 -07:00
Chris Loer
ce76bde13d [core] Initial implementation of 'format' expression 2018-10-15 13:15:46 -07:00
Chris Loer
bc71825774 [core] Bidi support for styled text.
Remove use of QString from non-ICU Qt stub bidi implementation since we weren't making use of it.
2018-10-15 13:15:46 -07:00
Chris Loer
fed55418f2 [core,test] Update expression style parsing test fixture.
Always clear errors before trying automatic coercion for a new compound expression overload.
2018-10-15 13:15:46 -07:00
Chris Loer
4a0aab8eb8 [core] Add automatic argument coercion for compound expressions with multiple overloads. 2018-10-15 13:15:46 -07:00
Mikhail Pozdnyakov
bf785f57e6 Reserve vector storage in the convert filter code 2018-10-10 16:13:48 +03:00
Molly Lloyd
90be9d8d9d [core] only generate clip ids for clipped layers 2018-10-03 11:46:49 -07:00
Molly Lloyd
3b9c404233 [core] don't prefetch AnnotationTiles 2018-10-03 11:46:49 -07:00
Molly Lloyd
cec3eaa198 [core] fix flickering caused by incorrect ClipIDs
we missed a check for RenderTile.needsClipping when generating the new ClipIDs for some tiles, resulting in incorrect clipping that caused flickering in some cases
2018-10-03 11:46:49 -07:00
Bruno de Oliveira Abinader
f3c8b92286 [core] Read style's transition from parser 2018-10-03 10:19:17 -07:00
Bruno de Oliveira Abinader
19179e08bc [core] Do not constrain on X axis in ConstrainMode::HeightOnly 2018-10-02 06:16:13 -07:00
Konstantin Käfer
2ea0833ecf [core] don't break ascent in the overscaled tile phase
We optimize our updateRenderable algorithm by breaking ascent when we've already checked a certain tile. So far, we've compared the UnwrappedTileIDs, but they don't include the overscale component. When ascending through overscaled tile IDs, we've stopped the ascent too early, when we should've kept the search going.
2018-09-21 12:12:35 +02:00
Ander Conselvan de Oliveira
f49a9ca1de [core] Don't log GL renderer string on every context initialization
Commit 1c53dc9ca8 ([core] Refactor vertex array object extension
initialization) changed where the GL renderer string is checked in order
to prevent the vertex array extension initialization in certain
platforms and in doing so made the logging of that string more frequent,
once per context initialization instead of at most once per process.
This is a lot more verbose, specially when running unit tests, so make
sure that string is logged at most once as it was previously.
2018-09-21 09:45:35 +03:00
Chris Loer
bee9a544bf [docs] First uncompressed shader source diff 2018-09-19 16:19:28 -07:00
Chris Loer
f7a69d15ab [docs] Include uncompressed shader source in .cpp comments
This is meant to
(1) Make it easier for new developers to find the source
(2) Make it easier to look at shader diffs when the GL JS pin changes
2018-09-19 16:19:28 -07:00
Chris Loer
ab8b6b74dc [test] Bump gl-js pin. 2018-09-19 14:54:38 -07:00
John Firebaugh
2e93a9ddcf [core] For string-valued properties, do coercion rather than assertion 2018-09-19 14:54:38 -07:00
John Firebaugh
89b075f592 [core] Auto-convert concat arguments to strings 2018-09-19 14:54:38 -07:00
Molly Lloyd
80bdbebdfe [core] prevent crash when expression for pattern evaluates to "" (#12896)
when a source-expression like `["get", "property"]` evaluates to null and the default pattern value (empty string) is used, make sure attribute buffers get populated to avoid crashing the app
2018-09-18 17:31:44 -07:00
Ander Conselvan de Oliveira
68d463ec28 [core] Disable debugging extension when running on ANGLE over Direct3D
The ANGLE implementation of GL_KHR_debug on Direct3D seems to be broken
leading to a bad_alloc being thrown when running with a debug build, so
disable it in that platform.
2018-09-14 15:26:45 +03:00
Ander Conselvan de Oliveira
1c53dc9ca8 [core] Refactor vertex array object extension initialization
Currently the vertex object extension is disabled through an ifdef for
the Windows platform due to an issue with ANGLE, while there is a
blacklist for other platforms. Unify those by adding ANGLE to that
blacklist and some small refactoring.
2018-09-14 15:26:45 +03:00
John Firebaugh
20adb486f7 [core] Make "to-number" of null behave as documented 2018-09-13 15:55:34 -07:00
John Firebaugh
2c48b5a292 [core] Implement array assertion fallback behavior
This was added in gl-js in #7095.
2018-09-13 15:55:34 -07:00
John Firebaugh
c044dd88b2 [core] to-color should be idempotent
Ports https://github.com/mapbox/mapbox-gl-js/pull/7260.
2018-09-13 15:55:34 -07:00