Commit Graph

7459 Commits

Author SHA1 Message Date
Alexander Shalamov
4457f5ced9 Build default http stack if MBGL_PUBLIC_BUILD is set 2020-04-27 19:47:30 +03:00
Minh Nguyễn
13de47db26 [ios, macos] Match only one font name attribute at a time 2020-04-24 13:46:40 -07:00
Minh Nguyễn
9548365904 [ios, macos] Added and updated documentation 2020-04-24 13:46:40 -07:00
Minh Nguyễn
0588c50b09 [ios, macos] Get glyph metrics from font
Get glyph metrics from the font in the process of drawing each glyph into a bitmap context. These metrics result in more accurate kerning and better aligned baselines than the previous hard-coded values.

Align iOS/macOS local glyph rasterization test fixture to Qt.
2020-04-24 13:46:40 -07:00
Minh Nguyễn
bcfdbd187d [ios, macos] Avoid redundant fallback in font cascade list
A font descriptor should not be a fallback for itself.
2020-04-24 13:46:40 -07:00
Minh Nguyễn
c4c35449cb [ios, macos] Choose fonts from font stack that match local fonts
Prefer local fonts that match the names specified in the font stack (from the text-font layout property), except for the last resort fonts that mbgl hard-codes. Fall back to the list of fallback CJK fonts in user defaults, then the fonts passed in through the platform-agnostic interface (that come from Info.plist). Explicitly use the first font descriptor in the cascade list instead of the system default of Helvetica.

Since the font stack can vary from one rasterization operation to the next, avoid caching the resolved font for now. Removed null checks that are unrealistic given the Core Text API contract.
2020-04-24 13:46:40 -07:00
Minh Nguyễn
9b78a156de [ios, macos] Take font family names from user defaults
Take font family names from user defaults before falling back to font family names in Info.plist.
2020-04-24 13:46:40 -07:00
Minh Nguyễn
f97ca0ccf9 [ios, macos] Allow specifying multiple fonts or font families for local font rendering
mbgl::Renderer and mbgl::MapSnapshotter can now contain a list of font family names, font display names, and font PostScript names, each name separated by a newline.
2020-04-24 13:46:40 -07:00
Minh Nguyễn
cb3d9eab49 [ios, macos] Fixed receiving local file URL response 2020-04-24 10:27:29 -07:00
Bruno de Oliveira Abinader
1798bda981 Fix compilation issues on GCC 9 2020-04-22 21:36:00 +03:00
Mikhail Pozdnyakov
d8639e2f9c [core] Database file source does not return stored tiles for volatile resources
The `DatabaseFileSource.VolatileResource` test is included.
2020-04-22 19:21:56 +03:00
Mikhail Pozdnyakov
3bebd13d2e [core] Add Resource::StoragePolicy and consider it in resource loader 2020-04-22 19:21:56 +03:00
Thiago Marcos P. Santos
78b0988525 [node] Blacklist Node ABI 83
Not supported at the moment
2020-04-21 22:42:56 +03:00
Sudarsana Babu Nagineni
dc86c60436 [build] Fix the output path of the iOS ccache scripts
iOS ccache wrapper scripts should be in the top level
of the CMake build tree, so fix the output path in the
configure_file().
2020-04-21 17:58:32 +03:00
Minh Nguyễn
af048481b1 [macos] Fixed minimum deployment target 2020-04-20 19:06:12 -07:00
Mikhail Pozdnyakov
64cbc9911d [core] Introduce Resource::minimumUpdateInterval
Introduce `Resource::minimumUpdateInterval` and consider it in the online file source.

The `minimumUpdateInterval` is used to throttle the requests, which were initiated due to resource expiration.
2020-04-20 21:54:31 +03:00
Thiago Marcos P. Santos
ee1d700a9b [core] Add platform abstractions for utils::now()
Some platforms might require special permissions or custom APIs
to access the current time of the day.
2020-04-20 19:03:46 +03:00
Bruno de Oliveira Abinader
f856396131 [core] Fix -Werror={pessimizing,redundant}-move from GCC 9 2020-04-20 14:37:24 +03:00
Gali Nelle
fea8a83e7f Introduce a mean to add render features in layers with no sources
This change also uses the support in the LocationIndicator layer, to
return a point feature when queried in correspondence of the location
indicator.
2020-04-17 22:26:32 +03:00
Thiago Marcos P. Santos
0d0ae229eb [glfw] Fix clang-10 build
Implicit conversion from int to float.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
c570c7322d [node] Fix clang-tidy errors on the Node bindings headers
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
b49517b737 [core] Fix performance-unnecessary-value-param errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
542c11ae63 [core] Fix modernize-use-equals-default errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
7751e4be76 [core] Fix google-default-arguments errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
46fa691596 [core] Fix performance-unnecessary-value-param errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
c4cb026fa4 [core] Fix readability-redundant-member-init errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
dffe00feea [core] Fix readability-avoid-const-params-in-decls errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Juha Alanen
36175d57b4 [build] Disable benchmark for MacOS debug CI builds 2020-04-15 19:11:28 +03:00
Juha Alanen
39329516dd [android, ios] Increase benchmark repetition count
More repetitions give more stable results.
2020-04-15 19:11:28 +03:00
Kevin Li
be9ca95e9a [android] Fix onStyleImageMissing callback in Snapshotter not fired issue. (#16386) 2020-04-10 18:13:57 +08:00
Gali Nelle
209857f8ac Fix LocationIndicator Layer
This changes image size properties to be scales instead of pixel sizes.
The commit also adds fixes for handling image updates with the same ID,
adds tests for expressions in paint properties, as well as tests for using images
with pixel ratio greater than 1.
Finally it moves image-tilt-displacement and perspective-compensation properties
from layout to paint properties, and includes other minor cleanups.
2020-04-10 00:15:43 +03:00
Gali Nelle
8e581c88ea Make location indicator bearing a paint property
This change introduces a new property type, Rotation, that uses
a custom interpolator, and that is currently applied to
all style properties named "bearing", with a period attribute.
2020-04-08 14:00:26 +03:00
Gali Nelle
9a55c282fe Add LocationIndicatorLayer
New key is "G" in mbgl-glfw, cycling between no puck, centered
in the viewport and positioned in Tokyo.
2020-04-08 14:00:26 +03:00
zmiao
bf4c7340f3 [build] Fix undefined behavour sanitizer (#16375)
* [build] Fix integer overflow runtime error for core part

Temporarily remove circle ci UBSAN build precondition

* [build] Enable all of the ubsans

[build] Check runtime error

[build] Update UBSAN_OPTION

* [build] Add UBSAN blacklist

[build] Ignore system libraries

[build] Ignore vendor library

* [build] Fix implicit conversion runtime error in core

* [build] Fix division by zero runtime error

* [build] Add unfixed error to ubsan blacklist

* [build] Make UBSAN halt on error

Revert "Temporary remove build precondition"

* [build] Fix division by zero error

* [build] Make UBSAN officially work without FIXME prefix

* [build] Fix implicit conversion from int64_t to uint64_t

* [build] Rename style test json file name

* Address review findings
2020-04-07 16:30:30 +03:00
Igor Tarasov
69dc210598 [android] Remove forgotten JNI bindgings from android platform. (#16374)
Cleanup after PR #16356.
2020-04-03 12:56:03 +03:00
Igor Tarasov
338cfd1b33 [android] [build] [ci] Move Android JNI bindings code to mapbox-gl-native-android repo. (#16356) 2020-04-02 18:36:55 +03:00
Alexander Shalamov
ca1ae7604c [android] Add Android bindings 2020-04-01 16:18:55 -04:00
Thiago Marcos P. Santos
9e189e02b4 [darwin] Remove debug leftover
Remove debug leftover added by 9009089a93.
2020-03-31 01:59:41 +03:00
Thiago Marcos P. Santos
1c5e0ee31e [core] Fix misc-* errors
As reported by clang-tidy-8.
2020-03-30 23:37:44 +03:00
Thiago Marcos P. Santos
94d1c10727 [core] Fix readability-* errors
As reported by clang-tidy-8.
2020-03-30 23:37:44 +03:00
Thiago Marcos P. Santos
879a906efa [core] Fix bugprone-virtual-near-miss errors
As reported by clang-tidy-8.
2020-03-30 23:37:44 +03:00
Thiago Marcos P. Santos
ea19e817c0 [core] Fix bugprone-exception-escape errors
As reported by clang-tidy-8.
2020-03-30 23:37:44 +03:00
Thiago Marcos P. Santos
0f235ac6d5 [core] Fix bugprone-macro-parentheses errors
As reported by clang-tidy-8.
2020-03-30 23:37:44 +03:00
Thiago Marcos P. Santos
b4e9c0bd11 [core] Fix bugprone-too-small-loop-variable errors
As reported by clang-tidy-8.
2020-03-30 23:37:44 +03:00
Thiago Marcos P. Santos
31338c5d88 [core] Fix google-readability-casting errors
As reported by clang-tidy-8.
2020-03-30 23:37:44 +03:00
Thiago Marcos P. Santos
4362e27ab2 [core] Fix google-explicit-constructor errors
As reported by clang-tidy-8.
2020-03-30 23:37:44 +03:00
Thiago Marcos P. Santos
62b543e44a [core] Fix google-explicit-constructor errors
As reported by clang-tidy-8.
2020-03-30 23:37:44 +03:00
Thiago Marcos P. Santos
65f4df5190 [core] Fix google-readability-casting errors
As reported by clang-tidy-8.
2020-03-30 23:37:44 +03:00
Juha Alanen
488e550895 [build] Enable ccache for iOS CI builds
Now ccache can be optionally enabled. Enable it for CI builds.
By default it is disabled due to issues in some environments.
2020-03-27 17:57:28 +02:00
Bruno de Oliveira Abinader
7cf5350e3c [build] Use cheap-ruler-cpp provided via mapbox-base 2020-03-27 14:46:40 +02:00