commit 193ce0426d73d7956b9258e85e3634bf5b67ecea Author: Federico Mena Quintero Date: Thu Feb 1 19:16:08 2018 -0600 Update NEWS for 2.42.2 NEWS | 2 ++ 1 file changed, 2 insertions(+) commit 724e28216093b7ffec0b0b02bb10addbdab0cfcc Author: Federico Mena Quintero Date: Thu Feb 1 18:41:59 2018 -0600 Move rsvg_handle_get_pixbuf*() to rsvg-handle.c This lets us remove rsvg.c Makefile.am | 1 - rsvg-handle.c | 74 +++++++++++++++++++++++++++++++++++++ rsvg.c | 117 ---------------------------------------------------------- 3 files changed, 74 insertions(+), 118 deletions(-) commit 2f178ec76b06f051d137807dcb92e663872d9fca Author: Federico Mena Quintero Date: Thu Feb 1 18:26:28 2018 -0600 *.rs - Clean up the imports a bit rust/src/bbox.rs | 4 ++-- rust/src/color.rs | 7 +++---- rust/src/gradient.rs | 8 ++++---- rust/src/marker.rs | 3 +-- rust/src/node.rs | 8 ++++---- rust/src/opacity.rs | 4 ++-- rust/src/paint_server.rs | 2 +- rust/src/parsers.rs | 8 ++++---- rust/src/path_builder.rs | 2 +- rust/src/pattern.rs | 8 ++++---- rust/src/shapes.rs | 2 +- rust/src/stop.rs | 6 +++--- rust/src/structure.rs | 4 ++-- rust/src/transform.rs | 8 ++++---- rust/src/viewbox.rs | 6 +++--- 15 files changed, 39 insertions(+), 41 deletions(-) commit cf3d7963793fd0388266ef7f2e49d6d14fa65098 Merge: be8ec256 88abce8e Author: Federico Mena Quintero Date: Thu Feb 1 18:17:20 2018 -0600 gitlab#136 - Parse stroke-dasharray correctly The stroke-dasharray parser is rewritten in Rust to better match the spec. Thanks to Jordan Petridis for all the work on this. commit 88abce8ee2855b1ea486fc3b25f7e93691adbe69 Author: Federico Mena Quintero Date: Thu Feb 1 18:02:53 2018 -0600 Fix typo in error message rust/src/length.rs | 61 +++++++++++++++++++++++++++--------------------------- 1 file changed, 30 insertions(+), 31 deletions(-) commit 156c2aa758657f746de8705d836763bfbe8750fc Author: Jordan Petridis Date: Thu Feb 1 22:21:32 2018 +0200 stroke-dash-array: Use lazy_static to cache the regex query. rust/Cargo.lock | 1 + rust/Cargo.toml | 1 + rust/src/length.rs | 12 ++++++++---- rust/src/lib.rs | 3 +++ 4 files changed, 13 insertions(+), 4 deletions(-) commit d45ebdd84a68299d83b626cf71d47a880a5c5548 Author: Federico Mena Quintero Date: Thu Feb 1 18:09:22 2018 -0600 Remove painting-stroke-10-t.svg from the tests; it doesn't pass yet This is issue #165. .../reftests/svg1.1/painting-stroke-10-t-ref.png | Bin 10109 -> 0 bytes .../reftests/svg1.1/painting-stroke-10-t.svg | 78 --------------------- 2 files changed, 78 deletions(-) commit c9dc773779d8d71198f386a9f562ee29c2230d38 Author: Jordan Petridis Date: Wed Jan 31 18:02:46 2018 +0200 Rerender the refference pngs from an opensuse machine. .../reftests/svg1.1/painting-stroke-01-t-ref.png | Bin 12712 -> 11615 bytes .../reftests/svg1.1/painting-stroke-02-t-ref.png | Bin 15962 -> 14903 bytes .../reftests/svg1.1/painting-stroke-03-t-ref.png | Bin 16143 -> 15391 bytes .../reftests/svg1.1/painting-stroke-04-t-ref.png | Bin 15297 -> 13854 bytes .../reftests/svg1.1/painting-stroke-05-t-ref.png | Bin 7784 -> 7225 bytes .../reftests/svg1.1/painting-stroke-06-t-ref.png | Bin 4939 -> 4616 bytes .../reftests/svg1.1/painting-stroke-07-t-ref.png | Bin 6485 -> 6155 bytes .../reftests/svg1.1/painting-stroke-08-t-ref.png | Bin 8854 -> 8495 bytes .../reftests/svg1.1/painting-stroke-09-t-ref.png | Bin 4661 -> 4343 bytes .../reftests/svg1.1/painting-stroke-10-t-ref.png | Bin 10215 -> 10109 bytes 10 files changed, 0 insertions(+), 0 deletions(-) commit be8ec256bfb699bd5f62575432b75f1a2945df4a Author: Federico Mena Quintero Date: Thu Feb 1 14:05:33 2018 -0600 Update NEWS NEWS | 7 +++++++ 1 file changed, 7 insertions(+) commit 6ea054e8bbf3bc3de13eff91d01787f057afe015 Author: Federico Mena Quintero Date: Thu Feb 1 13:56:03 2018 -0600 Add tests/fixtures/render-crash/195-filters-conv-05-f.svg To test for the bug from the previous commit .../render-crash/193-filters-conv-05-f.svg | 83 ++++++++++++++++++++++ 1 file changed, 83 insertions(+) commit f39a7f82d1be5fe78a8c103c01a7f1153fc3a8b5 Author: Federico Mena Quintero Date: Thu Feb 1 13:53:11 2018 -0600 gitlab#193 - Don't crash when feConvolveMatrix doesn't specify orderx/ordery We were not initializing the default values correctly, so rsvg_css_parse_number_list() would assert as it would get passed 0 for the expected length of the list. https://gitlab.gnome.org/GNOME/librsvg/issues/193 rsvg-filter.c | 2 ++ 1 file changed, 2 insertions(+) commit fac54f7bb16716fdc11ac039da24d0c4741ebbfd Author: Jordan Petridis Date: Wed Jan 31 16:05:21 2018 +0200 stroke-dash-array: Handle the case where a comma would be followed up with another comma. .gitlab-ci.yml | 4 ++-- rust/src/length.rs | 21 ++++++++++++--------- rust/src/lib.rs | 1 + 3 files changed, 15 insertions(+), 11 deletions(-) commit 79569409f5206b52c76e36dd791f09087bd9aa7b Author: Jordan Petridis Date: Wed Jan 31 00:46:45 2018 +0200 gitlab-ci: Extract png artifacts from /tmp. .gitlab-ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit fdc0189fada8c97a3b53bc795f8571f62e261750 Author: Jordan Petridis Date: Tue Jan 30 18:04:34 2018 +0200 stroke-dash-array: Normalize refference png files. .../reftests/svg1.1/painting-stroke-01-t-ref.png | Bin 23012 -> 12712 bytes .../reftests/svg1.1/painting-stroke-02-t-ref.png | Bin 27918 -> 15962 bytes .../reftests/svg1.1/painting-stroke-03-t-ref.png | Bin 19469 -> 16143 bytes .../reftests/svg1.1/painting-stroke-04-t-ref.png | Bin 18056 -> 15297 bytes .../reftests/svg1.1/painting-stroke-05-t-ref.png | Bin 7464 -> 7784 bytes .../reftests/svg1.1/painting-stroke-06-t-ref.png | Bin 5546 -> 4939 bytes .../reftests/svg1.1/painting-stroke-07-t-ref.png | Bin 7975 -> 6485 bytes .../reftests/svg1.1/painting-stroke-08-t-ref.png | Bin 7629 -> 8854 bytes .../reftests/svg1.1/painting-stroke-09-t-ref.png | Bin 4590 -> 4661 bytes .../reftests/svg1.1/painting-stroke-10-t-ref.png | Bin 11044 -> 10215 bytes 10 files changed, 0 insertions(+), 0 deletions(-) commit 5497bcd7275544eca3593d1093fb100559d4eda7 Author: Jordan Petridis Date: Tue Jan 30 16:20:06 2018 +0200 Add painting-stroke-* tests from SVG1.1 test suite. .../reftests/svg1.1/painting-stroke-01-t-ref.png | Bin 0 -> 23012 bytes .../reftests/svg1.1/painting-stroke-01-t.svg | 68 ++++++++++++++++ .../reftests/svg1.1/painting-stroke-02-t-ref.png | Bin 0 -> 27918 bytes .../reftests/svg1.1/painting-stroke-02-t.svg | 63 +++++++++++++++ .../reftests/svg1.1/painting-stroke-03-t-ref.png | Bin 0 -> 19469 bytes .../reftests/svg1.1/painting-stroke-03-t.svg | 64 +++++++++++++++ .../reftests/svg1.1/painting-stroke-04-t-ref.png | Bin 0 -> 18056 bytes .../reftests/svg1.1/painting-stroke-04-t.svg | 60 ++++++++++++++ .../reftests/svg1.1/painting-stroke-05-t-ref.png | Bin 0 -> 7464 bytes .../reftests/svg1.1/painting-stroke-05-t.svg | 88 +++++++++++++++++++++ .../reftests/svg1.1/painting-stroke-06-t-ref.png | Bin 0 -> 5546 bytes .../reftests/svg1.1/painting-stroke-06-t.svg | 74 +++++++++++++++++ .../reftests/svg1.1/painting-stroke-07-t-ref.png | Bin 0 -> 7975 bytes .../reftests/svg1.1/painting-stroke-07-t.svg | 63 +++++++++++++++ .../reftests/svg1.1/painting-stroke-08-t-ref.png | Bin 0 -> 7629 bytes .../reftests/svg1.1/painting-stroke-08-t.svg | 78 ++++++++++++++++++ .../reftests/svg1.1/painting-stroke-09-t-ref.png | Bin 0 -> 4590 bytes .../reftests/svg1.1/painting-stroke-09-t.svg | 59 ++++++++++++++ .../reftests/svg1.1/painting-stroke-10-t-ref.png | Bin 0 -> 11044 bytes .../reftests/svg1.1/painting-stroke-10-t.svg | 78 ++++++++++++++++++ 20 files changed, 695 insertions(+) commit 62fbe52c756daded81f674822accea901c7b509a Author: Federico Mena Quintero Date: Mon Jan 29 18:46:44 2018 -0600 Add painting-contgrol-02-f.svg from the SVG 1.1 test suite .../reftests/svg1.1/painting-control-02-f-ref.png | Bin 0 -> 4437 bytes .../reftests/svg1.1/painting-control-02-f.svg | 65 +++++++++++++++++++++ 2 files changed, 65 insertions(+) commit 8d36d7015b96a531fbdbec5618a3b32c14c06e1e Author: Federico Mena Quintero Date: Mon Jan 29 18:44:50 2018 -0600 If the length of the dashes is 0.0, don't dash at all, per the spec rsvg-cairo-draw.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 8ebc8675c88791cceaa8040e5d00b1c107b7e0cc Author: Federico Mena Quintero Date: Mon Jan 29 18:35:11 2018 -0600 rsvg_parse_stroke_dasharray(): New function, implemented in Rust We use this now instead of the shitty C parser for the stroke-dasharray attribute. We still need to handle errors and inheritance. rsvg-cairo-draw.c | 41 ++++++++++++++++++++++++++++++++-- rsvg-styles.c | 51 +++++------------------------------------- rsvg-styles.h | 18 ++++++++++----- rust/src/length.rs | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++--- rust/src/lib.rs | 1 + 5 files changed, 120 insertions(+), 56 deletions(-) commit 2cf4d4de5644f37cee5fc53013b655b703c591b3 Author: Federico Mena Quintero Date: Mon Jan 29 18:19:51 2018 -0600 RsvgVpathDash: Rename internal fields to what we will refactor The new names will be those from the Rustified version rsvg-cairo-draw.c | 2 +- rsvg-styles.c | 54 +++++++++++++++++++++++++++--------------------------- rsvg-styles.h | 4 ++-- 3 files changed, 30 insertions(+), 30 deletions(-) commit 86e5228605a794e27f9045822d3d10d864738708 Author: Federico Mena Quintero Date: Mon Jan 29 17:50:06 2018 -0600 RsvgState: store the dash_offset here, not in the dasharray struct rsvg-cairo-draw.c | 2 +- rsvg-styles.c | 8 ++++---- rsvg-styles.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit ce146bb8194a888ca9cade4d4e3fd49e75970e9a Author: Jordan Petridis Date: Mon Jan 29 22:10:50 2018 +0200 stroke-dasharray: Return an error if there is a trailling comma. rust/src/length.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit f0a81520c76727c655e992cc7f8edcc8dc3e82f4 Author: Jordan Petridis Date: Mon Jan 29 21:48:51 2018 +0200 stroke-dasharray: Remove filter empty strings since split_whitespace take care of that. rust/src/length.rs | 2 -- 1 file changed, 2 deletions(-) commit 7ecd8eabd3dfbb89ab93cafdac804e5a459245ff Author: Jordan Petridis Date: Mon Jan 29 20:09:06 2018 +0200 stroke-dasharray: Rename the API and propagate the Error to the caller. rust/src/length.rs | 52 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 21 deletions(-) commit 74bb27ebbc008860c562f3e5ac83875a5c38ca3f Author: Jordan Petridis Date: Mon Jan 29 19:42:20 2018 +0200 Remove check of the dash lenght and check of it's elements sum. There's no need to duplicate the array if the length is odd; Cairo takes care of that. There's no need to check the sum of the lengths here; It's done at rendering time. rust/src/length.rs | 43 ++++--------------------------------------- 1 file changed, 4 insertions(+), 39 deletions(-) commit 248fa61e00241ad99d590ffb6d993db3373cc21e Author: Jordan Petridis Date: Thu Jan 25 19:35:39 2018 +0200 stroke-dasharray: Return none and inherit states as well. rust/src/length.rs | 183 +++++++++++++++++++++++++++++------------------------ 1 file changed, 101 insertions(+), 82 deletions(-) commit 75255bf3f57734f036504116ff5b787f6ad32bd5 Author: Jordan Petridis Date: Thu Jan 25 18:34:25 2018 +0200 stroke-dasharray: Add some usuall case tests for the dasharray parser. rust/src/length.rs | 67 ++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 53 insertions(+), 14 deletions(-) commit df6571ff8507be45fd04b69440d9c6a8e171022a Author: Jordan Petridis Date: Thu Jan 25 09:55:47 2018 +0200 stroke-dasharray: Minor cleanup and added comments. rust/src/length.rs | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit 87e9610a4d87f2d27f27219e758b04b3a8a13afc Author: Jordan Petridis Date: Wed Jan 24 23:14:41 2018 +0200 stroke-dasharray: Implement error handling and majority of the spec behavior. rust/src/length.rs | 54 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 49 insertions(+), 5 deletions(-) commit aafa701f1c28b0dd01b9a727f641800dc6dd999e Author: Jordan Petridis Date: Wed Jan 24 21:04:36 2018 +0200 Initial stroke-dasharray commit. rust/src/length.rs | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 556fb62786bab88e4d08ca996e655cf9fb48e3e1 Author: Federico Mena Quintero Date: Tue Oct 3 10:18:29 2017 -0500 marker.rs: Don't render markers if they are zero-sized, per the spec rust/src/marker.rs | 5 +++++ 1 file changed, 5 insertions(+) commit bc1d7a86e16467336d3dd37ea913ce74fd1ff987 Author: Federico Mena Quintero Date: Fri Jan 26 11:07:19 2018 -0600 rsvg-paint-server.h: Remove unused prototypes rsvg-paint-server.h | 5 ----- 1 file changed, 5 deletions(-) commit 15dcb4fbb8ef5592d2a52dc6edc2e0faf5c1774e Author: Federico Mena Quintero Date: Fri Jan 26 11:02:52 2018 -0600 _set_source_rsvg_paint_server(): Remove unused argument Clean up the callers a little bit by making the calls to this function look all the same. rsvg-cairo-draw.c | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) commit c8529f9975095ae1902efd311476a20979ab056a Author: Federico Mena Quintero Date: Thu Jan 25 18:10:25 2018 -0600 path_parser: When reading a number, don't call powf() if there's no exponent powf() was showing up in the profile. We'll switch to Rust's own number reader later, but for that we have to change the parsing machinery to be able to slice the original string. rust/src/path_parser.rs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 41da969c8899c5579e8996dc203f8d94847b5b0a Merge: 009e8e6a c1de6d5d Author: Federico Mena Quintero Date: Wed Jan 24 15:35:58 2018 -0600 Merge branch 'ignatenko/librsvg-cssparser-update' commit 009e8e6a1a1905c08395d1b9520ef4c498398400 Merge: 3425537f d6cff8bd Author: Federico Mena Quintero Date: Wed Jan 24 13:01:10 2018 -0600 gitlab#191 - Merge branch 'reduce-allocations' This reduces the number of allocations in the parsing stage. We were doing from_glib_none(c_string) for all the incoming strings. Since they come from libxml2, they are already valid UTF-8. We add a utility function, util::utf8_cstr(), that creates a &str from a *const libc::c_char without copies or allocations. We add a PropertyBag wrapper for the RsvgPropertyBag raw pointer (it's just a pointer to a GHashTable). We turn calls to from_glib_none(c_string) into utf8_cstr() where appropriate. This has very minor performance consequences, something hard to measure like 0.1% faster. It definitely reduces the number of allocations and UTF-8 revalidations. https://gitlab.gnome.org/GNOME/librsvg/issues/191 commit d6cff8bdcf41b5f1448582cc1824bbc24fb84db4 Author: Federico Mena Quintero Date: Wed Jan 24 12:30:24 2018 -0600 emit_marker_by_name(): Don't copy the incoming string rust/src/marker.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f666a73b8dd0bd5d408962defe305322c628006 Author: Federico Mena Quintero Date: Wed Jan 24 12:27:47 2018 -0600 rsvg_css_parse_color(): Don't copy the incoming string rust/src/color.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 6bff4ea2b312738a1236ca3c73ca34a9c416dc75 Author: Federico Mena Quintero Date: Wed Jan 24 12:24:25 2018 -0600 rsvg_css_parse_number_list(): Don't copy the incoming string rust/src/parsers.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit adb2e83b2af16655efdf0d40eefa72d7ea2e04d5 Author: Federico Mena Quintero Date: Wed Jan 24 12:22:40 2018 -0600 rsvg_css_parse_number_optional_number(): Don't copy the incoming string rust/src/parsers.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 10bad9ce83aabb5062a8003371802a0109c1bb2a Author: Federico Mena Quintero Date: Wed Jan 24 12:18:36 2018 -0600 rsvg_parse_transform(): Don't copy the incoming string rust/src/transform.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 2ce259f973dbbfc73d5cdc6a9cb22dabd6d7294d Author: Federico Mena Quintero Date: Wed Jan 24 12:09:46 2018 -0600 rsvg_length_parse(): Don't copy the incoming string rust/src/length.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a8872d438840308b89d777f4efbc16e00a9de863 Author: Federico Mena Quintero Date: Wed Jan 24 11:32:16 2018 -0600 rsvg_text_create_layout(): Don't copy the incoming string rust/src/text.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4852538426ad71291dac72c24c727f01ed4c1c09 Author: Federico Mena Quintero Date: Wed Jan 24 11:17:06 2018 -0600 rsvg_xml_space_normalize(): Don't copy the incoming string rust/src/space.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 073fffdb81a9d133b9a37f9fcf689cdd31f9ba0d Author: Federico Mena Quintero Date: Wed Jan 24 11:13:52 2018 -0600 rsvg_node_chars_append(): Don't copy the string; assume it comes validated from libxml2 rust/src/chars.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 242d271f8f246868a2dad4362a2ad2da55087609 Author: Federico Mena Quintero Date: Wed Jan 24 12:42:31 2018 -0600 utf8_cstr(): Don't do UTF-8 validation (!) Libxml2 does it for us. rust/src/util.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ff0c578ff30f13019f9e2ba9e63f46e9f91806d9 Author: Federico Mena Quintero Date: Wed Jan 24 10:58:56 2018 -0600 Factor out an util::utf8_cstr() to borrow a &str from a C char * rust/src/opacity.rs | 5 ++--- rust/src/property_bag.rs | 5 ++--- rust/src/util.rs | 16 ++++++++++++++++ 3 files changed, 20 insertions(+), 6 deletions(-) commit 9b11cbb8c25aa5c80e532ff807fa52d7d5c5d8af Author: Federico Mena Quintero Date: Wed Jan 24 10:45:59 2018 -0600 rsvg_css_parse_opacity(): Remove an allocation rust/src/opacity.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 94bbc26613af2189b9b83e37a0ab1b10af8a6577 Author: Federico Mena Quintero Date: Wed Jan 24 10:23:14 2018 -0600 PropertyBag: don't copy the resulting strings during lookup String copies in property_bag::lookup() were hurting performance a bit. We want some things: * lookup() -> Option<&str> instead of lookup() -> Option i.e. avoid copies for strings which will be short-lived anyway. * Don't expose property_bag::free() to callers; have automatic resource management. * Support property_bag::dup() for NodeSvg's special use case. The strategy is as follows. We introduce an opaque PropertyBag struct, which is just a wrapper for the (RsvgPropertyBag *) that comes from the C side (typedef GHashTable RsvgPropertyBag). PropertyBag has dup() and lookup() methods, and an ffi() method to get the underlying pointer for special cases. We change all the users of the old RsvgPropertyBag pointers to use PropertyBag now. NodeSvg no longer needs to impl Drop, since all it was doing was to call property_bag::free(). The few places where the result of lookup() was meant to be long-lived, will actually copy the string now for their own purposes. rust/src/chars.rs | 4 +-- rust/src/clip_path.rs | 4 +-- rust/src/cnode.rs | 8 ++--- rust/src/gradient.rs | 7 ++--- rust/src/image.rs | 9 +++--- rust/src/marker.rs | 5 ++-- rust/src/mask.rs | 4 +-- rust/src/node.rs | 17 ++++++----- rust/src/pattern.rs | 7 ++--- rust/src/property_bag.rs | 77 +++++++++++++++++++++++++++++++++--------------- rust/src/shapes.rs | 19 ++++++------ rust/src/stop.rs | 11 ++++--- rust/src/structure.rs | 46 ++++++++++------------------- 13 files changed, 115 insertions(+), 103 deletions(-) commit c1de6d5db7a9375e78bf72474718f8b88551842a Author: Igor Gnatenko Date: Wed Jan 24 16:55:05 2018 +0100 rust: Update cssparser to 0.23 Signed-off-by: Igor Gnatenko rust/Cargo.lock | 12 ++++++------ rust/Cargo.toml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) commit 3425537f4acc4f5d59330661871854c0307294e9 Author: Federico Mena Quintero Date: Tue Jan 23 14:21:09 2018 -0600 Post-release version bump configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)