summaryrefslogtreecommitdiffstats
path: root/src/display/drawing-item.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/display/drawing-item.cpp')
-rw-r--r--src/display/drawing-item.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/display/drawing-item.cpp b/src/display/drawing-item.cpp
index 3a4f5cfc2..fdc619bd4 100644
--- a/src/display/drawing-item.cpp
+++ b/src/display/drawing-item.cpp
@@ -674,13 +674,14 @@ DrawingItem::render(DrawingContext &dc, Geom::IntRect const &area, unsigned flag
return RENDER_OK;
}
+ setCached(true, true);
+
// carea is the area to paint
Geom::OptIntRect carea = Geom::intersect(area, _drawbox);
// expand render on filtered items
Geom::OptIntRect cl = _cacheRect();
if (_filter != nullptr && render_filters && cl) {
- setCached(true, true);
carea = cl;
}
@@ -741,7 +742,7 @@ DrawingItem::render(DrawingContext &dc, Geom::IntRect const &area, unsigned flag
nir |= (_mask != nullptr); // 2. it has a mask
nir |= (_filter != nullptr && render_filters); // 3. it has a filter
nir |= needs_opacity; // 4. it is non-opaque
- nir |= (_cache != nullptr); // 5. it is to be cached
+
/* How the rendering is done.
*
* Clipping, masking and opacity are done by rendering them to a surface
@@ -752,6 +753,15 @@ DrawingItem::render(DrawingContext &dc, Geom::IntRect const &area, unsigned flag
* value corresponding to the opacity. If there is no clipping path,
* the entire intermediate surface is painted with alpha corresponding
* to the opacity value.
+ *
+ * Blending, isolation and _cache nir check are removed because:
+ * Blending: is handled in the shortcircuit
+ * Isolation: Is handles in drawing-group
+ * _cache: if nir is false, we realy dont want a cache element, never do it
+ * previously on bug exception when previous state of nir is true that cause
+ * inconguences with cache noticiable changing zoom, removing _cache from nir
+ * and deleting it inside the shortcicuit seems the correct way to do
+ *
*/
// Short-circuit the simple case.
// We also use this path for filter background rendering, because masking, clipping,
@@ -759,9 +769,7 @@ DrawingItem::render(DrawingContext &dc, Geom::IntRect const &area, unsigned flag
// element
if ((flags & RENDER_FILTER_BACKGROUND) || !needs_intermediate_rendering) {
- if (_cache) {
- _cache->markDirty(*carea);
- }
+ setCached(false, true);
dc.setOperator(ink_css_blend_to_cairo_operator(_mix_blend_mode));
return _renderItem(dc, *carea, flags & ~RENDER_FILTER_BACKGROUND, stop_at);
}