[librsvg: 80/90] Move the decision about the topmost temporary surface to CompositingAffines::new
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 80/90] Move the decision about the topmost temporary surface to CompositingAffines::new
- Date: Tue, 26 Mar 2019 19:18:48 +0000 (UTC)
commit e8f979141f83ceb4198f12c2fbd57b48af4e7e1e
Author: Federico Mena Quintero <federico gnome org>
Date: Fri Mar 22 11:01:27 2019 -0600
Move the decision about the topmost temporary surface to CompositingAffines::new
rsvg_internals/src/drawing_ctx.rs | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/rsvg_internals/src/drawing_ctx.rs b/rsvg_internals/src/drawing_ctx.rs
index 50f693ba..acc3df9d 100644
--- a/rsvg_internals/src/drawing_ctx.rs
+++ b/rsvg_internals/src/drawing_ctx.rs
@@ -465,12 +465,10 @@ impl DrawingCtx {
if needs_temporary_surface {
// Compute our assortment of affines
- let is_topmost_temporary_surface = dc.cr_stack.len() == 0;
-
let affines = CompositingAffines::new(
affine_at_start,
dc.initial_affine_with_offset(),
- is_topmost_temporary_surface,
+ dc.cr_stack.len(),
);
// Create temporary surface and its cr
@@ -910,8 +908,10 @@ impl CompositingAffines {
fn new(
current: cairo::Matrix,
initial: cairo::Matrix,
- is_topmost_temporary_surface: bool,
+ cr_stack_depth: usize,
) -> CompositingAffines {
+ let is_topmost_temporary_surface = cr_stack_depth == 0;
+
let initial_inverse = initial.try_invert().unwrap();
let affine = if is_topmost_temporary_surface {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]