Commit Graph

10090 Commits

Author SHA1 Message Date
Bruno de Oliveira Abinader
f28d75dccd [Qt] FBO handling should happen outside of QMapboxGL::render 2017-03-01 09:25:52 -08:00
Ivo van Dongen
74d42a45e2 [android] keep default file source alive for the duration (#8226) 2017-03-01 11:33:51 -05:00
Jesse Bounds
0027f5cdc2 [ios] Pause file source activity on background
This uses the pause/resume API on the default file source to pause
network and revalidation activity when the host iOS application goes
into the background. Activity is resumed when the host application goes
into the foreground.

The intention of this change is to avoid edge cases on some OSs where
resources (i.e. sqlite) are not available when the host app is not
visible to the user.
2017-03-01 08:25:44 -08:00
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
Pablo Guardiola
c689eed273 [android] add line starts with a semicolon and empty statement checkstyle rules and fix related checkstyle issues (#8231) 2017-03-01 10:45:22 -05:00
Tobrun
f44e4eb2de Only listen to connectivity broadcast events when needed (#8222)
* [android] - only listen to connectivity change events when needed.

* [android] - fix compile var args warning, remove redundant test
2017-03-01 09:46:47 -05:00
Jordan Kiley
a46a57027e [iOS] Replaced gifs from gesture recognizer guide (#8227)
* [ios] replaced gifs
2017-02-28 21:36:40 -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
Konstantin Käfer
c3ed1f51ca [core] remove gl.hpp include from shader headers 2017-02-28 18:28:41 -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
Ivo van Dongen
f8766f704a [android] fix unit tests for #7944 2017-02-28 14:05:14 -08:00
John Firebaugh
e18f60229e [core] There's only ever one icon quad 2017-02-28 13:59:14 -08:00
John Firebaugh
02d56488e4 [core] Eliminate Shaping::text
This was already accessible via SymbolFeature::text.
2017-02-28 13:59:14 -08:00
John Firebaugh
0d741b3439 [core] Release compareText after symbol preparation
It's a temporary structure and not needed for placement.
2017-02-28 13:59:14 -08:00
Tobrun
34fef22d95 [core] [android] - allow zooming/scaling to use AnimationOptions (#8181)
[glfw] - allow glfw binding to use AnimationOptions instead of using direction directly
2017-02-28 13:22:47 -05:00
Ivo van Dongen
05ec852885 [android] raise checkstyle file length limit 2017-02-28 09:33:04 -08:00
Ivo van Dongen
99786e1e3f [android] insert layer at index 2017-02-28 09:33:04 -08:00
Ivo van Dongen
a9d2929819 [android] remove layer at index 2017-02-28 09:33:04 -08:00
Ivo van Dongen
dc21396d71 [android] insert layer above 2017-02-28 09:33:04 -08:00
Ivo van Dongen
3040d40772 [android] remove source returns reference 2017-02-28 09:33:04 -08:00
Ivo van Dongen
fedb21e35b [android] remove layer returns reference 2017-02-28 09:33:04 -08:00
Ivo van Dongen
609cdb0fd7 [android] fix ownership of style layer after delete 2017-02-28 09:33:04 -08:00
Ivo van Dongen
f0de56cffa [android] source list accessor + example 2017-02-28 09:33:04 -08:00
Ivo van Dongen
ec1dc2622b [android] layer list accessor + example 2017-02-28 09:33:04 -08:00
Ivo van Dongen
62e85c1224 [android] add unknown source type 2017-02-28 09:33:04 -08:00
Ivo van Dongen
3e48b377fd [android] add unknown layer type 2017-02-28 09:33:04 -08:00
Pablo Guardiola
283aee0754 [WIP] InfoWindow refactor (#8080)
* [android] remove unnecessary info window class and add bubble layout

* fix some PR comments (remove hungarian notation, make bubble popup helper package protected and fix some code style issues)

* refactor replace enum in favor of intdef

* make bubble layout package protected and remove useless info window tip view class
2017-02-28 11:48:40 -05:00
Tobrun
8e9d6a5b2c [android] - don't allow transforming to the same camera position, ignore redundant updates. (#8134) 2017-02-28 10:57:08 -05:00
Tobrun
809d8248b3 Fix a NPE that occurs when MapView is initialized with a null MapboxMapOptions (#8131) 2017-02-28 09:18:49 -05: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
Tobrun
47dcfe7d44 [android] - add javadoc to test activities. (#8203)
* [android] - add javadoc to test activities.

* fix checkstyle issue
2017-02-27 23:56:06 +01:00
Tobrun
147654a46b [android] - reverse compass direction (#8130) 2017-02-27 14:22:25 -05:00
John Firebaugh
c70bf6b2bf [core] Reserve vector size 2017-02-27 09:36:20 -08:00
John Firebaugh
73c5d5c00a [core] Avoid some string copies in bidi implementation
As of C++11, it's safe to preallocate std::[u16]string and write to the buffer via &s[0] (C++17 makes it possible via .data() as well).
2017-02-27 09:36:20 -08:00
Thiago Marcos P. Santos
92e6e48699 [glfw] Make P pause/resume the network thread
Simple test of the DefaultFileSource pause/resume API.
2017-02-25 14:03:38 +02:00
Thiago Marcos P. Santos
4c2e720b15 [core] Add a pause/resume API to the DefaultFileSource
It will halt the networking thread completely. Expired and error'ed
tiles won't get re-requested until resume() is called again.
2017-02-25 14:03:38 +02:00
Thiago Marcos P. Santos
bc5e9afd0d [tests] Added unit tests for Thread::pause/resume 2017-02-25 14:03:38 +02:00
Thiago Marcos P. Santos
86300ccedf [core] Add pause/resume to the Thread class
Make a thread completely halt and not process any message on
the message queue until resume() is called.

Sending a sync message to a halted thread will result on
a deadlock, thus the assertion.

Deleting a paused thread will trigger a resume.
2017-02-25 14:03:38 +02:00
Ivo van Dongen
465c949153 [android] jni high level binding refactor 2017-02-24 17:54:20 +02:00
Jesse Bounds
7d9018093a [ios, macos] Make source removal consistent with layer removal
This refactors the source removal methods to make them consistent
with the way layers are removed. This makes removal of nonexistent
sources and removal of sources of a different type but same
identifier as a previously added source a no-ops.

As with layers, the check at the top of the method to ensure that the
raw pointer is the same as the one in mbgl for the same
identifier string should make it impossible to attempt to remove
a source of a different type than the one in mbgl for the same
identifier. However, for consistency with the layer implementation,
the reinterpret_cast has been replaced with a dynamic_cast and check
for nullptr.
2017-02-23 15:07:43 -08:00
Ivo van Dongen
d1f444d63e [android] remove nonexistent layer or source handling 2017-02-23 15:07:43 -08:00
Jesse Bounds
59820fb63d [ios, macos] Simplify implementation of layer removal from map view
This reverts a previous change that recreated the pending and raw
layer pointers if an identifier match caused a layer to be removed
but the removed layer was of a different type than the layer triggering
the removal

This refactors the pointer replacement to use a simpler solution that
returns early if the layer does not have a raw pointer loaded in the
mbgl map instance.
2017-02-23 15:07:43 -08:00
Jesse Bounds
de1913e223 [ios, macos] Update changelog for style and layer removal behavior 2017-02-23 15:07:43 -08:00
Jesse Bounds
c0718a863d [core, ios, macos] Return null when removing nonexistent source 2017-02-23 15:07:43 -08:00
Jesse Bounds
e860fa6f0a [ios, macos] Recreate pending and raw layer ref when layer is removed 2017-02-23 15:07:43 -08:00
Eimantas Vaiciunas
76b3825360 [core] Return null when removing nonexistent layer
In case of exception, silently ignore removal of nonexistent layer
and return nullptr
2017-02-23 15:07:43 -08:00
Konstantin Käfer
6b0ad899b3 [node] adhere to node module naming requirements
https://nodejs.org/api/addons.html#addons_building specifies that "The module_name must match the filename of the final binary (excluding the .node suffix).". While the mismatch between `mapbox-gl-native` and `mapbox_gl_native` hasn't caused issues so far, we should play by the book.
2017-02-23 22:15:57 +01:00
Pablo Guardiola
87be62f9e4 [android] fix units in runtime styling javadoc (#8161) 2017-02-23 19:47:40 +01:00
Thiago Marcos P. Santos
d2469f4bdb [build] Fix build on Ubuntu 16.04+
gtest was broken because of lack of CXX11ABI support.
2017-02-23 18:39:40 +02:00