Merge branch 'master' into harfbuzz-shaper

This commit is contained in:
artemp 2017-02-17 14:06:44 +01:00
commit a5f00c6fa1
3 changed files with 17 additions and 5 deletions

View file

@ -28,6 +28,13 @@
#include <boost/fusion/include/std_pair.hpp>
#pragma GCC diagnostic pop
#if defined(HAVE_PNG)
extern "C"
{
#include <png.h>
}
#endif // HAVE_PNG
namespace mapnik { namespace grammar {
namespace x3 = boost::spirit::x3;
@ -76,10 +83,6 @@ image_options_map parse_image_options(std::string const& str)
}
#if defined(HAVE_PNG)
extern "C"
{
#include <png.h>
}
int parse_png_filters(std::string const& str)
{
@ -113,6 +116,7 @@ int parse_png_filters(std::string const& str)
std::for_each(opts.begin(), opts.end(), [&filters] (int f) { filters |= f;});
return filters;
}
#endif
#endif // HAVE_PNG
} // ns mapnik

View file

@ -25,7 +25,10 @@ extern "C"
{
#include <png.h>
}
#ifndef PNG_FAST_FILTERS // libpng < 1.6
#define PNG_FAST_FILTERS ( PNG_FILTER_NONE | PNG_FILTER_SUB | PNG_FILTER_UP )
#endif
#endif // HAVE_PNG
// mapnik
#if defined(HAVE_PNG)

View file

@ -316,6 +316,11 @@ std::pair<bool,typename T::value_type::first_type> process_geojson_file_x3(T & b
}
}
}
else if (validate_features)
{
if (verbose) std::clog << "Invalid bbox encountered " << item.first << std::endl;
return std::make_pair(false, extent);
}
}
return std::make_pair(true, extent);
}