| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Per cargo-audit:
Crate: generic-array
Version: 0.13.2
Title: arr! macro erases lifetimes
Date: 2020-04-09
ID: RUSTSEC-2020-0146
URL: https://rustsec.org/advisories/RUSTSEC-2020-0146
Solution: Upgrade to >=0.8.4, <0.9.0 OR >=0.9.1, <0.10.0 OR >=0.10.1, <0.11.0 OR >=0.11.2, <0.12.0 OR >=0.12.4, <0.13.0 OR >=0.13.3
Dependency tree:
generic-array 0.13.2
└── nalgebra 0.21.1
└── librsvg 2.51.0
Crate: smallvec
Version: 1.4.2
Title: Buffer overflow in SmallVec::insert_many
Date: 2021-01-08
ID: RUSTSEC-2021-0003
URL: https://rustsec.org/advisories/RUSTSEC-2021-0003
Solution: Upgrade to >=0.6.14, <1.0.0 OR >=1.6.1
Dependency tree:
smallvec 1.4.2
├── selectors 0.22.0
│ └── librsvg 2.51.0
└── cssparser 0.27.2
├── selectors 0.22.0
└── librsvg 2.51.0
Now they are at generic-array-0.13.3 and smallvec-1.6.1.
|
|
|
|
|
|
| |
Only command-line parsing is implemented so far. For now this is
using version 2 of the clap crate. As soon as a stable version 3
release is available, this code should be revisited.
|
|
|
|
|
|
|
|
| |
Some cmdline tests for PDF output started to fail after an update of
Rust to the latest stable version (1.49). The backtrace points to lopdf,
the crate we are using to parse PDF files in the rsvg-convert test-suite.
Updating lopdf and its dependencies fixes the tests.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Export a Handle::get_intrinsic_size_in_pixels(), which resolves
non-percent lengths for the <svg>'s width/height attributes.
For other dimensions (percentages, nonexitent width/height, etc.), we
do the legacy logic in c_api.
|
| |
|
|
|
|
| |
Attempt to port the test_utils_setup_font_map() code from test-utils.c.
|
| |
|
|
|
|
|
|
|
|
| |
A bunch succeed, a bunch fail. Still missing:
* Set the "testing" flag.
* Create and set an FcConfig.
* Environment vars for language tests.
|
|
|
|
|
|
| |
I.e. that they don't need to figure out the document size from the
font size (em/ex units in the width/height attributes of <svg>), or
have non-100% percentage units.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This will let us generate #[test] functions automatically based on
globbing the fixtures directories.
|
|
|
|
|
| |
This allows us to remove the use of the matches crate as the
matches! macro was stabilized with that release.
|
|
|
|
|
|
|
|
|
| |
Add tests using proptest to verify the implementation against the
existing floating point implmentation as the reference.
Also add tests for Pixel::unpremultiply() that check that the
roundtrip pixel.premultiply().unpremultiply() doesn't differ more
than expected from the original pixel.
|
|
|
|
|
|
|
|
|
|
|
| |
This commit also transitions the Cargo.lock file to the new V2 format.
This format removes the [metadata] table, and should be easier to merge
changes. This format was introduced in 1.38, and made the default for
new projects in 1.41. With the 1.47 release the transition is now
automatically applied if the Cargo.lock file needs to be updated.
Also change the version of the rgb crate to "0.8". We actually need
at least 0.8.23 for the ComponentMap trait.
|
|
|
|
| |
This is per #545; that version of gio has build fixes for MacOS.
|
|
|
|
|
|
|
| |
Parse the version numbers from configure.ac and create version.rs. This should
work better with build_dir != src_dir.
Based on code kindly suggested by user notriddle at https://users.rust-lang.org/
|
|
|
|
| |
This is the new development series.
|
|
|
|
| |
Markup5ever already uses it, so we have it in place.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, font-weight="bolder" or "lighter" would map
unconditionally to pango's Ultrabold and Light, which is wrong as
those are relative values that must be computed with respect to the
inherited value.
We now do this:
* First, support arbitrary numbers in the range [1, 1000] instead of
the fixed set 100/200/.../900, per css-fonts-4 -
https://drafts.csswg.org/css-fonts-4/#font-weight-prop
* Second, use the "relative weights" table from
https://drafts.csswg.org/css-fonts-4/#relative-weights
Note that this is different from
https://www.w3.org/TR/2008/REC-CSS2-20080411/fonts.html#propdef-font-weight
which simply made "bolder" and "lighter" go up and down the 100..900
scale. That had the effect of not always performing a visible change
in weight, since most font families only have a few weights available
and do not cover the whole range.
Fixes https://gitlab.gnome.org/GNOME/librsvg/-/issues/605
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This gets rid of the calculation and checking of the offset of each
pixel.
Baseline:
pixbuf_from_surface time: [1.5888 ms 1.5899 ms 1.5911 ms]
Use SharedImageSurface.rows():
pixbuf_from_surface time: [1.4434 ms 1.4514 ms 1.4592 ms]
change: [-9.5490% -9.2322% -8.8676%] (p = 0.00 < 0.05)
Use as_pixels() and iterators for GdkPixbuf:
pixbuf_from_surface time: [672.70 us 673.20 us 673.75 us]
change: [-53.489% -53.329% -53.174%] (p = 0.00 < 0.05)
This is part of https://gitlab.gnome.org/GNOME/librsvg/-/issues/585
|
|
|
|
| |
This is endian-dependent, so we pick from rgb's types at compile-time.
|
| |
|
|
|
|
|
| |
Now I can actually run "cargo bench" in rsvg_internals without my
machine crashing, go figure...
|
|
|
|
|
| |
We turn out-of-range values into cairo::Status::InvalidSize, which is
what one would get for too-big surfaces, anyway.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use an emum for the Element type and static dispacth.
Each variant in the enum contains an ElementInner which implements
what is common among all elements. ElementInner is generic over
the actual implementation of each element type. We do not need
to use the downcast trait anyore. ElementInner derefs to
the corresonding element implementation.
Each ElementInner in Element is boxed in order to keep Element small.
We do not need to box in Node anymore.
We do not need a separate ElementType enum anymore.
This patch adds the "matches" crate as a dependency: rust 1.42
includes the matches! macro, but we do not want to bump the
requirement yet and some of our dependencies like rust-cssparser
already pull in the same crate,
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Rust 1.39
Apparently xml-rs is using #[cfg(doctest)], which was made stable since
Rust 1.40.
Fixes https://gitlab.gnome.org/GNOME/librsvg/-/issues/582
|
|/
|
|
|
| |
This update removes the dependency on the yanked crate 'quote',
as pointed out by 'cargo audit'.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From the last commit, we had this for the big SVG file in #574:
--------------------------------------------------------------------------------
n time(i) total(B) useful-heap(B) extra-heap(B) stacks(B)
--------------------------------------------------------------------------------
30 22,796,106,012 1,553,581,072 1,329,943,324 223,637,748 0
^^^^^^^^^^^
That extra-heap is a lot of allocator metadata or waste space,
possibly from heap fragmentation due to all the realloc() shenanigans
from using into_boxed_slice() on the starting Vec<PathCommand>.
This commit makes PathBuilder use a SmallVec:
pub struct PathBuilder {
path_commands: SmallVec<[PathCommand; 32]>,
}
That is, it will keep up to 32 PathCommand directly inside itself, and
only spill to a heap allocation if more elements come in.
We still into_boxed_slice() for the final Path. Hopefully this makes
realloc() find heap blocks that are more closely packed. Indeed:
--------------------------------------------------------------------------------
n time(i) total(B) useful-heap(B) extra-heap(B) stacks(B)
--------------------------------------------------------------------------------
33 24,139,598,653 1,416,831,176 1,329,943,212 86,887,964 0
^^^^^^^^^^
That's a lot of less waste space. Note also how the total bytes
shrinks from 1,553,581,072 to 1,416,831,176.
|
| |
|
|
|
|
|
|
|
| |
Note that the test actually makes wrong assumptions about the
expected size and resolution.
See https://gitlab.gnome.org/GNOME/librsvg/issues/514
|
|
|
|
|
| |
It's not used anywhere in librsvg directly and was just duping the phf
dependency globally.
|
| |
|
|\ |
|
| | |
|