summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* build-with-coverage.sh: Don't hardcode the clang versionbilelmoussaoui/release-gtk-rsFederico Mena Quintero2022-10-251-1/+3
| | | | | | | | The recent image update bumped clang from 14.0.6 to 15.0.2, so a hardcoded path of /usr/lib64/clang/{version} stopped working. Extract the version with a little script. Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/760>
* Bump the minimum Rust version to 1.63Federico Mena Quintero2022-10-254-5/+5
| | | | | | The gtk-rs update requires this. Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/760>
* gdk-pixbuf-loader: Fix clippy warningsBilal Elmoussaoui2022-10-251-6/+6
| | | | Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/760>
* gdk-pixbuf-loader: Use ffi crates from safe ones directlyBilal Elmoussaoui2022-10-253-27/+20
| | | | Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/760>
* gdk-pixbuf-loader: Bump gtk-rs crates dependenciesBilal Elmoussaoui2022-10-252-7/+1971
| | | | Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/760>
* misc: Bump gtk-rs crates to 0.16.0Bilal Elmoussaoui2022-10-2528-749/+411
| | | | Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/760>
* Merge branch 'update-parking_lot_core' into 'main'Marge Bot2022-10-191-18/+32
|\ | | | | | | | | Update parking_lot_core and system-deps crate See merge request GNOME/librsvg!759
| * Update parking_lot_core and system-deps crateChristoph Reiter2022-10-191-18/+32
|/ | | | | | This contains some fixes for arm64 mingw Windows builds. Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/759>
* Merge branch 'compute-shape-bbox' into 'main'Marge Bot2022-10-0711-77/+313
|\ | | | | | | | | Let layout::Shape know its own bounds, and make it carry UserSpacePaintSource See merge request GNOME/librsvg!757
| * clippy: Remove superfluous referenceFederico Mena Quintero2022-10-061-1/+1
| | | | | | | | Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/757>
| * Start a design document for the render treeFederico Mena Quintero2022-10-062-0/+229
| | | | | | | | Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/757>
| * Remove obsolete commentFederico Mena Quintero2022-10-061-4/+0
| | | | | | | | Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/757>
| * layout::Shape: keep UserSpacePaintSource for stroke and fill, not PaintSourceFederico Mena Quintero2022-10-064-28/+12
| | | | | | | | | | | | | | | | | | | | | | Now that shapes can compute their extents, they can very well normalize their paint sources into UserSpacePaintSource. While we are at it, make layout::Text also not carry a duplicated stroke_paint_source, by making compute_stroke_and_fill_box() take a user-space one. Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/757>
| * PaintSource::to_user_space() - take an Option<Rect>, not a whole BoundingBoxFederico Mena Quintero2022-10-065-21/+25
| | | | | | | | | | | | | | Let's see if we can make layout::Shape carry user-space paint sources instead of just the unnormalized PaintSource. Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/757>
| * Make rect_to_transform() an independent function, not a method of BoundingBoxFederico Mena Quintero2022-10-064-34/+39
| | | | | | | | Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/757>
| * Shape: add a field with the path's extentsFederico Mena Quintero2022-10-062-0/+4
| | | | | | | | Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/757>
| * DrawingCtx.compute_path_extents(): new functionFederico Mena Quintero2022-10-061-0/+14
|/ | | | | | | | | | Let's try computing a shape's extents, to form its bounding box, outside of the drawing code. First, a function to call cairo_path_extents(). In the future we can do this with the kurbo crate, hopefully. Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/757>
* Merge branch 'dist-icon' into 'main'Marge Bot2022-09-282-0/+5
|\ | | | | | | | | Ahem, actually distribute the icon. See merge request GNOME/librsvg!756
| * doc/Makefile.am: add the SVG iconsFederico Mena Quintero2022-09-281-0/+2
| | | | | | | | Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/756>
| * Ahem, actually distribute the icon.Federico Mena Quintero2022-09-271-0/+3
|/ | | | Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/756>
* Merge branch 'icon-in-docs' into 'main'Marge Bot2022-09-284-0/+66
|\ | | | | | | | | Add the librsvg library icons See merge request GNOME/librsvg!755
| * Use the library icon for the Rust API docsFederico Mena Quintero2022-09-271-0/+1
| | | | | | | | Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/755>
| * Use the library icon for the C API docsFederico Mena Quintero2022-09-271-0/+1
| | | | | | | | Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/755>
| * Add the librsvg library iconsFederico Mena Quintero2022-09-272-0/+64
|/ | | | | | | | Courtesy of https://gitlab.gnome.org/Teams/Design/library-icons/-/issues/6 - thanks again, Sam! Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/755>
* Merge branch 'bump-rust-1.64' into 'main'Marge Bot2022-09-276-52/+83
|\ | | | | | | | | | | | | Bump the rust-stable version to 1.64.0 Closes #904 See merge request GNOME/librsvg!754
| * Allow the aarch64 job to fail - there are failing reference testsFederico Mena Quintero2022-09-261-0/+2
| | | | | | | | | | | | | | Hopefully nothing major, and just a rendering difference. Need to diagnose this. Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/754>
| * Add helper function to avoid of trivial pointer casts that only appear on ↵Federico Mena Quintero2022-09-263-5/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | aarch64 On aarch64, libc::c_char is unsigned, so this produces a trivial cast to u8: let my_slice: &[u8] = std::slice::from_raw_parts(p as *const u8, len); On Intel, libc::c_char is signed, and produces no such warning. I couldn't find a way to do this without waerning; "*const _" fails; plain "_" fails. Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/754>
| * CI: do not install gi-docgen on non-opensuse distrosFederico Mena Quintero2022-09-261-9/+5
| | | | | | | | | | | | It's not used there. Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/754>
| * CI: bump to Fedora 36Federico Mena Quintero2022-09-261-2/+2
| | | | | | | | Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/754>
| * CI: Keep test artifacts for failed cargo-test jobsFederico Mena Quintero2022-09-261-0/+7
| | | | | | | | Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/754>
| * Bump container base tagFederico Mena Quintero2022-09-261-1/+1
| | | | | | | | Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/754>
| * CI: fix cairo-gobject-devel's name for fedoraFederico Mena Quintero2022-09-261-1/+1
| | | | | | | | Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/754>
| * CI: don't install ccache; install cairo-gobject for fedoraFederico Mena Quintero2022-09-261-3/+2
| | | | | | | | Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/754>
| * CI: enable the Fedora build with 'cargo test'Federico Mena Quintero2022-09-261-7/+2
| | | | | | | | | | | | Make it non-conditional, so we can test Fedora's versions of the Pango stack. Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/754>
| * CI: enable an aarch64 'cargo test'Federico Mena Quintero2022-09-262-3/+3
| | | | | | | | Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/754>
| * CI: Use just 'cargo test' for the rust-minimum and rust-nightly jobsFederico Mena Quintero2022-09-261-6/+12
| | | | | | | | Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/754>
| * CI: Move the coverage script to an actual shell scriptFederico Mena Quintero2022-09-262-18/+24
| | | | | | | | | | | | | | I sometimes run this at home, and cutting&pasting things from .gitlab-ci.yml gets old pretty fast. So let's make this reusable. Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/754>
| * Bump the rust-stable version to 1.64.0Federico Mena Quintero2022-09-261-2/+2
|/ | | | | | | | This will probably not fix the coverage report (see #905), but the 1.64 release is well in advance of the next GNOME release - so let's do it. Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/754>
* Merge branch 'filters-refactor' into 'main'Marge Bot2022-09-244-115/+166
|\ | | | | | | | | Refactor some of the filters code See merge request GNOME/librsvg!753
| * Move extract_filter_from_filter_node() to filter.rsFederico Mena Quintero2022-09-232-111/+107
| | | | | | | | | | | | | | | | That function pulls out all the innards from a <filter> node to generate a FilterSpec; it's better to keep it where the <filter> node is defined. Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/753>
| * Converting a filter function to a FilterSpec is infallible; don't return a ↵Federico Mena Quintero2022-09-232-17/+13
| | | | | | | | | | | | Result there Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/753>
| * Log an error when a filter value cannot be resolvedFederico Mena Quintero2022-09-231-19/+39
| | | | | | | | Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/753>
| * extract_filter_from_filter_node(): Don't take the DrawingCtx; take the ↵Federico Mena Quintero2022-09-232-11/+50
|/ | | | | | | | | | | | | | | | | | | | possible ViewParams instead The only reason that function takes a DrawingCtx argument is to ask the draw_ctx for the view_params depending on the filter units and the primitive units (... and also, to get the Session). Instead, create a new ViewParamsGen struct (for "generator" or something) that holds the two possible ViewParams values for those units - and pass that struct to the function. I think this may see some use elsewhere. The only other place that calls draw_ctx.get_view_params_for_units() is generate_cairo_mask(). This goes in the direction of converting everything to user space as soon as possible, instead of as late as possible. Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/753>
* Merge branch 'xml-cleanups' into 'main'Marge Bot2022-09-233-115/+67
|\ | | | | | | | | Some refactoring of the XML parser See merge request GNOME/librsvg!752
| * XmlState: don't take() the document_builder in the end; just consume everythingFederico Mena Quintero2022-09-231-33/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DocumentBuilder.build() consumes its self argument, which makes sense: it turns the builder into a document, and that's that. However, XmlStateInner had an Option<DocumentBuilder> field just so that the option could be take()n in the end and then the builder could be consumed by .build(). Using an Option<DocumentBuilder> is inconvenient because the rest of the code must then do inner.document_builder.as_mut().unwrap() everywhere. We could have used a helper function to do that, but we can remove that construct altogether. One thing to note is that since we are consuming the final XmlState and just pick out its inner field in build_document(), we can no longer impl Drop for XmlState to free the hash table of libxml2 entities. So, we inline the code to free the hash in build_document() instead. Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/752>
| * XmlState::build_document(): consume selfFederico Mena Quintero2022-09-231-1/+1
| | | | | | | | Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/752>
| * xml_load_from_possibly_compressed_stream(): Don't use an Rc<XmlState> anymoreFederico Mena Quintero2022-09-231-1/+1
| | | | | | | | Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/752>
| * Xml2Parser: store a plain reference to XmlState, not an Rc<XmlState>Federico Mena Quintero2022-09-232-35/+18
| | | | | | | | | | | | | | | | | | | | Now that I know how to use structs with reference fields and lifetimes... The lifetime of the Xml2Parser is basically the duration of XmlState::parse_from_stream(), and it just calls the XmlState to add elements and such. Let's encode that into the Xml2Parser struct. Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/752>
| * XmlState: store a session, instead of jumping through hoops to get it from ↵Federico Mena Quintero2022-09-232-36/+20
| | | | | | | | | | | | | | | | the DocumentBuilder The Session object is designed to be shared, anyway. Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/752>
| * Remove DocumentBuilder::resolve_href()Federico Mena Quintero2022-09-232-10/+3
|/ | | | | | | This was just used by the XML code, but it already has access to the url_resolver, which is what it really wants. Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/752>