[librsvg: 42/45] Move the resolved field into Common
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 42/45] Move the resolved field into Common
- Date: Tue, 1 Oct 2019 15:10:28 +0000 (UTC)
commit 35056239a4a2152ef9ec39509449c87a186f9a0a
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Oct 1 07:42:30 2019 -0500
Move the resolved field into Common
rsvg_internals/src/gradient.rs | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/rsvg_internals/src/gradient.rs b/rsvg_internals/src/gradient.rs
index 38ca2c9b..b72956b1 100644
--- a/rsvg_internals/src/gradient.rs
+++ b/rsvg_internals/src/gradient.rs
@@ -304,6 +304,8 @@ struct Common {
spread: Option<SpreadMethod>,
fallback: Option<Fragment>,
+
+ resolved: RefCell<Option<Gradient>>,
}
#[derive(Default)]
@@ -314,8 +316,6 @@ pub struct NodeLinearGradient {
y1: Option<LengthVertical>,
x2: Option<LengthHorizontal>,
y2: Option<LengthVertical>,
-
- resolved: RefCell<Option<Gradient>>,
}
#[derive(Default)]
@@ -327,8 +327,6 @@ pub struct NodeRadialGradient {
r: Option<LengthBoth>,
fx: Option<LengthHorizontal>,
fy: Option<LengthVertical>,
-
- resolved: RefCell<Option<Gradient>>,
}
struct UnresolvedGradient {
@@ -602,7 +600,7 @@ macro_rules! impl_paint_source {
node: &RsvgNode,
draw_ctx: &mut DrawingCtx,
) -> Result<Self::Resolved, PaintServerError> {
- let mut resolved = self.resolved.borrow_mut();
+ let mut resolved = self.common.resolved.borrow_mut();
if let Some(ref gradient) = *resolved {
return Ok(gradient.clone());
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]