Commit Graph

2256 Commits

Author SHA1 Message Date
John Firebaugh
1e350b7ea4 [core] Reorganize sprite related files 2015-11-12 13:03:14 -08:00
Bruno de Oliveira Abinader
fc2fa73363 [core] Cleanup Transform::rotateBy
Make use of PrecisionPoint's operator functionalities inherited from
vec2<> and reduced overhead eg. offset_y is always 0 so no need to add
this to calculation inside the if.
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
Minh Nguyễn
6748b6155e [core] Fixed bit-shifting error in exponential backoff
This change fixes a bug introduced in 4d5c6333be for #2727. 1 << 32 would exceed the size of int64_t. The static analyzer reported undefined behavior here because std::min() might or might not return 32.
2015-11-12 10:46:47 -08:00
Minh Nguyễn
aae7f90e37 [core] Fixed Transform::_setScale()
Corrected Transform::_setScale() after the refactoring in 5a24ac605b for #2994. This change also addresses two dead store warnings from the static analyzer.
2015-11-12 10:46:43 -08:00
John Firebaugh
7621a41158 Fix symbol-placement: line + {icon,text}-rotation-alignment: viewport
Fixes #3004
2015-11-11 17:34:56 -08:00
Bruno de Oliveira Abinader
aa8857643d [core] Added MetersBounds 2015-11-11 16:59:49 +02:00
Bruno de Oliveira Abinader
cd0266f25c [core] Added more NaN checks in Transform 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
99ac8d8720 [core] Use pass-by-ref in CameraOptions
Pass-by-const-ref is not always possible because CameraOptions gets its
members modified along the way.

Also fixes a case in Map::jumpTo where Update::Zoom should be called if
zoom is affected.
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
Bruno de Oliveira Abinader
e2052ea3e4 [core] Added PrecisionPoint to represent pixel points 2015-11-11 16:59:49 +02:00
Bruno de Oliveira Abinader
e5c460f2db [core] Added isValid to geo helper structs 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
John Firebaugh
a562567589 [core] Eliminate use of ClassProperties for layout 2015-11-10 11:33:17 -08:00
John Firebaugh
728a9858ea [core] Push layouts and paints to subclasses 2015-11-10 11:33:17 -08:00
Bruno de Oliveira Abinader
41120774af [core] Expose default fade duration to Map API 2015-11-10 10:28:16 +02:00
Konstantin Käfer
7b8b2b1790 Revert "[core] only update the render order array when there are changes to tiles"
This reverts commit ec1a58d8ef and 177372b836.
2015-11-09 11:18:10 -08:00
Bruno de Oliveira Abinader
ff5d405958 [core] Update::Classes already implies repaint 2015-11-09 15:05:08 +02:00
Minh Nguyễn
17451418cc [core] Update after final frame of transition
The final frame is self-destructing – it destroys the frame and finish functions – so technically we’re no longer inTransition(). Yet there still needs to be an update after that final frame.

Also, avoid a redundant change notification on the last frame. (It would come too late, after the DidChange notification, anyhow.)

Fixes #2946.
2015-11-06 11:06:53 -08:00
John Firebaugh
10858ab382 [core] Remove the ability to change cross-fade durations via transition
We shouldn't overload transition duration to mean the duration of the
cross-fade when moving between stops. If we want to allow styles to
override the default 300ms fade duration, it should be a dedicated
property like raster-fade-duration.

I don't think any styles use this functionality -- if they did, they
were broken for MapMode::Still rendering.
2015-11-06 10:39:06 -08:00
John Firebaugh
9b537fab29 [core] Use frame animation time, not Clock::now(), for fading 2015-11-06 10:38:48 -08:00
John Firebaugh
b81243daa9 [core] Merge PiecewiseConstantFunction into Function 2015-11-06 10:38:48 -08:00
John Firebaugh
7de4ce5bcb [core] Simplify Function 2015-11-06 10:38:47 -08:00
Bruno de Oliveira Abinader
5ef5d08867 [core] Reset GL values when needed 2015-11-06 20:05:01 +02:00
Bruno de Oliveira Abinader
8894982625 [core] Use GL_TRUE/GL_FALSE instead of true/false 2015-11-06 20:05:01 +02:00
Konstantin Käfer
ec1a58d8ef [core] clear the render order when we're loading a new style
regression introduced by #2908
2015-11-06 16:42:44 +01:00
Thiago Marcos P. Santos
cb92290f9d [core] Use tileSize constant
Instead of hardcoding the tile size again.
2015-11-06 14:44:52 +02:00
Bruno de Oliveira Abinader
179917ccb6 [core] Replace GL config save/restore with setDirty mechanism 2015-11-06 13:36:00 +02: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
Thiago Marcos P. Santos
be16c37e65 [core] Added missing virtual destructor to HTTPContextBase 2015-11-05 19:26:05 +02:00
Konstantin Käfer
177372b836 [core] only update the render order array when there are changes to tiles 2015-11-05 10:33:21 +01:00
Konstantin Käfer
8e63084c9e [core] Move remaining GL state from Painter into GLConfig object 2015-11-04 13:38:51 +01:00
Mike Morris
79a5a96037 [core] mason geojsonvt-2.1.6.3
- [osx] set -fvisibility-inlines-hidden in gyp/common.gypi to silence
  mismatched visibility linker warnings
- [linux] set cxx_host in GYP_FLAGS to set -fabi-version=0 on gcc builds
  to use clang-built mason binaries
- [ios] update symbol visibility for iOS tests
- [ios] link libgeojsonvt.a in iOS tests xcodeproj
  - add libgeojsonvt.a to General -> Linked Frameworks and Libraries
  - add mason_packages (recursive) to Build Settings -> Library Search Path
- [ios] add libuv and geojsonvt first in iOS libtool smush to ensure symbols
  are found by later compilation units where they are undefined
2015-11-02 18:41:34 -05:00
Mike Morris
ba7cc755e7 [node] patch Painter::renderSDF to ignore animation and fade duration in MapMode::Still 2015-11-02 18:26:09 -05:00
Konstantin Käfer
04273fbb1c [core] Make DefaultFileSource react to all NetworkStatus changes 2015-11-02 17:25:08 +01:00
Konstantin Käfer
4d5c6333be [core] move retry logic to DefaultFileSource 2015-11-02 17:24:40 +01:00
John Firebaugh
a7219a77aa [core] Don't crash when removing a shape annotation whose layer was never created 2015-10-30 14:36:07 -07:00
Minh Nguyễn
557b8afb7c [core][iOS] Source iOS styles from default_styles
Moved mbgl::util::default_styles to a more appropriate location, where iOS platform code can also find it. Moved -[MGLMapView bundledStyleURLs] (which is now deprecated) and the style switcher in iosapp to default_styles.

Added a collection of convenience methods for getting style URLs. It makes little sense to layer an enum atop this, as MapKit does, because MGLMapView styles aren’t limited to this set. A good analogy is UIColor. This also makes for a good entry point for future runtime styling APIs.

Introduced independent constants for each default style, because it’s more common to need access to a particular style than to iterate over them. This fact is apparent in the MGLStyle class, which now uses macros and assertions to ensure that it’s kept up-to-date with changes in default_styles.

/ref #1462
2015-10-30 13:09:37 -07:00
John Firebaugh
ddc4251074 [core] Polymorphic bucket creation 2015-10-30 11:19:28 -07:00
John Firebaugh
540c6eca15 [core] Eliminate StyleBucket 2015-10-30 11:19:28 -07:00
John Firebaugh
8c3b3cb792 [core] Use current copy of style layers when reparsing tiles
This fixes adding shape annotations after VectorTileData objects have
been created for annotations already, and will also be necessary for
the dynamic Style API.
2015-10-30 11:17:01 -07:00
John Firebaugh
7669e02062 [core] Monitor annotation tiles, rather than completely invalidating them
Fixes #1688
2015-10-30 11:17:01 -07:00
John Firebaugh
f745f271e3 [core] When reparsing a tile, replace all existing buckets
A tile may go from having particular layers, to not having them.
(Annotation tiles in particular.)
2015-10-30 11:17:01 -07:00
John Firebaugh
f6f5d9608d [core] Separate type for RasterTileParseResult 2015-10-30 11:17:00 -07:00
John Firebaugh
7821dccae5 [core] Polymorphic layout and paint parsing 2015-10-29 16:46:49 -07:00
John Firebaugh
e2dc956eb6 [core] Merge LiveTileData into VectorTileData
To encapsulate the differences, this introduces an abstract
GeometryTileMonitor class, with concrete VectorTileMonitor and
AnnotationTileMonitor implementations, and makes pbf parsing for
VectorTile data happen lazily in getLayer, since we want that to
happen on the worker thread, rather than when VectorTile is created.

Fixes #2792
2015-10-29 12:05:40 -07:00
Thiago Marcos P. Santos
978da4224e [core] Set names to threads on Linux
Makes debugging/profiling easier.
2015-10-29 11:54:43 +02:00
John Firebaugh
d20bcb0795 [core] Workaround for #2808 2015-10-28 15:54:36 -07:00
John Firebaugh
014b517820 [node] Output debug logs when a render test times out 2015-10-28 15:54:34 -07:00