| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/802>
|
|
|
|
|
|
|
| |
The time 0.1 crate has a CVE attached to it.
The newly specified features will be the default for chrono 0.5.
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/802>
|
|\
| |
| |
| |
| | |
Reduce binary size a bit; remove ElementInner<T>
See merge request GNOME/librsvg!801
|
| |
| |
| |
| | |
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/801>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We had this structure:
enum Element {
Circle(Box<ElementInner<Circle>>),
// ... all the supported elements
}
struct ElementInner<T> {
// fields to hold element's name, attributes, SpecifiedValues, etc.
element_impl: T
}
However, "impl ElementInner" has a little bunch of methods, which get
monomorphized for each supported element type. These methods don't do
anything with the "element_impl: T".
Instead, we now have this structure:
struct Element {
// fields to hold element's name, attributes, SpecifiedValues, etc.
element_data: ElementData,
}
enum ElementData {
Circle(Box<Circle>),
// ... all the supported elements
}
The Circle inside the Box, and all the other structs for element
types, implement ElementTrait which has the ::draw() method.
I'm using concrete types inside the boxes, not Box<ElementTrait>, to
avoid having to downcast to the concrete type. The only place that
dispatches dynamically is ElementData::draw().
The call_inner!() macro goes away, since it doesn't need to delegate
things to the ElementInner any more. All the interesting stuff
happens directly in struct Element.
The rest of the code doesn't need too many changes, since all the
borrowing and type checking happens in the NodeBorrow trait - its
borrow_element*() methods, and the macros is_element_of_type!() and
borrow_element_as!().
Together with the previous commit that simplifies feComponentTransfer,
this removes 186912 bytes from the .text section of rsvg-convert (per
objdump's numbers).
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/801>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This more or less reverts 6608c133d501bca6ffe2d1288539c91882fe5bdb,
with this purpose:
Right now, ElementInner<T> produces a lot of monomorphized code.
E.g. there are 28 implementations of this:
0.0% 0.0% 825B librsvg librsvg::element::ElementInner<T>::set_style_attribute
0.0% 0.0% 825B librsvg librsvg::element::ElementInner<T>::set_style_attribute
0.0% 0.0% 825B librsvg librsvg::element::ElementInner<T>::set_style_attribute
0.0% 0.0% 825B librsvg librsvg::element::ElementInner<T>::set_style_attribute
0.0% 0.0% 825B librsvg librsvg::element::ElementInner<T>::set_style_attribute
(The above comes from "cargo bloat --release -n 0 --filter librsvg".)
Inside ElementInner, I want to basically have a field
"element_impl: Box<dyn ElementTrait>" instead of "element_impl: T".
This should cut down the generated code, so we are basically trading
cache locality or code size for a little dynamic dispatch.
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/801>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In 6608c133d501bca6ffe2d1288539c91882fe5bdb, ElementTrait was split
into two traits, SetAttributes and Draw.
The purpose of SetAttributes back then was just to be able to
implement it for gradient::Common, which is a simple struct, not an
SVG element.
Since it is *not* an element, let's not use that trait for it at all.
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/801>
|
| |
| |
| |
| |
| |
| |
| |
| | |
All of FeFunc{R,G,B,A} are the same except for the type name. So,
instead of duplicating all their code with a macro, extract the common
bits to a FeFuncCommon struct.
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/801>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a vestige of the C code. All the feFuncX elements were
represented with a single struct that had a "channel" field, to
identify which is which.
<feComponentTransfer ...>
<feFuncR .../>
<feFuncG .../>
</feComponentTransfer>
When scanning the children of feComponentTransfer, the individual
func->channel were tested to see which of the children is the Red
function, which the Green function, etc.
But now we identify the individual functions by their element type, so
we can just do `matches!(element, Element::FeFuncR)` or similar.
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/801>
|
|\
| |
| |
| |
| |
| |
| | |
(#930): Validate all clipPath and mask transforms
Closes #930
See merge request GNOME/librsvg!800
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, an invalid "transform" property specified for clipPath
would bubble up as a non-recoverable "invalid matrix" error from
Cairo, stopping rendering at that point. Instead, we want to validate
all transforms and just not render the offending element.
This commit has many changes:
* Introduce a ValidTransform newtype, created with "impl
TryFrom<Transform> for Transform". This sees if the transform is
invertible before wrapping it. The idea is to do all transform
operations first, then see if the result is valid by trying to convert
to a ValidTransform.
* There is no "impl From<Transform> for cairo::Matrix" anymore, but
there is From<ValidTransform>. That way, we guarantee that an
unvalidated transform cannot be easily set on a Cairo context.
* DrawingCtx::get_transform() returns a ValidTransform, since a) it
comes from the cr, and Cairo already validated that transform for
us. Otherwise, the cr would have been in an error state.
* There is a new variant RenderingError::InvalidTransform, which lets
us use "?" everywhere as normal. This error case is caught in
Node::draw() and the node is just not drawn. Eventually we can move
to a scheme where we distinguish between fatal
errors (e.g. RenderingError::LimitExceeded) and recoverable ones.
Fixes https://gitlab.gnome.org/GNOME/librsvg/-/issues/930
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/800>
|
|\
| |
| |
| |
| |
| |
| | |
Update selectors and cssparser
Closes #925
See merge request GNOME/librsvg!799
|
| |
| |
| |
| | |
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/799>
|
|/
|
|
|
|
| |
css.rs: Update for changes in the AtRuleParser trait's API
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/799>
|
|\
| |
| |
| |
| | |
Complete run-benchmarks.py script
See merge request GNOME/librsvg!798
|
|/ |
|
|\
| |
| |
| |
| | |
Add a bunch of hicolor application icons, and a benchmarks runner
See merge request GNOME/librsvg!797
|
| |
| |
| |
| |
| |
| | |
benchmarks
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/797>
|
|/
|
|
|
|
|
|
| |
This will be the basis for one of rsvg-bench's measurements. The idea
is to have an idea of how much it would take for gnome-shell to render
the "Applications" pane with all the icons, and to optimize based on that.
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/797>
|
|\
| |
| |
| |
| | |
Add script to run benchmark and submit metrics
See merge request GNOME/librsvg!791
|
|/
|
|
|
|
|
|
| |
The script runs cachegrind on the given command and arguments. It parses
the cachegrind output file and submit metrics to the librsvg-metrics
webapp.
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/791>
|
|\
| |
| |
| |
| |
| |
| | |
Fix panic when using a font-size that is too big for Pango
Closes #932
See merge request GNOME/librsvg!796
|
| |
| |
| |
| | |
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/796>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Yes, the sizes returned from pango_layout_get_size() are positive if
Pango doesn't overflow its i32 values. The assertions were there from
e4dc9bacdb528ce03109d8f98d1d7a7c88d6416e when I was checking what
Pango does for RTL text.
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/796>
|
| |
| |
| |
| | |
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/796>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
convertible to Pango units
Otherwise, ignore the span - return None and have the caller ignore
it.
Now, this is a good place to actually impose a limit on font sizes.
What should those be...?
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/796>
|
|/
|
|
|
|
| |
pango units
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/796>
|
|\
| |
| |
| |
| |
| |
| | |
(#934): Update nalgebra
Closes #934
See merge request GNOME/librsvg!795
|
| |
| |
| |
| |
| |
| | |
Mainly to shut up deps.rs, which flags "1" as vulnerable.
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/795>
|
| |
| |
| |
| |
| |
| | |
Dynamic::new(value) -> Dyn(value)
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/795>
|
|/
|
|
| |
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/795>
|
|\
| |
| |
| |
| | |
Prepare 2.55.91 release
See merge request GNOME/librsvg!794
|
| |
| |
| |
| |
| |
| |
| |
| | |
It used to recommend running `make distcheck` by hand, but now that we
do that in the CI, it's safer / more reproducible to do it there with
the CI's environment.
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/794>
|
| |
| |
| |
| | |
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/794>
|
| |
| |
| |
| | |
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/794>
|
| |
| |
| |
| | |
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/794>
|
|/
|
|
| |
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/794>
|
|\
| |
| |
| |
| |
| |
| | |
Implement the feDropShadow element
Closes #743
See merge request GNOME/librsvg!793
|
| |
| |
| |
| | |
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/793>
|
| |
| |
| |
| |
| |
| | |
Fixes https://gitlab.gnome.org/GNOME/librsvg/-/issues/743
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/793>
|
| |
| |
| |
| | |
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/793>
|
| |
| |
| |
| | |
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/793>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
them into user space
This will let us extract a function to generate the primitives in the
first place.
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/793>
|
|/
|
|
|
|
|
| |
This change allows us to return filters composed of multiple
ResolvedPrimitives, specifically for the FeDropShadow filter element.
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/793>
|
|\
| |
| |
| |
| | |
NMake Makefiles: Clean up a bit
See merge request GNOME/librsvg!790
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This attempts to clean up the NMake Makefiles, as well as making running
Cargo in a cleaner manner, by:
* Reduce repetitions in the code using Makefile variables and expanding
on them.
* Use --target-dir and --manifest-path to reduce changing directories
and setting envvars during the build.
* Use the correct intermediate directories for cross- and
non-cross-builds, for at least Cargo 1.67.x or later. For RustC
1.63.x to 1.66.x non-cross builds, please update to 1.67.x if this
becomes an issue, or file an issue to support the older method.
* Use the toolchain flag (the +$(toolchain) flag) so that we do not
attempt to set the default toolchain when building 32-bit builds on a
64-bit system, for instance. Note that for cross-builds (i.e. x64
builds in a 32-bit build/cross environment and ARM64 builds) continue
to use the --target=... flag, as it is required.
* Add two NMake Makefile options, VERBOSE and USE_NIGHTLY_TOOLCHAIN,
to use verbose mode during Rust compilation and use a nightly
toolchain instead of a stable toolchain. This means, verbose Rust
compilation mode is now only enabled on demand, and one can choose to
use a nightly Rust toolchain instead of the stable one if needed.
|
|\ \
| |/
|/|
| |
| | |
Traditional gtk-rs update
See merge request GNOME/librsvg!792
|
| |
| |
| |
| | |
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/792>
|
| |
| |
| |
| | |
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/792>
|
| |
| |
| |
| | |
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/792>
|