Commit Graph

1814 Commits

Author SHA1 Message Date
Thiago Marcos P. Santos
c3900e42d6 [core] Removed unused methods
No longer needed after refactoring ::setResourceTransform.
2017-06-26 16:32:21 +03:00
Thiago Marcos P. Santos
ea34cb5725 [core] Use the ResourceTransform instead of callbacks
Based on the actor model, can be considered safer to use since
we don't need to worry about object lifetime anymore.
2017-06-26 16:32:21 +03:00
Thiago Marcos P. Santos
515ffa975d [core] Store pointer instead of referect to the Object in ActorRef
GCC complains about implicitly deleted assigment constructor
when trying to do this:

void setResourceTransform(optional<ActorRef<ResourceTransform>> transform) {
    resourceTransform = transform;
}

optional<ActorRef<ResourceTransform>> resourceTransform;
2017-06-26 16:32:21 +03:00
Thiago Marcos P. Santos
6beccef517 [core] Introduce the ResourceTransform
Wrapper for transforming URLs on the OnlineFileSource.
2017-06-26 16:32:21 +03:00
Thiago Marcos P. Santos
54c3ccc37d [core] Make the mbgl/actor headers public
They will be needed by the DefaultFileSource, something that we
also export as public.
2017-06-26 16:32:21 +03:00
John Firebaugh
40e4755621 [core] Move setStyleJSON/URL to Style; add Map::setStyle 2017-06-22 08:04:39 -07:00
John Firebaugh
1520a56813 [all] Promote Style to public API 2017-06-22 08:04:39 -07:00
Thiago Marcos P. Santos
7e8bdadb91 [core] Rename ThreadedObject to Thread
Now that the old Thread class is gone, we can give ThreadedObject
a better name.
2017-06-21 14:30:09 +03:00
Thiago Marcos P. Santos
999de53f11 [core] Convert DefaultFileSource to ThreadedObject
Fixes #6426
2017-06-21 14:30:09 +03:00
Lauren Budorick
87a70c4793 [core] Enable property functions for line-width (#9250) 2017-06-19 14:27:43 -07:00
John Firebaugh
e361bcf668 [core] Fix composite function approximation for non-integer stops 2017-06-16 12:46:12 -07:00
John Firebaugh
5a87291826 [core] Obey "transition" property from style and its default value 2017-06-15 07:43:51 -07:00
John Firebaugh
9d276f3b0f [core] Dynamic program compilation for data-driven properties 2017-06-13 12:21:50 -07:00
John Firebaugh
3270440f23 [core] Per-tile glyph/icon atlases 2017-06-13 10:18:43 -07:00
Bruno de Oliveira Abinader
a05f060153 [core] Added Backend::{assume,set}ScissorTest 2017-06-13 13:37:41 +03:00
Bruno de Oliveira Abinader
28eb2e6354 [core] Added Backend::{assume,set}Viewport 2017-06-13 13:37:41 +03:00
Anand Thakker
f59eb822e1 Fix undefined memory access in getCoveringRanges() (#9227)
* Add simple unit tests for SymbolSizeBinder

* Fix bug in symbol size uniform value calculation

For camera functions we were setting the zoom levels in "covering ranges" to
`[(zoom stop <= tile zoom), (zoom stop >= 1 + tile zoom)]`, but then evaluating
the function at `[tile_zoom, tile_zoom + 1]`.

* Check for it != end() before accessing it->first
2017-06-09 06:28:14 -04:00
John Firebaugh
9dfc2d924d [core] Collection-level immutability
Introduce a second level of immutability, over each of the collections held by a style: sources, images, and layers. Tracking immutability at this level allows us to short-circuit significant portions of the RenderStyle update logic via a simple equality check, greatly improving performance.
2017-06-05 19:38:08 -07:00
John Firebaugh
591af0021b [core] Refactor RenderSource updates
* Eliminate updateBatch in favor of diffing layers and detecting changes to properties upon which layout depends.
* Replace RenderSource::{update,remove,invalidate,reload}Tiles with a single update method
* Replace TilePyramid::{update,remove,invalidate,reload}Tiles with a single update method
* Remove Style& dependency TODO from GeometryTile and TileParameters
2017-06-05 19:38:08 -07:00
Asheem Mamoowala
8b37a0704c [core] Use fixed-size std::array for ImageSource coordinates 2017-06-01 15:38:01 -07:00
Asheem Mamoowala
1b86bf16b2 [core] Render Image Source 2017-06-01 15:38:01 -07:00
Asheem Mamoowala
aa6647e910 [core] Offline support for Image Sources 2017-06-01 15:38:01 -07:00
Asheem Mamoowala
c0c1028dcf [core] Add toDouble Conversion method for correctly parsing Lat Lng coordinates 2017-06-01 15:38:01 -07:00
Asheem Mamoowala
7a010df956 [core] Add ImageSource support to style parsers 2017-06-01 15:38:01 -07:00
Bruno de Oliveira Abinader
99cfbacdfb [core] Make TransformState LatLngBounds optional 2017-06-01 17:04:09 +03:00
Ivo van Dongen
ff3dc29ffd [core] ensure layer::accept works with non-void return values on gcc 2017-05-30 13:07:03 +03:00
Ivo van Dongen
5cf0fc0f8b [core] default file source - ensure thread safety for cached values 2017-05-27 10:05:36 +03:00
Ivo van Dongen
89129379f1 [core] default file source - ensure thread safety for local file and asset requests 2017-05-27 10:05:36 +03:00
Ivo van Dongen
b608d85db7 [core] allow self closing mailbox/actor 2017-05-27 09:25:03 +03:00
John Firebaugh
aa216d0025 [core] Don't use a separate SpriteAtlas for annotation images
Instead, just add them to the Style as needed. Includes changes from #8905 and takes care to avoid regressing #3817.
2017-05-26 11:21:56 -07:00
John Firebaugh
2c8343aa82 [core] Block in Mailbox::close() until neither receive nor push are in progress
Otherwise, an ActorRef that's in the process of sending a message could attempt to access an invalid Scheduler reference:

      Thread 1                     Thread 2
--------------------------------------------------
 Scheduler::Scheduler
     Actor::Actor
                              weakMailbox.lock()
     Actor::~Actor
 Scheduler::~Scheduler
                               mailbox->push()
                             scheduler.schedule() 💣
2017-05-24 08:19:19 -07:00
Ivo van Dongen
2dd8553096 [core] forward visitor in layer::accept 2017-05-23 10:06:56 +03:00
John Firebaugh
1f921299b0 [core] Make ExponentialStops behavior consistent; add tests 2017-05-19 11:48:45 -07:00
John Firebaugh
bdff99c853 [core] Eliminate round-trip through Value in CameraFunction::evaluate 2017-05-19 11:48:45 -07:00
Konstantin Käfer
eae2c715f1 [core] add error for non-virtual destructor deletes + add virtual dtors 2017-05-18 16:57:12 +02:00
John Firebaugh
786707649a [core] Remove ambiguous get{Width,Height} accessors from style::Image 2017-05-17 11:23:47 -07:00
John Firebaugh
cc1ea759a6 [core, node, darwin, android, qt] Make image ID part of Image
More like Source and Layer.
2017-05-16 12:26:35 -07:00
John Firebaugh
9eba2a66d1 [core, node, darwin, qt] Remove support for paint classes 2017-05-15 09:45:55 -07:00
John Firebaugh
da4d735e2c [core] Unify {Paint,Layout,Light}Properties 2017-05-15 09:45:55 -07:00
John Firebaugh
8fb1a81c46 [core] Immutable<Impl> for Image 2017-05-15 08:20:18 -07:00
Ivo van Dongen
cc9f040a2d [core] Split style image collection from SpriteAtlas 2017-05-12 13:19:00 -07:00
John Firebaugh
095dc7b167 [core] Replace createRender{Source,Layer} with Render{Source,Layer}::create
* Eliminates the need for EnableImmutableFromThis
* Eliminates the dependency of {Source,Layer}::Impl on corresponding Render class (circular dependency)
2017-05-12 11:26:27 -07:00
John Firebaugh
afead4e749 [core] Return {Source,Layer}::getID by value
Avoid dangling references in the following sequence:

    auto& id = layer->getID();
    layer->setMaxZoom(2);
    std::cout << id;

The reference would be dangling because mutating the layer allocates a new Immutable impl, and there may be no references to the prior impl, which held the id.
2017-05-12 11:26:27 -07:00
John Firebaugh
c2a5894f2d [core] Immutable Impls 2017-05-12 11:26:27 -07:00
Bruno de Oliveira Abinader
37046938da [tidy] modernize-raw-string-literal 2017-05-12 18:07:36 +03:00
Bruno de Oliveira Abinader
870067360f [tidy] modernize-pass-by-value 2017-05-12 18:07:36 +03:00
Bruno de Oliveira Abinader
25b2250c32 [tidy] modernize-use-using 2017-05-12 18:07:36 +03:00
Bruno de Oliveira Abinader
fa36110dfb [tidy] modernize-use-auto 2017-05-12 18:07:36 +03:00
Bruno de Oliveira Abinader
f709d7b055 [tidy] llvm-namespace-comment 2017-05-12 18:07:36 +03:00
Bruno de Oliveira Abinader
6f993230f2 [core] Make deleted members public
warning: deleted member function should be public [modernize-use-equals-delete]
2017-05-12 18:07:36 +03:00