Commit Graph

710 Commits

Author SHA1 Message Date
Thiago Marcos P. Santos
a0146e372f [tests] Accept [C|c]onnect as error message
Qt will spit "Connect" instead of "connect"
2016-04-20 20:55:51 +03:00
Minh Nguyễn
da88060c5c [ios, osx] Fixed project upgrade warnings
Fixed project upgrade warnings in projects managed by gyp.
2016-04-16 22:46:25 -07:00
John Firebaugh
2fcfc2a939 [ios] Don't try to launch test server (#4719) 2016-04-15 13:18:31 -07:00
John Firebaugh
1ee0055710 [core] Eliminate MapData 2016-04-15 09:56:18 -07:00
John Firebaugh
ed489e7649 [core] Remove MapData dependency from Style 2016-04-15 09:56:18 -07:00
John Firebaugh
ce4270b01c [core] Convert MapContext to Map::Impl; eliminate indirection 2016-04-15 09:56:18 -07:00
John Firebaugh
6e78eabfff [core] Clean up ThreadContext vestiges 2016-04-15 09:56:18 -07:00
John Firebaugh
b55692132a [tests] Use StubFileSource where a real FileSource is not required 2016-04-14 14:18:19 -07:00
John Firebaugh
7de9e196d7 [tests] Rationalize storage tests
Properly divide Storage tests into DefaultFileSource, OnlineFileSource, and HTTPFileSource tests.
2016-04-14 14:18:19 -07:00
John Firebaugh
6d88a23a60 [core] Remove internal threading from OnlineFileRequest
There's no need to do the work that OnlineFileRequest does on a separate thread from the DefaultFileSource thread, and having AsyncTasks proxy to other tasks across a thread boundary adds needless complexity.
2016-04-14 14:18:19 -07:00
John Firebaugh
204c7fee03 [core] Render from the main thread
Do not create a thread for the MapContext anymore.
2016-04-14 13:44:08 -07:00
John Firebaugh
18d8e80f52 [core] Demote "Unable to make space for entry" message from Warning to Debug (#4708) 2016-04-14 13:43:24 -07:00
Konstantin Käfer
618b9f1dbf [darwin] use CFRunLoopSourceInvalidate() to also cancel any pending AsyncTask invocations 2016-04-12 12:46:59 -07:00
John Firebaugh
1209ae4213 [test] This "very unlikely" condition in fact happens regularly in CI (#4679) 2016-04-11 16:31:56 -07:00
John Firebaugh
1c7c5af69d [ios] Run core unit tests in CI 2016-04-11 11:00:34 -07:00
John Firebaugh
f964e40e7e [build] Refactor and simplify build system
* Main gyp files are now standardized as platform/<platform>/platform.gyp.
* Each platform gyp file defines appropriate loop_lib and headless_lib variables.
* Each platform gyp file includes mbgl.gypi, which defines base targets which may be useful to all platforms.
* CI targets are consistent across platforms: `make $(PLATFORM) && make test-$(PLATFORM)`.
* Renamed the "linux" test app to "glfw". It's now built in OS X CI.
* Android build flakiness is fixed.
* iOS CI builds the bench and iosapp targets.
* Mesa version is now in one place.
* CI scripts use bash "strict mode" and correct error handling.
* All build output goes to the build directory.
* Removed vestigial iOS/OS X/Android Travis scripts.
2016-04-07 18:01:02 -07:00
Ansis Brammanis
415ea295c5 [core] make sprite metrics checking stricter
- check that sprite metrics are within the bounds of the sprite. fix #714
- make sprite metrics problems Errors instead of Warnings
- check for negative image width, height
2016-03-31 10:27:42 -07:00
John Firebaugh
5eda74a514 Merge branch 'release-ios-3.2.0-android-4.0.0' 2016-03-30 17:43:37 -07:00
John Firebaugh
13882a31e4 [core] Set schema version to 3 after upgrading
The migration was upgrading the schema, but not the schema version. As a result, the (expensive) migration was running every time an OfflineDatabase was constructed with a v2 database.

Fixes #4501
2016-03-28 17:28:44 -07:00
John Firebaugh
169755e89a [core] Unify FileRequest and WorkRequest 2016-03-24 10:54:32 -07:00
John Firebaugh
2f9e6f4e94 [core] Allow the use of special characters in property field names
Fixes #4336
2016-03-23 17:15:18 -07:00
Thiago Marcos P. Santos
f854368f29 [tests] Mark some tests as requiring server
Otherwise they will fail on iOS with connection error.

Fixex #4434
2016-03-23 09:53:08 -07:00
Jason Wray
8bdfca53ae [tests] fix make iproj copy phase for unit text fixtures 2016-03-22 17:06:33 -07:00
John Firebaugh
220a57b36f [tests] Tweak offline tests to work on iOS 2016-03-22 11:56:01 -07:00
Konstantin Käfer
c587eefbb1 [ios] make unit tests work on iOS and iOS Simulator 2016-03-22 11:56:01 -07:00
Konstantin Käfer
db5ac4785f [test] rearrange test files so they're not in the fixtures folder 2016-03-22 11:56:01 -07:00
Konstantin Käfer
1dd81d9776 [test] remove crc64 and compare images
boost's crc64 breaks on iOS
2016-03-22 11:56:01 -07:00
Thiago Marcos P. Santos
0e201eb23d [tests] Add utest to make sure prior expiration time is being respected 2016-03-17 23:57:28 -03:00
Bruno de Oliveira Abinader
cd1a06c2dc [core] Get rid of MapData::{get,set}animationTime 2016-03-18 01:27:48 +02:00
Bruno de Oliveira Abinader
01edd4503c [core] Move class handling to Style 2016-03-18 01:26:22 +02:00
Bruno de Oliveira Abinader
ac70ada2d3 [core] Check for NaNs in mbgl::util::{min,max,clamp} 2016-03-18 00:53:14 +02:00
Jesse Bounds
bcb3bb0931 [core] Stop download when tile limit is reached
The tile limit guard (when used) stops a download from continuing
when the tile limit is reached. This wraps the guard in a method
and employs it in both places currently necessary to ensure the
guard has a chance to function. Tests have been updated to
ensure the fix works for a less trivial tile limit scenario.
2016-03-17 15:52:18 -07:00
John Firebaugh
5130ca8843 [core] Implement a vacuum strategy for the offline database
Enable `PRAGMA auto_vacuum = INCREMENTAL`, and perform a `PRAGMA incremental_vacuum` when deleting an offline region.
2016-03-17 14:17:59 -07:00
Bruno de Oliveira Abinader
fc0a0ef98a [core] Always return wrapped coordinates
This fixes an issue in both iOS and Android when e.g. adding a marker on
both sides of the dateline border in Taveuni island, the marker in one
of the sides would have an out-of-bounds longitude.
2016-03-14 12:16:55 +02:00
Bruno de Oliveira Abinader
b5bb48edaa [core] Simplify LatLng::unwrapForShortestPath usage
Simplify LatLng::{wrap,unwrapForShortestPath} code, avoiding duplicated
code between Transform::{latLngToScreenCoordinate,easeTo,flyTo}.

Added unit tests for camera usage in Transform to detect cases like e.g.
crossing the antimeridian as a shortest path between two coordinates.

Transform::flyTo precision loss to be handled in #4298.
2016-03-14 11:45:31 +02:00
Bruno de Oliveira Abinader
fe7e208b42 [core] Implement LatLng::null() 2016-03-13 21:38:20 +02:00
Bruno de Oliveira Abinader
8e30a4a080 [core] Harden Transform anchor & padding usage
Use optional values for anchor & padding in Map and Transform functions
instead of NaNs. Added unit tests to stress some edge cases.
2016-03-13 21:38:20 +02:00
Minh Nguyễn
4748973c04 [core] Deactivate offline region upon completion 2016-03-11 11:43:32 -08:00
Bruno de Oliveira Abinader
694a064cdd [core] Fix non-anchored Transform::setAngle
This reverts a line change from b33b2f15, because we explicitely want
the anchor to be invalid.
2016-03-11 16:53:36 +02:00
Bruno de Oliveira Abinader
f73beb5913 [core] Fix screen coordinates when crossing the antimeridian (#2)
Added missing case. Really fixes #4155 this time.
2016-03-11 12:34:21 +02:00
Bruno de Oliveira Abinader
3879bc6a4e [core] Make vec{2,3,4} operator bool explicit 2016-03-11 02:24:09 +02:00
Bruno de Oliveira Abinader
1a4b8f3e2f [core] Fix screen coordinates when crossing the antimeridian
If the center and point coordinates are not in the same side of the
antimeridian, we need to unwrap the point longitude to make sure
it can still be seen from the visible side of the antimeridian that is
opposite to the center side.

Fixes #4155.
2016-03-10 14:00:42 +02:00
Bruno de Oliveira Abinader
b33b2f1515 [core] Check for NaNs in EdgeInsets 2016-03-10 03:36:46 +02:00
Bruno de Oliveira Abinader
026b6d4c01 [core] Coordinate wrapping fixes
- Make returning LatLngs unwrapped by default.
- PointAnnotation and ShapeAnnotation are always wrapped so they can be
  selected via intersection from the visible tile boundaries.
- Fixes LatLng::wrap() calculation.
- Fixes LatLng::unwrapForShortestPath() calculation.

The new unwrapForShortestPath algorithm unwraps the start coordinate
either forwards or backwards depending on the end coordinate value, so
we can always cross the antimeridian when needed and still obtain a
wrapped end coordinate in the end.

Fixes #4214.
2016-03-10 03:36:45 +02:00
John Firebaugh
7cceca4b45 [core] Deactivate OfflineDownload when the tile count limit is hit
This is a better behavior than sending hundreds or thousands of tileCountLimitExceeded notifications.
2016-03-09 13:40:00 -08:00
John Firebaugh
e49c1e3da3 [core] Fix offline status reporting regressions
The core of the change is ensuring that ensureResource doesn't release Zalgo: it should be consistently async, rather than async in the case that the resource doesn't exist in the database, but sync if it does.

This ensures that status is reported in a more consistent sequence, regardless of the database state.
2016-03-08 10:28:33 -08:00
John Firebaugh
8fee0f33c0 [core] Fix RunLoop::run() behavior when called a second time 2016-03-08 10:28:01 -08:00
Thiago Marcos P. Santos
aaf9e8256f [tests] Add utest for NetworkStatus::Online/Offline 2016-03-08 10:31:01 -03:00
Thiago Marcos P. Santos
b8b283588f [core] Remove goOffline() from DefaultFileSource
Use the newly added NetworkStatus::Set().
2016-03-08 10:31:01 -03:00
John Firebaugh
a3791b2325 [core] Ensure OfflineRegionStatus::downloadState is accurately reported 2016-03-07 19:08:03 -08:00