From cb869e60f32ebf01ab278e27ffa5070165b2d32b Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Thu, 19 Feb 2015 01:36:43 -0800 Subject: [PATCH] no need for templated 'raster_marker_render_thunk' --- .../mapnik/renderer_common/process_group_symbolizer.hpp | 9 +++------ src/agg/process_group_symbolizer.cpp | 2 +- src/cairo/process_group_symbolizer.cpp | 2 +- src/renderer_common/process_group_symbolizer.cpp | 5 ++--- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/include/mapnik/renderer_common/process_group_symbolizer.hpp b/include/mapnik/renderer_common/process_group_symbolizer.hpp index da5900de9..d1dbcf474 100644 --- a/include/mapnik/renderer_common/process_group_symbolizer.hpp +++ b/include/mapnik/renderer_common/process_group_symbolizer.hpp @@ -127,16 +127,15 @@ struct vector_marker_render_thunk : util::noncopyable snap_to_pixels_(std::move(rhs.snap_to_pixels_)) {} }; -template struct raster_marker_render_thunk : util::noncopyable { - BufferType const& src_; + image_rgba8 const& src_; agg::trans_affine tr_; double opacity_; composite_mode_e comp_op_; bool snap_to_pixels_; - raster_marker_render_thunk(BufferType const& src, + raster_marker_render_thunk(image_rgba8 const& src, agg::trans_affine const& marker_trans, double opacity, composite_mode_e comp_op, @@ -150,8 +149,6 @@ struct raster_marker_render_thunk : util::noncopyable snap_to_pixels_(std::move(rhs.snap_to_pixels_)) {} }; -template struct raster_marker_render_thunk; - using helper_ptr = std::unique_ptr; struct text_render_thunk : util::noncopyable @@ -181,7 +178,7 @@ struct text_render_thunk : util::noncopyable // via a static visitor later. using render_thunk = util::variant, + raster_marker_render_thunk, text_render_thunk>; using render_thunk_ptr = std::unique_ptr; using render_thunk_list = std::list; diff --git a/src/agg/process_group_symbolizer.cpp b/src/agg/process_group_symbolizer.cpp index 5ed8cae1c..df930f2ac 100644 --- a/src/agg/process_group_symbolizer.cpp +++ b/src/agg/process_group_symbolizer.cpp @@ -94,7 +94,7 @@ struct thunk_renderer render_vector_marker(svg_renderer, *ras_ptr_, renb, thunk.src_->bounding_box(), offset_tr, thunk.opacity_, thunk.snap_to_pixels_); } - void operator()(raster_marker_render_thunk const &thunk) const + void operator()(raster_marker_render_thunk const &thunk) const { using blender_type = agg::comp_op_adaptor_rgba_pre; // comp blender using buf_type = agg::rendering_buffer; diff --git a/src/cairo/process_group_symbolizer.cpp b/src/cairo/process_group_symbolizer.cpp index 216114347..1e46a2028 100644 --- a/src/cairo/process_group_symbolizer.cpp +++ b/src/cairo/process_group_symbolizer.cpp @@ -77,7 +77,7 @@ struct thunk_renderer thunk.opacity_); } - void operator()(raster_marker_render_thunk const &thunk) const + void operator()(raster_marker_render_thunk const& thunk) const { cairo_save_restore guard(context_); context_.set_operator(thunk.comp_op_); diff --git a/src/renderer_common/process_group_symbolizer.cpp b/src/renderer_common/process_group_symbolizer.cpp index eedd1e1a1..3725220fb 100644 --- a/src/renderer_common/process_group_symbolizer.cpp +++ b/src/renderer_common/process_group_symbolizer.cpp @@ -39,8 +39,7 @@ vector_marker_render_thunk::vector_marker_render_thunk(svg_path_ptr const& src, comp_op_(comp_op), snap_to_pixels_(snap_to_pixels) {} -template <> -raster_marker_render_thunk::raster_marker_render_thunk(image_rgba8 const& src, +raster_marker_render_thunk::raster_marker_render_thunk(image_rgba8 const& src, agg::trans_affine const& marker_trans, double opacity, composite_mode_e comp_op, @@ -116,7 +115,7 @@ struct raster_marker_thunk_dispatch : public raster_markers_dispatch void render_marker(agg::trans_affine const& marker_tr, double opacity) { - raster_marker_render_thunk thunk(this->src_, marker_tr, opacity, comp_op_, snap_to_pixels_); + raster_marker_render_thunk thunk(this->src_, marker_tr, opacity, comp_op_, snap_to_pixels_); thunks_.push_back(std::make_unique(std::move(thunk))); }