[librsvg: 90/90] Merge branch 'viewport-with-offsets'
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 90/90] Merge branch 'viewport-with-offsets'
- Date: Tue, 26 Mar 2019 19:19:38 +0000 (UTC)
commit 69873e0c98c946a0fa7b71ea31087516c0eb1bb9
Merge: bce6729f 906d495a
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Mar 26 13:11:06 2019 -0600
Merge branch 'viewport-with-offsets'
This looks like a lot of changes, but in reality it is this:
* Instead of the draw_ctx.set_affine_on_cr() machinery all over the
place, now DrawingCtx is responsible for maintaining all the
affines for the temporary compositing surfaces.
* There is no offset for temporary surfaces. They are assumed to be
always at (0, 0) in the toplevel viewport's coordinate system.
We may ensure that temporary surfaces are pixel-aligned at some
point in the future.
* This lets Handle.render_element_to_viewport() actually work.
* A couple new abstractions: DrawingCtx.with_saved_cr(),
DrawingCtx.with_saved_matrix().
* This gets us closer to unifying viewports/surfaces/contexts. Now
things can call DrawingCtx.create_surface_for_toplevel_viewport()
instead of creating a surface by hand themselves.
* Lots of cleanups for the big scary DrawingCtx.with_discrete_layer()
This has new tests for librsvg_crate, which are particularly exciting,
since librsvg_crate/tests/primitives.rs generates reftests
programatically with Cairo, instead of using reference images. It may
be good to test all the primitives here in that fashion.
Makefile.am | 7 +-
.../clip-on-transformed-viewport-200x200.png | Bin 0 -> 1117 bytes
.../mask-on-transformed-viewport-200x200.png | Bin 0 -> 1117 bytes
.../rect-48x48-offsetted-100x100-10x20.png | Bin 0 -> 1331 bytes
...insic-dimensions.rs => intrinsic_dimensions.rs} | 14 +-
librsvg_crate/tests/primitives.rs | 259 +++++++++++
librsvg_crate/tests/render_to_viewport.rs | 201 ++++++---
.../tests/{ => utils}/compare_surfaces.rs | 0
librsvg_crate/tests/utils/mod.rs | 149 +++++++
rsvg_internals/src/clip_path.rs | 59 ++-
rsvg_internals/src/drawing_ctx.rs | 485 +++++++++++++--------
rsvg_internals/src/filters/context.rs | 11 +-
rsvg_internals/src/filters/mod.rs | 33 +-
rsvg_internals/src/handle.rs | 30 +-
rsvg_internals/src/image.rs | 68 +--
rsvg_internals/src/marker.rs | 28 +-
rsvg_internals/src/mask.rs | 73 ++--
rsvg_internals/src/node.rs | 14 +-
rsvg_internals/src/shapes.rs | 1 -
rsvg_internals/src/structure.rs | 49 +--
rsvg_internals/src/text.rs | 113 +++--
rsvg_internals/src/xml2.rs | 2 +
rsvg_internals/src/xml2_load.rs | 11 +
23 files changed, 1099 insertions(+), 508 deletions(-)
---
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]