summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2017-11-03 07:22:02 +0000
committerTavmjong Bah <tavmjong@free.fr>2017-11-03 07:22:02 +0000
commit12b60f0fc1171b61f67b1acd4160ca06e13f0898 (patch)
tree26e10ff24fc8902f5ed197f0a7acd49a9020c8f6
parentGive each filter primitive a name to help in debugging. (diff)
downloadinkscape-12b60f0fc1171b61f67b1acd4160ca06e13f0898.tar.gz
inkscape-12b60f0fc1171b61f67b1acd4160ca06e13f0898.zip
Don't use infinite rectangle for tile area as this leads to overflow/underflow problems later.
-rw-r--r--src/display/nr-filter-tile.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/display/nr-filter-tile.cpp b/src/display/nr-filter-tile.cpp
index c151c8537..ad4e64768 100644
--- a/src/display/nr-filter-tile.cpp
+++ b/src/display/nr-filter-tile.cpp
@@ -114,8 +114,11 @@ void FilterTile::render_cairo(FilterSlot &slot)
void FilterTile::area_enlarge(Geom::IntRect &area, Geom::Affine const &trans)
{
- // Set to infinite rectangle so we get tile source. It will be clipped later.
- area = Geom::IntRect::infinite();
+ // Set to very large rectangle so we get tile source. It will be clipped later.
+
+ // Note, setting to infinite using Geom::IntRect::infinite() causes overflow/underflow problems.
+ Geom::IntCoord max = std::numeric_limits<Geom::IntCoord>::max()/4;
+ area = Geom::IntRect(-max,-max,max,max);
}
double FilterTile::complexity(Geom::Affine const &)