From 2fae373fc9da1a5ed61b5114d8c982073734826d Mon Sep 17 00:00:00 2001 From: Bruno de Oliveira Abinader Date: Tue, 11 Jul 2017 19:15:10 +0300 Subject: [core] GCC 4.9 is unable to deduce ctors when using bracket init --- src/mbgl/gl/texture.hpp | 20 +++++++++++++++---- src/mbgl/renderer/tile_parameters.hpp | 27 ++++++++++++++++++++++--- src/mbgl/renderer/update_parameters.hpp | 35 ++++++++++++++++++++++++++++++++- src/mbgl/tile/geometry_tile.hpp | 24 ++++++++++++++++++++-- 4 files changed, 96 insertions(+), 10 deletions(-) (limited to 'src') 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 light_, + const Immutable>> images_, + const Immutable>> sources_, + const Immutable>> 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 #include #include +#include #include #include #include +#include #include #include @@ -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; std::unique_ptr tileData; uint64_t correlationID; + + LayoutResult(std::unordered_map> nonSymbolBuckets_, + std::unique_ptr featureIndex_, + std::unique_ptr 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 glyphAtlasImage; optional iconAtlasImage; uint64_t correlationID; + + PlacementResult(std::unordered_map> symbolBuckets_, + std::unique_ptr collisionTile_, + optional glyphAtlasImage_, + optional 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); -- cgit v1.2.1