summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2018-11-05 21:52:16 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2018-11-05 21:52:16 +0000
commitc456140053015a43d2aa7d36686deadaa4daa676 (patch)
treedcf6c209f6f62d723ab1092c2476037fb1d59007 /src
parentFixing bad destruction of Fillet Chamfer LPE items (diff)
downloadinkscape-c456140053015a43d2aa7d36686deadaa4daa676.tar.gz
inkscape-c456140053015a43d2aa7d36686deadaa4daa676.zip
Add filter rendering improvements by caching
Diffstat (limited to 'src')
-rw-r--r--src/display/drawing-item.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/display/drawing-item.cpp b/src/display/drawing-item.cpp
index aa2793908..f83d0eaeb 100644
--- a/src/display/drawing-item.cpp
+++ b/src/display/drawing-item.cpp
@@ -699,6 +699,12 @@ DrawingItem::render(DrawingContext &dc, Geom::IntRect const &area, unsigned flag
Geom::OptIntRect carea = Geom::intersect(area, _drawbox);
if (!carea) return RENDER_OK;
+ // expand render on filtered items
+ Geom::OptIntRect cl = _cacheRect();
+ if (_filter && render_filters) {
+ carea = cl;
+ }
+
// Device scale for HiDPI screens (typically 1 or 2)
int device_scale = dc.surface()->device_scale();
@@ -731,8 +737,6 @@ DrawingItem::render(DrawingContext &dc, Geom::IntRect const &area, unsigned flag
// There is no cache. This could be because caching of this item
// was just turned on after the last update phase, or because
// we were previously outside of the canvas.
- Geom::OptIntRect cl = _drawing.cacheLimit();
- cl.intersectWith(_drawbox);
if (cl) {
_cache = new DrawingCache(*cl, device_scale);
}