[librsvg: 2/45] set_pattern_on_draw_context(): consume the pattern instead of borrowing it
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 2/45] set_pattern_on_draw_context(): consume the pattern instead of borrowing it
- Date: Tue, 1 Oct 2019 15:07:06 +0000 (UTC)
commit 453e81b9acbc41fc6160c09ea92515200a881e87
Author: Federico Mena Quintero <federico gnome org>
Date: Thu Sep 26 17:11:19 2019 -0500
set_pattern_on_draw_context(): consume the pattern instead of borrowing it
This should help in subsequent commits.
rsvg_internals/src/gradient.rs | 2 +-
rsvg_internals/src/paint_server.rs | 4 ++--
rsvg_internals/src/pattern.rs | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/rsvg_internals/src/gradient.rs b/rsvg_internals/src/gradient.rs
index 3f4ffb69..a275aae1 100644
--- a/rsvg_internals/src/gradient.rs
+++ b/rsvg_internals/src/gradient.rs
@@ -554,7 +554,7 @@ macro_rules! impl_paint_source {
fn set_pattern_on_draw_context(
&self,
- gradient: &Self::Source,
+ gradient: Self::Source,
values: &ComputedValues,
draw_ctx: &mut DrawingCtx,
opacity: &UnitInterval,
diff --git a/rsvg_internals/src/paint_server.rs b/rsvg_internals/src/paint_server.rs
index e9de3c0b..f65b3369 100644
--- a/rsvg_internals/src/paint_server.rs
+++ b/rsvg_internals/src/paint_server.rs
@@ -66,7 +66,7 @@ pub trait PaintSource {
fn set_pattern_on_draw_context(
&self,
- pattern: &Self::Source,
+ pattern: Self::Source,
values: &ComputedValues,
draw_ctx: &mut DrawingCtx,
opacity: &UnitInterval,
@@ -83,7 +83,7 @@ pub trait PaintSource {
if let Some(resolved) = self.resolve(&node, draw_ctx, bbox)? {
let cascaded = CascadedValues::new_from_node(node);
let values = cascaded.get();
- self.set_pattern_on_draw_context(&resolved, values, draw_ctx, opacity, bbox)
+ self.set_pattern_on_draw_context(resolved, values, draw_ctx, opacity, bbox)
} else {
Ok(false)
}
diff --git a/rsvg_internals/src/pattern.rs b/rsvg_internals/src/pattern.rs
index 90977205..097bb255 100644
--- a/rsvg_internals/src/pattern.rs
+++ b/rsvg_internals/src/pattern.rs
@@ -181,7 +181,7 @@ impl PaintSource for NodePattern {
fn set_pattern_on_draw_context(
&self,
- pattern: &Self::Source,
+ pattern: Self::Source,
values: &ComputedValues,
draw_ctx: &mut DrawingCtx,
_opacity: &UnitInterval,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]