diff --git a/benchmark/test_rendering.cpp b/benchmark/test_rendering.cpp index 73ab6fb74..a5a76d06e 100644 --- a/benchmark/test_rendering.cpp +++ b/benchmark/test_rendering.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include class test : public benchmark::test_case @@ -36,17 +37,22 @@ public: if (!extent_.from_string(*ext)) throw std::runtime_error("could not parse `extent` string" + *ext); } + /* else { throw std::runtime_error("please provide a --extent= arg"); - } + }*/ } bool validate() const { mapnik::Map m(width_,height_); mapnik::load_map(m,xml_,true); - m.zoom_to_box(extent_); + if (extent_.valid()) { + m.zoom_to_box(extent_); + } else { + m.zoom_all(); + } mapnik::image_32 im(m.width(),m.height()); mapnik::agg_renderer ren(m,im); ren.apply(); @@ -57,7 +63,11 @@ public: { mapnik::Map m(width_,height_); mapnik::load_map(m,xml_); - m.zoom_to_box(extent_); + if (extent_.valid()) { + m.zoom_to_box(extent_); + } else { + m.zoom_all(); + } for (unsigned i=0;i