[librsvg: 13/17] Check for the filter node being in error in the caller of filters::render
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 13/17] Check for the filter node being in error in the caller of filters::render
- Date: Sat, 17 Apr 2021 01:46:05 +0000 (UTC)
commit acac445cec70b8fa5f8c9ce70cf8bebb018d857a
Author: Federico Mena Quintero <federico gnome org>
Date: Fri Apr 16 20:07:31 2021 -0500
Check for the filter node being in error in the caller of filters::render
src/drawing_ctx.rs | 12 +++++++++---
src/filters/mod.rs | 4 ----
2 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/src/drawing_ctx.rs b/src/drawing_ctx.rs
index ca196acd..727e6e68 100644
--- a/src/drawing_ctx.rs
+++ b/src/drawing_ctx.rs
@@ -941,10 +941,16 @@ impl DrawingCtx {
// handling?
match acquired_nodes.acquire(filter_uri) {
Ok(acquired) => {
- let filter_node = acquired.get();
+ let node = acquired.get();
- match *filter_node.borrow_element() {
+ let element = node.borrow_element();
+
+ match *element {
Element::Filter(_) => {
+ if element.is_in_error() {
+ return Ok(child_surface);
+ }
+
let stroke_paint_source = values
.stroke()
.0
@@ -958,7 +964,7 @@ impl DrawingCtx {
.to_user_space(&node_bbox, self, values);
return filters::render(
- &filter_node,
+ &node,
stroke_paint_source,
fill_paint_source,
child_surface,
diff --git a/src/filters/mod.rs b/src/filters/mod.rs
index 69f60f29..f5e7d564 100644
--- a/src/filters/mod.rs
+++ b/src/filters/mod.rs
@@ -254,10 +254,6 @@ pub fn render(
let filter_element = filter_node.borrow_element();
- if filter_element.is_in_error() {
- return Ok(source_surface);
- }
-
let user_space_filter = {
let filter_values = filter_element.get_computed_values();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]