Konstantin Käfer
452d12e6e6
make implementation files private headers
2015-04-13 18:28:18 +02:00
Konstantin Käfer
278e6bd556
use std::tuple<> to forward parameters into the Thread<> object
...
works around GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47226
2015-04-13 12:58:47 +02:00
Konstantin Käfer
4c7132337f
convert DefaultFileSource to use util::Thread<>
2015-04-10 22:37:27 +02:00
Konstantin Käfer
bd531b9e08
guarantee that Object stays around
...
Adds more documentation, and guarantees that the Object in the managed thread stays around until the Thread<> destructor is called. This might happen if .start() returns before .stop() is called, e.g. when a run loop in Object() terminates prematurely.
2015-04-10 15:52:02 +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
John Firebaugh
0c087603e6
Replace uv_messenger with AsyncQueue; rewrite remaining uv_* in C++
2015-04-09 15:30:58 -07:00
John Firebaugh
9331acf8e6
Add typedefs for std::chrono::steady_clock types
2015-04-02 12:28:12 +02:00
Justin R. Miller
486a385f98
Merge branch 'master' into 1022-annotations-thread-safety
2015-03-23 11:13:51 -07:00
Justin R. Miller
ecb8e2800d
Cocoa annotations API
2015-03-22 00:53:36 -07:00
Konstantin Käfer
f73dfc73f1
make more things const and refs, and add mutexes
2015-03-20 13:14:00 +01:00
Justin R. Miller
e049ce6df1
refs #893 #992 : point annotations API
2015-03-17 17:30:24 -07:00
Konstantin Käfer
2075d6bb9a
fix ambiguous name (gcc)
2015-03-06 16:09:14 +01:00
Konstantin Käfer
025654a101
throw exception when shader compilation fails
2015-03-06 15:42:34 +01:00
Konstantin Käfer
c30bb1a9f8
add more locking around GlyphStore and FontStack
...
this is a stopgap until we have a solution that gives every worker thread their own copy
2015-03-06 15:42:34 +01:00
Konstantin Käfer
cf235c6592
move readlock/writelock to uv.hpp and add movable lock/mutex
2015-03-06 15:42:33 +01:00
Konstantin Käfer
86455585ee
update mapbox::variant
2015-03-06 14:40:33 +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
Leith Bade
acfeda9899
Fix #include <uv.h> mixing between C and C++ modes
2015-02-11 19:01:30 -08:00
Konstantin Käfer
704b3719f5
use standard DEBUG macro rather than NDEBUG
2015-02-04 10:49:07 +01:00
Konstantin Käfer
b9bf66e67e
rewrite storage layer to be independent of the Map's event loop
2015-02-04 10:46:37 +01:00
Leith Bade
89bbd29278
Use std::chrono
2015-02-04 09:39:25 +11:00
Leith Bade
69cd7268d7
Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason
...
Conflicts:
platform/default/http_request_baton_curl.cpp
2014-12-10 19:13:21 +11:00
Konstantin Käfer
e11c073e51
report version number in user agent string
...
refs #628
2014-12-08 16:21:15 +01:00
Konstantin Käfer
1f91be988b
add user agent header
...
fixes #628
2014-12-08 11:04:08 +01:00
Leith Bade
de9eb00276
Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason
...
Conflicts:
.gitignore
gyp/mbgl-ios.gypi
gyp/mbgl-linux.gypi
gyp/mbgl-osx.gypi
include/mbgl/map/map.hpp
src/mbgl/map/map.cpp
src/mbgl/storage/caching_http_file_source.cpp
2014-12-05 23:16:49 +11:00
Konstantin Käfer
1e3fb3a423
remove usage of relative paths
2014-12-04 20:02:51 +01:00
Konstantin Käfer
abafb52f37
make most headers private
2014-12-04 20:02:50 +01:00
Konstantin Käfer
b449b22abc
remove use of std::to_string in favor of boost::lexical_cast
...
std::to_string calls sprintf() internally, which is really slow
2014-12-04 12:59:09 +01:00
Leith Bade
8f1754cf0a
Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason
...
Conflicts:
include/mbgl/storage/base_request.hpp
include/mbgl/storage/file_request_baton.hpp
include/mbgl/storage/http_request.hpp
include/mbgl/storage/http_request_baton.hpp
include/mbgl/util/uv_detail.hpp
platform/darwin/http_request_baton_cocoa.mm
platform/default/caching_http_file_source.cpp
platform/default/http_request_baton_curl.cpp
src/map/map.cpp
src/storage/base_request.cpp
src/storage/file_request.cpp
src/storage/file_request_baton.cpp
src/storage/http_request.cpp
src/storage/http_request_baton.cpp
2014-12-04 22:19:46 +11:00
John Firebaugh
57249ca32c
Prefer stdlib to libuv ( fixes #688 )
2014-12-03 17:38:10 -08:00
Leith Bade
991a74774e
Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason
...
Conflicts:
gyp/mbgl-ios.gypi
gyp/mbgl-linux.gypi
gyp/mbgl-osx.gypi
platform/default/caching_http_file_source.cpp
2014-12-04 08:02:57 +11:00
John Firebaugh
21b4f8c501
libuv handles must be deallocated asynchronously
...
Fixes #659
2014-12-03 12:04:56 -08:00
Leith Bade
94d34ce7ac
Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason
...
Conflicts:
src/map/map.cpp
2014-12-03 22:02:55 +11:00
Konstantin Käfer
82f3574d09
add array overloads to make_unique and move it to mbgl::util from std
2014-12-03 11:27:24 +01:00
Leith Bade
9346f6f6bd
Remove accidental friend
2014-12-03 20:14:11 +11:00
Leith Bade
8762d5a9b6
Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason
...
Conflicts:
include/mbgl/map/map.hpp
src/map/map.cpp
2014-12-03 19:56:20 +11:00
John Firebaugh
a6522d4a5a
Texturepool ⇢ TexturePool ( fixes #655 )
2014-12-02 12:24:25 -08:00
John Firebaugh
8f1772f18f
More complete uv::thread
2014-12-02 12:24:25 -08:00
Leith Bade
8ae2cd3985
Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason
...
Conflicts:
README.md
configure
gyp/mbgl-linux.gypi
include/mbgl/map/map.hpp
include/mbgl/platform/default/image_reader.hpp
include/mbgl/platform/default/jpeg_reader.hpp
include/mbgl/platform/default/png_reader.hpp
include/mbgl/util/uv_detail.hpp
ios/mapbox-gl-cocoa
platform/default/image.cpp
platform/default/image_reader.cpp
platform/default/jpeg_reader.cpp
platform/default/png_reader.cpp
src/map/map.cpp
2014-11-28 01:51:21 +11:00
Vincent Schüßler
49519ba7f3
Fix member shadowing warnings
2014-11-28 00:16:06 +11:00
artemp
fc805cc41c
image-readers: move concrete implementations headers into platform/default
2014-11-28 00:15:04 +11:00
artemp
3f8efa6985
move std.hpp include into image_reader.hpp (g++)
2014-11-28 00:15:04 +11:00
artemp
8c524e1ac6
return unique_ptr from get_image_reader
2014-11-28 00:15:04 +11:00
artemp
fcebd44571
simplify image_readers creation implementation
...
* remove static callbacks registration
* link png_reader/jpeg_reader into mbgl-linux lib
2014-11-28 00:15:04 +11:00
artemp
15973741d5
simplify factory class to not rely on singleton + cleanups
2014-11-28 00:14:15 +11:00
artemp
ae2d4e740e
add image_reader abstraction layer to hanfle multiple image formats
...
(work-in-progress)
2014-11-28 00:14:11 +11:00
John Firebaugh
703a325518
Introduce uv::async
2014-11-26 17:36:09 -08:00
John Firebaugh
bcc0db3742
Use noncopyable
2014-11-26 17:04:28 -08:00
John Firebaugh
bbb7743463
Remove unused
2014-11-26 16:41:58 -08:00
John Firebaugh
f91322cf4a
Remove unused
2014-11-26 16:34:03 -08:00