diff --git a/src/display/drawing-item.cpp b/src/display/drawing-item.cpp index ae7dfe40ef56eba458dbbd12861e287f27e14cde..b76ad9870650efe6e633d9ec63e03ead9050c803 100644 --- a/src/display/drawing-item.cpp +++ b/src/display/drawing-item.cpp @@ -739,7 +739,7 @@ DrawingItem::render(DrawingContext &dc, Geom::IntRect const &area, unsigned flag nir |= needs_opacity; // 4. it is non-opaque nir |= (_mix_blend_mode != SP_CSS_BLEND_NORMAL); // 5. it has blend mode nir |= (_isolation == SP_CSS_ISOLATION_ISOLATE); // 6. it is isolated - nir |= !parent(); // 7. is root need isolation from background + if (prev_nir && !needs_intermediate_rendering) { setCached(false, true); if (_has_cache_iterator) { @@ -799,11 +799,7 @@ DrawingItem::render(DrawingContext &dc, Geom::IntRect const &area, unsigned flag unsigned render_result = RENDER_OK; // 1. Render clipping path with alpha = opacity. - if (parent()) { - ict.setSource(0,0,0,_opacity); - } else { - ict.setSource(255, 255, 255, 1); - } + ict.setSource(0,0,0,_opacity); // Since clip can be combined with opacity, the result could be incorrect // for overlapping clip children. To fix this we use the SOURCE operator // instead of the default OVER. @@ -881,9 +877,6 @@ DrawingItem::render(DrawingContext &dc, Geom::IntRect const &area, unsigned flag dc.setOperator(ink_css_blend_to_cairo_operator(_mix_blend_mode)); dc.fill(); dc.setSource(0,0,0,0); - // Web isolation only works if parent doesnt have transform - - // the call above is to clear a ref on the intermediate surface held by dc return render_result; diff --git a/src/display/sp-canvas.cpp b/src/display/sp-canvas.cpp index 216c8437f43de4ff7bf94727ab5e4c3831193d3c..fb7e29eb083172b0baa7decb7ca5addb5f41f099 100644 --- a/src/display/sp-canvas.cpp +++ b/src/display/sp-canvas.cpp @@ -1928,6 +1928,7 @@ void SPCanvas::paintXRayBuffer(Geom::IntRect const &paint_rect, Geom::IntRect co cairo_set_operator(buf.ct, CAIRO_OPERATOR_SOURCE); cairo_paint(buf.ct); cairo_translate(buf.ct, paint_rect.left(), paint_rect.top()); + cairo_set_operator(buf.ct, CAIRO_OPERATOR_OVER); // cairo_surface_write_to_png( copy_backing, "debug1.png" );