diff options
author | Federico Mena Quintero <federico@gnome.org> | 2023-01-24 16:19:45 -0600 |
---|---|---|
committer | Federico Mena Quintero <federico@gnome.org> | 2023-01-24 16:19:45 -0600 |
commit | 47ddbe5ec133c5402388b93833ecb8463142fb8b (patch) | |
tree | d4e17c56a4b094a5671219f1f53f4964d1f3eb0f | |
parent | 3a5d25b88662143007ac7143ddcb69a4be57ee3e (diff) | |
download | librsvg-47ddbe5ec133c5402388b93833ecb8463142fb8b.tar.gz |
filters: log the bounds of a few filters
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/787>
-rw-r--r-- | src/filters/flood.rs | 3 | ||||
-rw-r--r-- | src/filters/mod.rs | 8 | ||||
-rw-r--r-- | src/filters/offset.rs | 1 |
3 files changed, 11 insertions, 1 deletions
diff --git a/src/filters/flood.rs b/src/filters/flood.rs index a3f06422..50838207 100644 --- a/src/filters/flood.rs +++ b/src/filters/flood.rs @@ -36,9 +36,10 @@ impl Flood { bounds_builder: BoundsBuilder, ctx: &FilterContext, _acquired_nodes: &mut AcquiredNodes<'_>, - _draw_ctx: &mut DrawingCtx, + draw_ctx: &mut DrawingCtx, ) -> Result<FilterOutput, FilterError> { let bounds: IRect = bounds_builder.compute(ctx).clipped.into(); + rsvg_log!(draw_ctx.session(), "(feFlood bounds={:?}", bounds); let surface = ctx.source_graphic().flood(bounds, self.color)?; diff --git a/src/filters/mod.rs b/src/filters/mod.rs index c2ec8168..1e2560c4 100644 --- a/src/filters/mod.rs +++ b/src/filters/mod.rs @@ -272,6 +272,8 @@ pub fn render( node_bbox, ) .and_then(|mut filter_ctx| { + // the message has an unclosed parenthesis; we'll close it below. + rsvg_log!(session, "(rendering filter with effects_region={:?}", filter_ctx.effects_region()); for user_space_primitive in &filter.primitives { let start = Instant::now(); @@ -299,6 +301,9 @@ pub fn render( err ); + // close the opening parenthesis from the message at the start of this function + rsvg_log!(session, ")"); + // Exit early on Cairo errors. Continue rendering otherwise. if let FilterError::CairoError(status) = err { return Err(FilterError::CairoError(status)); @@ -307,6 +312,9 @@ pub fn render( } } + // close the opening parenthesis from the message at the start of this function + rsvg_log!(session, ")"); + Ok(filter_ctx.into_output()?) }) .or_else(|err| match err { diff --git a/src/filters/offset.rs b/src/filters/offset.rs index acdbab1a..27698b05 100644 --- a/src/filters/offset.rs +++ b/src/filters/offset.rs @@ -76,6 +76,7 @@ impl Offset { .compute(ctx) .clipped .into(); + rsvg_log!(draw_ctx.session(), "(feOffset bounds={:?}", bounds); let (dx, dy) = ctx.paffine().transform_distance(self.dx, self.dy); |