[librsvg] filters: shorten context code
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] filters: shorten context code
- Date: Wed, 11 Dec 2019 20:03:43 +0000 (UTC)
commit fde742246a2acd7bc7aa6aefc7633bf858807c04
Author: Paolo Borelli <pborelli gnome org>
Date: Wed Dec 11 20:09:29 2019 +0100
filters: shorten context code
rsvg_internals/src/filters/context.rs | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/rsvg_internals/src/filters/context.rs b/rsvg_internals/src/filters/context.rs
index e3719198..a10b3074 100644
--- a/rsvg_internals/src/filters/context.rs
+++ b/rsvg_internals/src/filters/context.rs
@@ -242,12 +242,6 @@ impl FilterContext {
.map_err(FilterError::CairoError)
}
- /// Returns the output of the filter primitive by its result name.
- #[inline]
- pub fn filter_output(&self, name: &str) -> Option<&FilterOutput> {
- self.previous_results.get(name)
- }
-
/// Converts this `FilterContext` into the surface corresponding to the output of the filter
/// chain.
///
@@ -399,7 +393,8 @@ impl FilterContext {
.map(FilterInput::StandardInput),
Input::FilterOutput(ref name) => self
- .filter_output(name)
+ .previous_results
+ .get(name)
.cloned()
.map(FilterInput::PrimitiveOutput)
.ok_or(FilterError::InvalidInput),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]