Commit Graph

452 Commits

Author SHA1 Message Date
Konstantin Käfer
e2bcea90fc [core] use #pragma once instead of ifdef include guards 2016-05-25 21:35:37 +02:00
Bruno de Oliveira Abinader
1769e6fcb4 [core] Move GLFW stencil clip debug to core
This makes the stencil clip debug available to all platforms.

Fixes #4669.
2016-05-24 19:58:24 +03:00
Konstantin Käfer
8ee222c45e [core] allow creating optional requests
Introduces "optional" requests. These should be fulfilled by the FileSource only there's a low-cost/easy way to obtain the data (e.g. from a local cache). If the data for an optional request cannot be found, it *must* return a Response object with a NotFound error.

Traditional "required" requests still work the same way, with one change: If you set any prior* field in the Resource (i.e. priorModified, priorEtag, or priorExpires), the DefaultFileSource assumes that you already have the cache value and will not consult the cache before performing the request. If a prior cache lookup didn't turn up any data, and you therefore don't have an Etag or Modified value, you can still skip the cache by setting priorExpires. This will of course always result in a non-conditional HTTP request.
2016-05-18 12:40:22 +02:00
Konstantin Käfer
cd65a43855 [core] move from microsecond precision timestamp to integer second precision 2016-05-13 17:24:22 +02:00
Konstantin Käfer
3bde525711 [core] remove indirection via Task object in DefaultFileSource 2016-05-12 15:13:21 +02:00
Bruno de Oliveira Abinader
c13dd32242 [core] Added Viewport mode
Satisfies embedding platforms that requires the viewport coordinate
systems to be set according to its standards e.g. viewport mirrored
vertically.
2016-05-11 15:48:51 +03:00
Konstantin Käfer
7332ae0073 [core] retain tiles differently and remove old TileID class 2016-05-10 14:50:56 +02:00
John Firebaugh
34f9618d31 [core] Replace boost::lexical_cast with std::to_string
This removes the only boost dependency from public headers.
2016-05-02 13:08:51 -07:00
John Firebaugh
c1ad321485 [linux] Build with GCC 5 (#4901)
* [linux] Build with GCC 5

* [build] -fabi-version=0 is the default for GCC 5
2016-04-29 09:57:21 -07:00
Thiago Marcos P. Santos
94093493d5 [glfw] Atomic is no longer needed
All View events come from the same thread.
2016-04-28 16:15:07 +03:00
John Firebaugh
b39f22e6b6 [core] Refactor getRegionCompletedStatus; add completedTileCount; add tests 2016-04-27 13:41:29 -07:00
Brent Whitman
a706a2a48d [ios, osx] Add a property for bytes used by offline tiles 2016-04-27 13:41:29 -07:00
Bruno de Oliveira Abinader
a2a6e22bdd [glfw] Workaround for OS X (#4666) 2016-04-15 12:18:16 -07:00
John Firebaugh
6e78eabfff [core] Clean up ThreadContext vestiges 2016-04-15 09:56:18 -07:00
John Firebaugh
3af3e72bb3 [all] Replace HTTPContextBase/HTTPRequestBase with FileSource 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
John Firebaugh
db9fb97ea8 [test] Fix use of uninitialized dimensions value (#4697)
Instead of calling resize, which would compare against the uninitialized dimensions values, initialize dimensions and needsResize directly.
2016-04-13 18:00:46 -07:00
John Firebaugh
c3bed1dab8 [core] Fix race condition that could lead to a UNIQUE constraint failure (#4677) 2016-04-11 19:46:45 -07:00
Konstantin Käfer
65acf35dcf [core] fix various compilation issues 2016-04-04 16:20:04 -07:00
John Firebaugh
08c9406ed4 [node] Run rendering tests on Bitrise OS X 2016-04-01 09:26:10 -07:00
Bruno de Oliveira Abinader
01a0f5464d [glfw] Fix random point generation 2016-04-01 10:21:59 +03:00
John Firebaugh
77b0723476 [ios, osx, linux] Remove unused "applicationRoot" function 2016-03-31 17:08:00 -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
Konstantin Käfer
61920071cd [core] split headless_view.cpp into implementation-specific files
also adds a EAGL implementation for iOS
2016-03-22 11:56:01 -07:00
Thiago Marcos P. Santos
baf30cd1f7 [glfw] Main loop integration
This new code can be used for rendering on the Main thread
while it will also work for rendering on the Map thread
before we make the switch. Needed by #2909.
2016-03-21 23:58:48 -03:00
John Firebaugh
967b6c7248 [core] Stop any OfflineDownload before deleting a region
No progress events should be processed after deleting a region.
2016-03-21 12:41:17 -07:00
John Firebaugh
90d271709f [core] Add additional logging for exceptions during database connection / creation
Refs #4382
2016-03-18 17:09:43 -07:00
Thiago Marcos P. Santos
115a5d10f9 [core] Fix regression of prior expiration time not being respected 2016-03-18 00:10:50 -03:00
Thiago Marcos P. Santos
0c3247bf3c [core] Fix regression of prior expiration time not being respected 2016-03-17 23:57:28 -03:00
Bruno de Oliveira Abinader
4909169996 [core] Added user-defined transition properties when modifying classes 2016-03-18 01:26:22 +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
7a509b0369 [linux] Added world tour to GLFW test app 2016-03-14 11:51:37 +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
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
672727f773 [core] Make OnlineFileSource respect the NetworkStatus
The user can now force the Offline mode and set it back
to Online, triggering the requests waiting for network connection.
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
John Firebaugh
eb9b463841 [core] Fix offline status reporting with pre-existing tiles (#4147) 2016-03-04 15:15:09 -08:00
Bruno de Oliveira Abinader
4994b3dc57 [core] PrecisionPoint is now ScreenCoordinate 2016-03-01 20:58:54 +00:00
Thiago Marcos P. Santos
f683b10e10 [core] Build fix
Fix no viable conversion on OSX.
2016-02-26 04:21:28 +02:00
Thiago Marcos P. Santos
59a45b8400 [core] Add timeout for clock skew
If the server keeps sending replies considered from the client in the
past (there is no way to tell if the server or client clock is wrong),
the client will try to interpolate a valid expiration time based
on the delta of the expiration intervals sent by the server.

If the intervals are always the same, exponential backoff kicks in
until we get a different expiration time from what we already have.
2016-02-26 03:52:02 +02:00
Thiago Marcos P. Santos
843cad04fb [core] Add retry delay on expired tiles
When we receive an expired tile, we don't immediately retry
because in case the server keeps serving an expired tile, that
would cause an infinite retry cycle.

Now we add an exponential delay, similarly to what we do for
connection errors.
2016-02-26 03:20:51 +02:00