summaryrefslogtreecommitdiff
path: root/src/mbgl
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2017-07-11 19:15:10 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2017-07-12 20:42:29 +0300
commit2fae373fc9da1a5ed61b5114d8c982073734826d (patch)
tree105ce580cc7df0cf9cf0a9997c4702bc76b3faeb /src/mbgl
parent21031b624ffabf92bf284c830b3d13a3ae045460 (diff)
downloadqtlocation-mapboxgl-2fae373fc9da1a5ed61b5114d8c982073734826d.tar.gz
[core] GCC 4.9 is unable to deduce ctors when using bracket init
Diffstat (limited to 'src/mbgl')
-rw-r--r--src/mbgl/gl/texture.hpp20
-rw-r--r--src/mbgl/renderer/tile_parameters.hpp27
-rw-r--r--src/mbgl/renderer/update_parameters.hpp35
-rw-r--r--src/mbgl/tile/geometry_tile.hpp24
4 files changed, 96 insertions, 10 deletions
diff --git a/src/mbgl/gl/texture.hpp b/src/mbgl/gl/texture.hpp
index 5330689ac2..625e69233a 100644
--- a/src/mbgl/gl/texture.hpp
+++ b/src/mbgl/gl/texture.hpp
@@ -8,12 +8,24 @@ namespace gl {
class Texture {
public:
+ Texture(Size size_, UniqueTexture texture_,
+ TextureFilter filter_ = TextureFilter::Nearest,
+ TextureMipMap mipmap_ = TextureMipMap::No,
+ TextureWrap wrapX_ = TextureWrap::Clamp,
+ TextureWrap wrapY_ = TextureWrap::Clamp)
+ : size(std::move(size_)),
+ texture(std::move(texture_)),
+ filter(filter_),
+ mipmap(mipmap_),
+ wrapX(wrapX_),
+ wrapY(wrapY_) {}
+
Size size;
UniqueTexture texture;
- TextureFilter filter = TextureFilter::Nearest;
- TextureMipMap mipmap = TextureMipMap::No;
- TextureWrap wrapX = TextureWrap::Clamp;
- TextureWrap wrapY = TextureWrap::Clamp;
+ TextureFilter filter;
+ TextureMipMap mipmap;
+ TextureWrap wrapX;
+ TextureWrap wrapY;
};
} // namespace gl
diff --git a/src/mbgl/renderer/tile_parameters.hpp b/src/mbgl/renderer/tile_parameters.hpp
index 9769ae6897..333f796331 100644
--- a/src/mbgl/renderer/tile_parameters.hpp
+++ b/src/mbgl/renderer/tile_parameters.hpp
@@ -13,8 +13,29 @@ class GlyphManager;
class TileParameters {
public:
- float pixelRatio;
- MapDebugOptions debugOptions;
+ TileParameters(const float pixelRatio_,
+ const MapDebugOptions debugOptions_,
+ const TransformState& transformState_,
+ Scheduler& workerScheduler_,
+ FileSource& fileSource_,
+ const MapMode mode_,
+ AnnotationManager& annotationManager_,
+ ImageManager& imageManager_,
+ GlyphManager& glyphManager_,
+ const uint8_t prefetchZoomDelta_)
+ : pixelRatio(pixelRatio_),
+ debugOptions(debugOptions_),
+ transformState(std::move(transformState_)),
+ workerScheduler(workerScheduler_),
+ fileSource(fileSource_),
+ mode(mode_),
+ annotationManager(annotationManager_),
+ imageManager(imageManager_),
+ glyphManager(glyphManager_),
+ prefetchZoomDelta(prefetchZoomDelta_) {}
+
+ const float pixelRatio;
+ const MapDebugOptions debugOptions;
const TransformState& transformState;
Scheduler& workerScheduler;
FileSource& fileSource;
@@ -22,7 +43,7 @@ public:
AnnotationManager& annotationManager;
ImageManager& imageManager;
GlyphManager& glyphManager;
- const uint8_t prefetchZoomDelta = 0;
+ const uint8_t prefetchZoomDelta;
};
} // namespace mbgl
diff --git a/src/mbgl/renderer/update_parameters.hpp b/src/mbgl/renderer/update_parameters.hpp
index 8ebcd11e21..04b59699b3 100644
--- a/src/mbgl/renderer/update_parameters.hpp
+++ b/src/mbgl/renderer/update_parameters.hpp
@@ -16,6 +16,39 @@ class AnnotationManager;
class UpdateParameters {
public:
+ UpdateParameters(const MapMode mode_,
+ const float pixelRatio_,
+ const MapDebugOptions debugOptions_,
+ const TimePoint timePoint_,
+ const TransformState TransformState_,
+ const std::string glyphURL_,
+ const bool spriteLoaded_,
+ const style::TransitionOptions transitionOptions_,
+ const Immutable<style::Light::Impl> light_,
+ const Immutable<std::vector<Immutable<style::Image::Impl>>> images_,
+ const Immutable<std::vector<Immutable<style::Source::Impl>>> sources_,
+ const Immutable<std::vector<Immutable<style::Layer::Impl>>> layers_,
+ Scheduler& scheduler_,
+ FileSource& fileSource_,
+ AnnotationManager& annotationManager_,
+ const uint8_t prefetchZoomDelta_)
+ : mode(mode_),
+ pixelRatio(pixelRatio_),
+ debugOptions(debugOptions_),
+ timePoint(std::move(timePoint_)),
+ transformState(std::move(TransformState_)),
+ glyphURL(std::move(glyphURL_)),
+ spriteLoaded(spriteLoaded_),
+ transitionOptions(std::move(transitionOptions_)),
+ light(std::move(light_)),
+ images(std::move(images_)),
+ sources(std::move(sources_)),
+ layers(std::move(layers_)),
+ scheduler(scheduler_),
+ fileSource(fileSource_),
+ annotationManager(annotationManager_),
+ prefetchZoomDelta(prefetchZoomDelta_) {}
+
const MapMode mode;
const float pixelRatio;
const MapDebugOptions debugOptions;
@@ -34,7 +67,7 @@ public:
FileSource& fileSource;
AnnotationManager& annotationManager;
- const uint8_t prefetchZoomDelta = 0;
+ const uint8_t prefetchZoomDelta;
};
} // namespace mbgl
diff --git a/src/mbgl/tile/geometry_tile.hpp b/src/mbgl/tile/geometry_tile.hpp
index 943296e01b..c45762742b 100644
--- a/src/mbgl/tile/geometry_tile.hpp
+++ b/src/mbgl/tile/geometry_tile.hpp
@@ -5,9 +5,11 @@
#include <mbgl/renderer/image_manager.hpp>
#include <mbgl/text/glyph_manager.hpp>
#include <mbgl/text/placement_config.hpp>
+#include <mbgl/text/collision_tile.hpp>
#include <mbgl/util/feature.hpp>
#include <mbgl/util/throttler.hpp>
#include <mbgl/actor/actor.hpp>
+#include <mbgl/geometry/feature_index.hpp>
#include <atomic>
#include <memory>
@@ -17,8 +19,6 @@
namespace mbgl {
class GeometryTileData;
-class FeatureIndex;
-class CollisionTile;
class RenderStyle;
class RenderLayer;
class SourceQueryOptions;
@@ -71,6 +71,15 @@ public:
std::unique_ptr<FeatureIndex> featureIndex;
std::unique_ptr<GeometryTileData> tileData;
uint64_t correlationID;
+
+ LayoutResult(std::unordered_map<std::string, std::shared_ptr<Bucket>> nonSymbolBuckets_,
+ std::unique_ptr<FeatureIndex> featureIndex_,
+ std::unique_ptr<GeometryTileData> tileData_,
+ uint64_t correlationID_)
+ : nonSymbolBuckets(std::move(nonSymbolBuckets_)),
+ featureIndex(std::move(featureIndex_)),
+ tileData(std::move(tileData_)),
+ correlationID(correlationID_) {}
};
void onLayout(LayoutResult);
@@ -81,6 +90,17 @@ public:
optional<AlphaImage> glyphAtlasImage;
optional<PremultipliedImage> iconAtlasImage;
uint64_t correlationID;
+
+ PlacementResult(std::unordered_map<std::string, std::shared_ptr<Bucket>> symbolBuckets_,
+ std::unique_ptr<CollisionTile> collisionTile_,
+ optional<AlphaImage> glyphAtlasImage_,
+ optional<PremultipliedImage> iconAtlasImage_,
+ uint64_t correlationID_)
+ : symbolBuckets(std::move(symbolBuckets_)),
+ collisionTile(std::move(collisionTile_)),
+ glyphAtlasImage(std::move(glyphAtlasImage_)),
+ iconAtlasImage(std::move(iconAtlasImage_)),
+ correlationID(correlationID_) {}
};
void onPlacement(PlacementResult);