[librsvg: 5/27] Just pass the node name to DrawingCtx.run_filters, not the whole node
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 5/27] Just pass the node name to DrawingCtx.run_filters, not the whole node
- Date: Fri, 5 Mar 2021 23:36:26 +0000 (UTC)
commit 3dbc7c245f9015556047d7264bbdba53afbedb43
Author: Federico Mena Quintero <federico gnome org>
Date: Thu Mar 4 19:20:42 2021 -0600
Just pass the node name to DrawingCtx.run_filters, not the whole node
Same as before.
src/drawing_ctx.rs | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/src/drawing_ctx.rs b/src/drawing_ctx.rs
index 49bb5d81..fed9dd4d 100644
--- a/src/drawing_ctx.rs
+++ b/src/drawing_ctx.rs
@@ -682,10 +682,16 @@ impl DrawingCtx {
};
// Filter
- let source_surface =
- saved_cr
- .draw_ctx
- .run_filters(&filters, acquired_nodes, node, values, bbox)?;
+
+ let node_name = format!("{}", node);
+
+ let source_surface = saved_cr.draw_ctx.run_filters(
+ &filters,
+ acquired_nodes,
+ &node_name,
+ values,
+ bbox,
+ )?;
saved_cr.draw_ctx.pop_cairo_context();
@@ -880,15 +886,13 @@ impl DrawingCtx {
&mut self,
filters: &Filter,
acquired_nodes: &mut AcquiredNodes<'_>,
- node: &Node,
+ node_name: &str,
values: &ComputedValues,
node_bbox: BoundingBox,
) -> Result<cairo::Surface, RenderingError> {
let surface = match filters {
Filter::None => self.cr.get_target(),
Filter::List(filter_list) => {
- let node_name = format!("{}", node);
-
if filter_list.is_applicable(&node_name, acquired_nodes) {
// The target surface has multiple references.
// We need to copy it to a new surface to have a unique
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]