Commit Graph

280 Commits

Author SHA1 Message Date
John Firebaugh
e802aedb8c [core, node, android] Remove used "base" parameter from setStyleJSON 2016-06-02 16:33:56 -07:00
Konstantin Käfer
cd65a43855 [core] move from microsecond precision timestamp to integer second precision 2016-05-13 17:24:22 +02:00
John Firebaugh
c8391729c7 [core] Use geometry.hpp feature type 2016-05-03 17:25:49 -07:00
John Firebaugh
7800445c85 [core] Use gyp's direct_dependent_settings to propagate variant cflags 2016-05-02 13:12:24 -07: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
a883ac9253 [osx] Build output goes to build/osx 2016-04-19 16:28:30 -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
Mike Morris
5832825427 add pitch to bin/render.cpp 2016-04-05 17:57:46 -04:00
John Firebaugh
8ac82e5a38 Add test script for offline database size comparison 2016-03-16 17:08:37 -07:00
John Firebaugh
def2c804e5 [test] Fix crash in offline binary 2016-03-15 15:53:42 -07:00
John Firebaugh
12993531c0 [bin] Add explicit ^C handling to bin/offline, to test deactivation 2016-03-07 21:09:46 -08:00
John Firebaugh
55c5c3c891 [bin] Print message when tile count limit is exceeded 2016-03-04 15:15:10 -08:00
Thiago Marcos P. Santos
2b0749e3c6 [offline] Accept parameters
The defaults remains the same: Bay area at zoom 15.
The key, if not supplied, is taken from the environment.

```
Allowed options:
  -s [ --style ] URL                    Map stylesheet
  --north degrees (=37.200000000000003) North latitude
  --west degrees (=-122.8)              West longitude
  --south degrees (=38.100000000000001) South latitude
  --east degrees (=-121.7)              East longitude
  --minZoom number (=0)                 Min zoom level
  --maxZoom number (=15)                Max zoom level
  --pixelRatio number (=1)              Pixel ratio
  -t [ --token ] key                    Mapbox access token
  -o [ --output ] file (=offline.db)    Output database file name
```
2016-03-02 15:30:37 -03:00
John Firebaugh
65c06e6270 [core] status.requiredResourceCountIsIndeterminate ⇢ status.requiredResourceCountIsPrecise
Change the name and reverse the sense. Naming things in the positive is better than naming them in the negative.
2016-02-24 13:38:14 -08:00
John Firebaugh
40ecdeb0b6 [core] Optimize offline database schema
* Under the hood, SQLite creates surrogate keys (ROWID) anyway. We may as well take advantage of this and use the surrogates for foreign keys as well, since they are simpler and more efficient than compound foreign keys.
* Create indexes for efficient eviction queries
2016-02-10 15:40:20 -08:00
John Firebaugh
c91b44b02f Add binary for smoke-testing offline downloads 2016-02-10 15:40:20 -08:00
John Firebaugh
5a7d2fd60e [core] Eliminate platform::assetRoot()
I regenerated assets.zip so that all file paths have an `assets/` prefix, as the Android AssetFileSource implementation asserts, and removed `TEST_DATA` from the paths.
2016-01-13 13:40:31 -08:00
John Firebaugh
e7b0b31d58 [core] Privatize SQLiteCache 2016-01-08 12:31:13 -08:00
John Firebaugh
b60b6c47c0 [core] Merge SQLiteCache into the platform library
OfflineFileSource will depend on SQLite too.
2015-12-22 12:09:14 -08:00
Thiago Marcos P. Santos
e7b6d72cd1 [render] Add a RunLoop to render main thread
Also simplified the code making the logic more linear.
2015-12-01 11:49:02 +02:00
Thiago Marcos P. Santos
3d07aaf95d [core] Don't link with libuv on components not using it directly 2015-12-01 11:49:02 +02:00
Bruno de Oliveira Abinader
1f0820c8e8 [core] Added MapDebugOptions
Map debug options are now cycled up to all debug options enabled, then
back to none.
2015-11-27 17:47:02 +02:00
John Firebaugh
1d33790dc0 [core] Fix image type of Map::renderStill
It's a premultiplied image. This implies that we were misusing encodePNG
in most cases, as we were passing premultiplied pixels which were then
interpreted as unmultiplied. I changed encodePNG to accept premultipled
pixels, and unpremultiply in the implementations.
2015-11-25 15:57:37 -08:00
John Firebaugh
0c1e378bc9 [core] Rewrite image handling
* Consolidate Image and StillImage
* Typecheck unassociated vs premultiplied images
* Rewrite default platform image decoding implementation
2015-11-25 15:57:36 -08:00
Mike Morris
dfb36d6231 [core] move mbgl.gyp to gyp directory
So npm won't clobber binding.gyp, refs
https://github.com/npm/npm/issues/10243
2015-11-04 11:34:35 -05:00
Mike Morris
62595a9b39 [core] bump libuv to 1.7.5 across all platforms
UV_ASYNC_PARAMS and UV_TIMER_PARAMS for libuv <= 0.10 compatibility

use st_mtim.tv_sec in libuv > 0.10.x
2015-10-14 11:36:28 -04:00
John Firebaugh
aec145ded3 [osx] Fix build on Xcode 6.4 2015-09-28 13:34:00 -07:00
Mike Morris
142b59246e [osx] disable -Wunused-local-typedefs
Fixes OS X builds with Xcode 7, necessitated by
https://svn.boost.org/trac/boost/ticket/11240
2015-09-24 12:18:56 -04:00
Konstantin Käfer
e6053aa547 Make build system architecture agnostic to remove Android special case 2015-08-04 14:08:58 +02:00
Konstantin Käfer
675ddddee7 Make pixelRatio constant across a Map object lifetime
also moves framebuffer size out of TransformState into its own object
2015-07-08 10:40:05 +02:00
Konstantin Käfer
f4707f72e0 Replace mbgl::util::make_unique<> with std::make_unique<> 2015-05-26 17:57:38 +02:00
John Firebaugh
87b1da7611 DefaultFileSource has responsibility for handling mapbox:// URLs 2015-05-26 12:14:10 +02:00
Thiago Marcos P. Santos
da81211fea Add callback for error notifications on renderStill()
The callback will be called when any of the resources requested
from the network failed to load.

There is not recovery implemented yet, so the closest thing to
reseting the Map object and reloading all the resources would
be setting a new style.
2015-05-22 10:44:18 +03:00
Konstantin Käfer
3ec48b1030 allow passing --debug to view tile boundaries in mbgl-render 2015-05-13 10:39:22 +02:00
Konstantin Käfer
bb33493710 use boost_program_options from mason 2015-05-12 15:10:03 +02:00
Thiago Marcos P. Santos
77795d4ee9 Update the 'render' to reflect recent API changes
We don't call start/stop anymore and the resize is done via the
map object.
2015-05-08 15:40:30 +03:00
Konstantin Käfer
0d5568f724 merge build targets so we only have one build file per platform
previously, we used multiple different projects for various targets (app, test, render) that overwrote each other, so it was impossible to have one project to build them all, one project to compile them, one project to run them all and in the darkness bind them
2015-04-24 11:50:50 +02:00
Konstantin Käfer
71d127220b rename Mode::Static => Mode::Still 2015-04-17 17:55:24 +02:00
Konstantin Käfer
46bf226910 align static render mode and still image render mode
- static rendering now also runs in a separate thread; you have to start it with map.start(Map::Mode::Static) and join the thread with map.stop() before destructing the Map object
- map.renderStill() takes a callback with will be invoked on the *map* thread, so you'll have to figure out your own method of dispatching back to the main thread.
2015-04-17 13:40:42 +02:00
Konstantin Käfer
452d12e6e6 make implementation files private headers 2015-04-13 18:28:18 +02:00
Konstantin Käfer
16849a341b hide Thread<> and separate the Implementation object 2015-04-13 17:57:45 +02:00
Konstantin Käfer
bba3d9838a add Thread<T> and RunLoop
Thread<T> is a generic thread management object that starts a thread, creates an object T in that thread and calls its .start() function. When the Thread<T> object is destructed (which must happen in the thread that created it), it'll call the object's .stop() function, and wait for thread termination. The .stop() function must somehow get the thread to terminate. Note that object T's constructor/destructor/start()/stop() must be protected/private, and Thread<T> must be declared as a friend class. All public functions may be called from any thread and are exposed through operator->().

RunLoop encapsulates a libuv runloop and has a facility of dispatching function objects to the thread. It can be used either as a worker thread class by itself, or it can be derived from. This commit converts SQLiteCache to derive from RunLoop and removes the custom code used previously for managing the cache thread.
2015-04-10 15:36:32 +02:00
Thiago Marcos P. Santos
51bc265db3 Make the logging system static
No initialization is needed anymore and we can use the logging functions
safely at any point of the code (threading is not handled though, so you
might get multiplexed messages if you log from two threads
simultaneously).
2015-03-12 13:28:41 +02:00
Thiago Marcos P. Santos
71ccb7b013 Trivial build fix, do not call private method
Resize is internally called by the view now.
2015-03-11 14:40:05 +02:00
Thiago Marcos P. Santos
f3f8e348a1 Fix build warnings on GCC
Apperently boost has a few quirks on its headers.
2015-03-11 14:37:28 +02:00
Konstantin Käfer
8e42582c52 update static image rendering executable 2015-03-06 12:41:00 +01:00
Justin R. Miller
6e41664cb0 fixes #476 & #853: pixel/meter/latlng conversion routines in core & iOS 2015-02-16 09:52:36 -08:00
Konstantin Käfer
73f7db9af2 cleanup makefiles 2015-02-04 11:54:01 +01:00
Konstantin Käfer
29baacf3a5 refactor makefile 2015-02-04 10:49:09 +01:00
Konstantin Käfer
272fa8935e make storage lib separate so we can build without storage libs 2015-02-04 10:49:07 +01:00