[librsvg: 19/90] Pass the current node_bbox to the filters from the toplevel with_discrete_layer()



commit f6a536afd6409424be9d94854e4fd638f0452091
Author: Federico Mena Quintero <federico gnome org>
Date:   Mon Mar 11 15:14:17 2019 -0600

    Pass the current node_bbox to the filters from the toplevel with_discrete_layer()

 rsvg_internals/src/drawing_ctx.rs | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/rsvg_internals/src/drawing_ctx.rs b/rsvg_internals/src/drawing_ctx.rs
index c9966a1e..85f2253a 100644
--- a/rsvg_internals/src/drawing_ctx.rs
+++ b/rsvg_internals/src/drawing_ctx.rs
@@ -472,7 +472,7 @@ impl DrawingCtx {
                 let child_surface = cairo::ImageSurface::from(self.cr.get_target()).unwrap();
 
                 let filter_result_surface = if let Some(filter_uri) = filter {
-                    self.run_filter(filter_uri, node, values, &child_surface)
+                    self.run_filter(filter_uri, node, values, &child_surface, self.bbox)
                         .map_err(|e| {
                             self.cr.restore();
                             e
@@ -536,6 +536,7 @@ impl DrawingCtx {
         node: &RsvgNode,
         values: &ComputedValues,
         child_surface: &cairo::ImageSurface,
+        node_bbox: BoundingBox,
     ) -> Result<cairo::ImageSurface, RenderingError> {
         match self.get_acquired_node_of_type(Some(filter_uri), NodeType::Filter) {
             Some(acquired) => {
@@ -543,7 +544,7 @@ impl DrawingCtx {
 
                 if !filter_node.is_in_error() {
                     // FIXME: deal with out of memory here
-                    filters::render(&filter_node, values, child_surface, self, self.bbox)
+                    filters::render(&filter_node, values, child_surface, self, node_bbox)
                 } else {
                     Ok(child_surface.clone())
                 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]