Commit Graph

52 Commits

Author SHA1 Message Date
John Firebaugh
32bd1d54fa [node, tests] Consolidate headless rendering logic in HeadlessFrontend 2017-07-26 09:50:38 -07:00
Ivo van Dongen
e75fdf1075 [render] manage backendscope in renderer frontend 2017-07-25 17:44:28 +03:00
Ivo van Dongen
46c43510d7 [core] rename backend to renderer backend 2017-07-18 10:45:12 +02:00
Ivo van Dongen
3832f8d0d8 [core] renderer interface 2017-07-18 10:45:12 +02:00
Ivo van Dongen
57351c068b [core] split backend from mapobserver 2017-07-18 10:45:12 +02:00
John Firebaugh
40e4755621 [core] Move setStyleJSON/URL to Style; add Map::setStyle 2017-06-22 08:04:39 -07:00
Roman Chichina
f2ad940c39 [core] mbgl-render: allow scale factor to be floating point number 2017-05-15 18:55:47 +02:00
John Firebaugh
9eba2a66d1 [core, node, darwin, qt] Remove support for paint classes 2017-05-15 09:45:55 -07:00
Konstantin Käfer
68e032e505 [core] Remove private header includes from CLI utilities 2017-03-28 13:53:19 +02:00
Konstantin Käfer
8e5214144e [core] Ensure that a BackendScope exists when doing GL calls 2017-03-23 14:50:11 -07:00
Konstantin Käfer
6be56ff9c2 [render] allow passing URLs to mbgl-render 2016-12-07 10:46:43 +01:00
Saman Bemel-Benrud
5a4b73f3be Add ratio argument to render.cpp (#7161) 2016-11-23 11:08:43 -05:00
Konstantin Käfer
117863f111 [build] move headless rendering files to platform/default 2016-11-22 20:58:51 +01:00
Konstantin Käfer
3bc79e316e [build] move default ThreadPool implementation to platform/default 2016-11-22 20:58:51 +01:00
Konstantin Käfer
62b56b799a [core] change std::array<uint16_t, 2> to mbgl::Size 2016-10-27 18:30:58 -07:00
Konstantin Käfer
a4d259c33f [core] move gl::Context to Backend and refactor View 2016-10-25 13:52:36 -07:00
Konstantin Käfer
5cc390d694 [core] separate Backend from View for headless rendering 2016-10-25 13:52:36 -07:00
Mike Morris
817c26111a [core] [node] pass thread pool impl to Map constructor
Updates mbgl::Map constructor usage everywhere

Adds NodeThreadPool implementation using AsyncQueue to call
Nan::AsyncQueueWorker from main thread
2016-10-20 14:37:36 -04:00
John Firebaugh
e802aedb8c [core, node, android] Remove used "base" parameter from setStyleJSON 2016-06-02 16:33:56 -07:00
Mike Morris
5832825427 add pitch to bin/render.cpp 2016-04-05 17:57:46 -04: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
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
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
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
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
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
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
29baacf3a5 refactor makefile 2015-02-04 10:49:09 +01:00
Mike Morris
9b2c8d0391 update bin/render for recent changes 2015-01-16 11:42:42 -05:00
Konstantin Käfer
9082a83d6a don't assing nullptr to std::string 2014-12-16 11:42:58 +01:00
Konstantin Käfer
a4ce5152e8 don't provide a default value for the stylesheet file 2014-12-11 18:32:09 +01:00
Konstantin Käfer
343fd4bcac allow setting the cache database 2014-12-11 18:31:56 +01:00