Commit Graph

6792 Commits

Author SHA1 Message Date
John Firebaugh
e4b2ea0982 [ios, osx] Don't delete a mutex with an active lock
The lock is in place to enforce that `async` is not accessed if the request has been, cancelled. Therefore it's not necessary to hold the lock beyond setting cancelled to true, and in fact it's unsafe to so: if this is the last remaining shared reference, `delete this` will destroy the mutex. If the lock was held, it would then be orphaned.
2016-02-19 10:11:27 -08:00
Bruno de Oliveira Abinader
6792d78952 [tests] Use ENABLE_COVERAGE=1 envvar to enable coverage
This detaches coverage data collection from typical debug build.
2016-02-19 17:40:30 +02:00
Tobrun
6a2d910ccd [android] #4040 - disable resource prefix 2016-02-19 15:53:18 +01:00
Tom MacWright
d697028029 Hit missed lines in equality tests 2016-02-19 15:26:44 +01:00
Tobrun
9ec0103431 [android] #4018 - migrated max/min zoom to UiSettings + added tests + update sample app 2016-02-19 15:24:16 +01:00
Tobrun
27ed15c18c [android] #4017 - update unit test for MapboxMap 2016-02-19 15:22:56 +01:00
Tobrun
f2299c30c3 [android] #4015 - added unit test for CameraPosition 2016-02-19 15:21:35 +01:00
Jason Wray
21ce6fbdf9 [osx] Set default polyline and polygon color to the selected menu item color
Fixes #3927
2016-02-18 19:27:49 -05:00
Jason Wray
390057b569 [ios] Set default polyline and polygon color to the map view tint color
Fixes #3927
2016-02-18 19:23:15 -05:00
John Firebaugh
9c26f06318 [core] Thread GLObjectStore through to Holder objects
This eliminates the reliance on ThreadContext to provide GLObjectStore, and statically enforces that GL cleanup functions happen only when GLObjectStore::performCleanup is called.

With the elimination of the Map thread, this becomes important because there may be multiple GLObjectStore's per-thread, and Map will need to ensure that the correct context is active when calling GLObjectStore::performCleanup.
2016-02-18 15:15:24 -08:00
John Firebaugh
7b39ce9521 [core] Remove ThreadContext::getFileSource; instead thread FileSource through 2016-02-18 15:15:24 -08:00
John Firebaugh
d5eb5240f8 Revert "[gl] Updated CustomLayer tests"
These tests are intended to reflect how someone using the custom layer feature might actually write their callbacks. Therefore the callbacks should not use mbgl-specific classes.

This reverts commit 69112a2a09.
2016-02-18 15:15:24 -08:00
Minh Nguyễn
a57a88a038 [ios] Clarified manual installation instructions
People are used to dragging frameworks into the Linked Frameworks and Libraries section, but the SDK only works when embedded inside the application.

Fixes #4011.
2016-02-18 13:26:54 -08:00
Minh Nguyễn
87f28f3f44 [osx] Typo in readme 2016-02-18 10:46:01 -08:00
Brad Leege
fd96b3e1c7 [android] #3119 - Updating mapbox_access_token Name in developer-config.xml 2016-02-18 12:14:11 -06:00
Brad Leege
e2bbfc19c5 [android] #3119 - Updating mapbox_access_token Name in developer-config.xml 2016-02-18 12:12:42 -06:00
Brad Leege
09cac18420 [android] #3897 - Refactoring check that determines when to send turnstile event 2016-02-18 11:23:34 -06:00
Brad Leege
5497973bd7 [android] #3897 - Updating TestApp versionCode and versionName to make testing easier to spot 2016-02-18 11:23:34 -06:00
Brad Leege
43f8e6f1a7 [android] #3897 - Changing initial flush delay time to 10 seconds 2016-02-18 11:23:34 -06:00
Brad Leege
7c1cef45e3 [android] #3897 - Initial Map Load event 2016-02-18 11:23:34 -06:00
Brad Leege
5da1e2bc7d [android] #3897 - Initial Turnstile event with when to push logic infrastructure 2016-02-18 11:23:33 -06:00
Tobrun
e4fa1816a7 [android] #4009 - add tests for tracking settings, optimise architecture to make it testable through unit tests 2016-02-18 16:06:10 +01:00
Bruno de Oliveira Abinader
dd7bbc024a [tests] Fix 'linux' debug build on OSX 2016-02-18 17:02:08 +02:00
Bruno de Oliveira Abinader
cdfe4e46aa [tests] Added coverage report target 'check'
Issuing 'make check' now collects unit tests coverage data and generates
a report in HTML.
2016-02-18 15:01:58 +02:00
Bruno de Oliveira Abinader
ec97264431 [osx] Enable coverage support for debug build 2016-02-18 15:01:58 +02:00
Bruno de Oliveira Abinader
d5da86b098 [linux] Enable coverage support for debug build 2016-02-18 15:01:58 +02:00
Bruno de Oliveira Abinader
d900e7a9a3 [tests] Bumped KIF hash
Commit 766ff59663f19222993ed32e5be36894bcb6949d removes a generated
.gcda file that prevents proper lcov usage.
2016-02-18 15:01:58 +02:00
Tobrun
1180df00f2 [android] #4007 - improve coverage geometry package 2016-02-18 13:32:41 +01:00
Bruno de Oliveira Abinader
dcbdfde932 [core] Use RVO in PremultipliedImage::decodeJPEG 2016-02-18 13:27:35 +02:00
Bruno de Oliveira Abinader
3762dcfb82 [gl] Refactor texture pool cleanup
Texture pool now allocates a block of 64 textures per time. Each block
contains a TextureObject which handles GL object lifetime. Blocks can be
added or removed according to the following rules:

1. If pool is empty, created a new block upon first call (lazy load);
2. Iterate blocks to find an available texture ID:
- If found, remove that from the list of available IDs for that block
  and return its ID.
- Othewise, allocate a new block and grab an available ID from that.
3. When releasing a texture ID, check if the associated block is free.
If no IDs are currently in use, then abandon its TextureObject and
remove the block from the pool.
2016-02-18 13:27:35 +02:00
Bruno de Oliveira Abinader
69112a2a09 [gl] Updated CustomLayer tests 2016-02-18 13:27:35 +02:00
Bruno de Oliveira Abinader
93cfca4d4e [gl] Added mbgl::gl::VAOHolder 2016-02-18 13:27:35 +02:00
Bruno de Oliveira Abinader
124173080f [gl] Added mbgl::gl::Texture{,Pool}Holder 2016-02-18 13:27:35 +02:00
Bruno de Oliveira Abinader
3397398c1f [gl] Added mbgl::gl::BufferHolder 2016-02-18 13:27:35 +02:00
Bruno de Oliveira Abinader
a503233d1c [gl] Added mbgl::gl::ShaderHolder 2016-02-18 13:27:35 +02:00
Bruno de Oliveira Abinader
69fa8fe3c0 [gl] Added mbgl::gl::ProgramHolder 2016-02-18 13:27:35 +02:00
Bruno de Oliveira Abinader
bfafc360a7 [gl] Moved TexturePool to gl namespace 2016-02-18 13:27:35 +02:00
Bruno de Oliveira Abinader
1336e3e30f [gl] Moved GLObjectStore to gl namespace 2016-02-18 13:27:35 +02:00
Bruno de Oliveira Abinader
47d6099242 [gl] Use Buffer::getID() whenever possible 2016-02-18 13:27:35 +02:00
Bruno de Oliveira Abinader
0386dc7a4e [gl] Use Shader::getID() whenever possible 2016-02-18 13:27:35 +02:00
Bruno de Oliveira Abinader
ee72e93f94 [gl] Moved VAO helpers to common header 2016-02-18 13:27:35 +02:00
Tobrun
cd13e2b769 [android] #4005 move annotations to correct package 2016-02-18 11:48:10 +01:00
Tobrun
a24d06b992 [android] #4003 - add unit tests for InfoWindow 2016-02-18 11:46:48 +01:00
Tobrun
daedb3ddb2 [android] #4000 - add unit tests icon 2016-02-18 10:21:12 +01:00
Tobrun
a331e94b1b [androd] #3119 - use resourcePrefix for library resources 2016-02-17 09:57:57 +01:00
Tobrun
94c5c2e203 [android] #2816 - make save instance state robuster + cleanup some old permission annotations 2016-02-17 09:56:34 +01:00
Bruno de Oliveira Abinader
44ec2ad0ee [tests] Fix compilation error in test/storage/headers.cpp
error: converting ‘false’ to pointer type for argument 1 of ‘char
testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’
[-Werror=conversion-null]
2016-02-16 23:30:26 +02:00
Thiago Marcos P. Santos
1efc299e66 [core] Faster access with unordered_set
The ordering won't be affected because requests are made
as they arrive and later stored on the map just for
keeping state.
2016-02-16 23:06:04 +02:00
Thiago Marcos P. Santos
f5b521ffb5 [core] Remove requests from the pending queue on cancel
If we don't do this, we can activate a request twice.

The issue here is that we use memory address as the 'key'. So if
we destroy a request, another request might take the same memory
address, or the same 'key'.

The entry at 'pendingRequests' survives the 'cancel()' and is
ultimatelly removed at 'activatePendingRequest()'. This is fine
unless a request is created using the same 'key' before we call
'activatePendingRequest()'.

The check if the request was canceled at 'activatePendingRequest()'
will be no longer valid, activating the request. At the same time
the request will be activated again by the task scheduled at the
constructor of the 'OnlineFileRequestImpl' class.
2016-02-16 23:06:04 +02:00
John Firebaugh
d66d145c6e [core] Remove RunLoop::{ref,unref} 2016-02-16 12:48:50 -08:00