Commit Graph

870 Commits

Author SHA1 Message Date
Bruno de Oliveira Abinader
31fd2822f5 [core] Replace time_t with std::chrono::seconds
Added aliases for std::chrono typedefs (eg. 'Seconds' for
std::chrono::seconds). These aliases are used together with templated
helper functions to replace time_t with std::chrono::seconds for most
cases, in particular for 'modified' and 'expires' values in Response.
2015-11-27 17:47:02 +02:00
Thiago Marcos P. Santos
873eabcf28 [node] Fix build on GCC 4.9.2 2015-11-26 19:40:36 +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
f3d6f68106 [core] Always manually premultiply libpng output
It appears to be the only way to get the results we want in all cases.
2015-11-25 15:57:36 -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
Minh Nguyễn
2de0a351a0 [core] [iOS] Completion handlers for animated methods
Added transition frame and finish functions to CameraOptions. Added Objective-C equivalents to the three main entry points to easeTo() in MGLMapView.

Fixes #1581.
2015-11-25 15:20:25 -08:00
Minh Nguyễn
6916675e61 [iOS] Ensure consistent willChange/didChange notifications
Coalescing willChange/didChange notifications means keeping track of how many gestures are currently in progress; a boolean isn’t enough to track this state. This change refactors the gesture recognizers, making them more consistent with each other and more consistent in the case where more than one of them has fired. It also explicitly cancels transitions before all programmatic viewport-modifying methods, since mbgl only does so when animating.

Fixes #2313, fixes #2379, fixes #3062.
2015-11-25 14:39:32 -08:00
Mike Morris
dcf3eb9083 node-v2.0.1 2015-11-25 16:34:39 -05:00
Thomas Voß
3f786c7171 Fix GCC5 complaining about -Wunused-variable. 2015-11-25 14:23:13 +01:00
Minh Nguyễn
f782f5eeb7 Attach compass gesture recognizer to compass view
Fixes #3099.
2015-11-24 12:11:10 -08:00
Minh Nguyễn
047107113f Updated guide URL 2015-11-23 19:17:20 -08:00
John Firebaugh
6ff3ef55f8 [core] Remove unused 2015-11-23 17:28:44 -08:00
John Firebaugh
36081f6486 [core] For binary image data use uint8_t, not char 2015-11-23 17:28:44 -08:00
John Firebaugh
c4c3a19d85 [node] Allow GC in spite of reference loops through the request method
The following produces a reference cycle:

var map = new mbgl.Map({
    request: function () { ... }
});

map has a reference to the request function, which has a reference to
its closure, which has a reference to map.

Storing a the map options in an internal field, rather than a Persistent,
allows V8 to collect the reference cycle when none of its members have
other references.
2015-11-20 16:33:46 -08:00
Minh Nguyễn
b3dbdb389f [iOS] Set application root as asset root
As of #2746, we no longer bundle any styles with the SDK, so the asset: URL scheme is unused. Instead, point asset: to the application root for developer convenience and consistency with the Android and default asset roots. Also fixed an issue that prevented relative URLs from being treated as asset: URLs.

Fixes #1208, fixes #3050.
2015-11-20 10:44:12 -08:00
Justin R. Miller
a0533d8244 refs #2922: update display link in all common modes (inc. scrolling) 2015-11-18 18:27:46 -08:00
John Firebaugh
46a6b03582 [node] Fix race condition in tests
The message callback races with the rest of this test. We already have
tests for errors being emitted from mbgl, so just remove it.
2015-11-18 16:53:11 -08:00
Minh Nguyễn
fcec19b835 Ensure proper will/is/didChange for resetNorth 2015-11-18 11:27:17 -08:00
Bruno de Oliveira Abinader
cb9b397985 [core] Fix LatLngBounds default coordinates
LatLngBounds southwest and northeast coordinate points were inverted, so
they could be extended via LatLngBounds::extend(). However, this looks
confusing and error-prone.

A static LatLngBounds::getExtendable() is added to address cases when we
want to extend LatLngBounds.
2015-11-18 09:37:27 +02:00
Justin R. Miller
31354186a6 more clearly indicate Foundation imports to avoid recursion 2015-11-17 17:10:09 -08:00
Justin R. Miller
ac10cc1ecd fixes #3054: move desktop test app keybindings output to startup log 2015-11-17 12:00:51 -08:00
Konstantin Käfer
85ab48636c [core] allow changing pitch in GLFW based apps 2015-11-17 19:02:12 +01:00
Justin R. Miller
445145406f bump version to ios-v3.0.0-pre.7 2015-11-16 16:10:32 -08:00
Leith Bade
af2d034e9d [android] Bring back OkHTTP
Update http_request_android.cpp for changes in #2727
Fix crash caused by calling both onFailure and onReponse in the same request
Fixes #2856
Fixes #2400
2015-11-17 10:12:58 +11:00
John Firebaugh
43c6e2fb52 [node] Need to have a singleton RunLoop instance 2015-11-16 12:25:48 -08:00
John Firebaugh
7137239cbd [core] Use std::unique_ptr for FileSource request 2015-11-16 12:25:47 -08:00
Thiago Marcos P. Santos
36581f3d30 [core] Do not pass uv_loop_t around
This should be abstracted by util::RunLoop
2015-11-16 12:25:47 -08:00
Justin R. Miller
212e7a1e08 provide resource bundle search for premade frameworks 2015-11-16 11:40:54 -08:00
Justin R. Miller
8e6b9a0d96 bump iOS version to 3.0.0-pre.6
[skip ci]
2015-11-13 14:39:18 -08:00
John Firebaugh
1e350b7ea4 [core] Reorganize sprite related files 2015-11-12 13:03:14 -08:00
Minh Nguyễn
0dc1519a18 Set refresh interval to 60fps
Fixes #3005.
2015-11-12 12:00:47 -08:00
Minh Nguyễn
48d1c4025d [iOS] Removed unnecessary casts
Also renamed secondsAsDuration() to durationInSeconds(): function names should generally put the return type first, the argument type last, to avoid confusion.
2015-11-12 10:46:50 -08:00
Bruno de Oliveira Abinader
8b76f00d8c [core] PrecisionPoint is now a vec2<double>
We could reuse all the operators defined in vec2<>, including operator
bool() that checks if the contained values are !NaN.
2015-11-12 10:46:50 -08:00
Bruno de Oliveira Abinader
12e0e5eb04 [ios] Reflect Map API changes in MGLMapView 2015-11-11 16:59:49 +02:00
Bruno de Oliveira Abinader
994ee519e8 [android] Reflect Map API changes in JNI 2015-11-11 16:59:49 +02:00
Bruno de Oliveira Abinader
5a24ac605b [core] Use PrecisionPoint in zoom and angle functions 2015-11-11 16:59:49 +02:00
Bruno de Oliveira Abinader
c78e769635 [core] Use PrecisionPoint in coordinate functions 2015-11-11 16:59:49 +02:00
John Firebaugh
54e08b1f83 [core] Eliminate use of ClassProperties for paint 2015-11-10 11:33:17 -08:00
Justin R. Miller
f5a0586408 move from Fabric framework to bare headers per Twitter recommendation
Rolls back part of #2742
2015-11-09 17:35:43 -08:00
Minh Nguyễn
2abdcb0a81 Updated changelog 2015-11-09 13:08:11 -08:00
Minh Nguyễn
affb1199bf Merge remote-tracking branch 'bwhtmn/ios9_multitasking' into 1ec5-ios9-multitasking-2309 2015-11-09 12:43:42 -08:00
Minh Nguyễn
019a979bfe Remove constraints instead of deactivating them
Avoid piling up lots of deactivated constraints. Also avoid trying to deactivate constraints that have already been removed from the view hierarchy due to a change in view controllers.

Fixes #2020.
2015-11-09 09:39:24 -08:00
Justin R. Miller
0e5063799a bump iOS version to 3.0.0-pre.5 2015-11-06 17:57:47 -08:00
Justin R. Miller
423cfc11e5 refs #2966: remove -ObjC linker flag & bring in categories via other means 2015-11-06 16:16:50 -08:00
Konstantin Käfer
69564cc886 [core] fix logging so we don't use strings as a formatter 2015-11-06 10:16:52 +01:00
Mike Morris
36a8fb32d5 [node] Fixes 'make xnode' to configure HOST_SLUG.gypi
Adds node-gyp to dev-dependencies to support 'make xnode' on Node v0.10.x
Ignores -Wnested-anon-types around v8.h includes.
2015-11-05 18:16:33 -05:00
Minh Nguyễn
99211bc168 [iOS] Defer didChange until after animation
Fixes #2436.
2015-11-05 13:28:17 -08:00
Konstantin Käfer
24285926c2 [core] Include Linux-specific scheduling header
before, builds for Linux didn't include thread priority control
2015-11-05 10:32:45 +01:00
Mike Morris
ed1a761632 [node] update platform/node/CHANGELOG.md [skip ci] 2015-11-04 19:43:11 -05:00
Mike Morris
0403b282f3 [node] update platform/node/CHANGELOG.md [skip ci] 2015-11-04 19:40:06 -05:00