[librsvg: 18/45] DrawingCtx: expose a session() method so it can be used around




commit 156f1dabc7d92e23b8744be1555bfbdfd869ba86
Author: Federico Mena Quintero <federico gnome org>
Date:   Mon Aug 22 18:59:24 2022 -0500

    DrawingCtx: expose a session() method so it can be used around
    
    Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/731>

 src/drawing_ctx.rs | 4 ++++
 src/marker.rs      | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/drawing_ctx.rs b/src/drawing_ctx.rs
index 3a44fd77f..93a6e03d7 100644
--- a/src/drawing_ctx.rs
+++ b/src/drawing_ctx.rs
@@ -340,6 +340,10 @@ impl DrawingCtx {
         }
     }
 
+    pub fn session(&self) -> &Session {
+        &self.session
+    }
+
     pub fn user_language(&self) -> &UserLanguage {
         &self.user_language
     }
diff --git a/src/marker.rs b/src/marker.rs
index ee438201a..5acab183f 100644
--- a/src/marker.rs
+++ b/src/marker.rs
@@ -596,7 +596,7 @@ fn emit_marker_by_node(
         }
 
         Err(e) => {
-            rsvg_log!("could not acquire marker: {}", e);
+            rsvg_log_session!(draw_ctx.session(), "could not acquire marker: {}", e);
             Ok(draw_ctx.empty_bbox())
         }
     }


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