Skip to content

Commit 8e819b6

Browse files
committed
Move current_transform out of trait
1 parent e981165 commit 8e819b6

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

piet-direct2d/src/lib.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,6 @@ impl<'b, 'a: 'b> D2DRenderContext<'a> {
109109
}
110110
}
111111

112-
pub fn current_transform(&self) -> Affine {
113-
// This is an unwrap because we protect the invariant.
114-
self.ctx_stack.last().unwrap().transform
115-
}
116-
117112
fn pop_state(&mut self) {
118113
// This is an unwrap because we protect the invariant.
119114
let old_state = self.ctx_stack.pop().unwrap();
@@ -426,7 +421,8 @@ impl<'a> RenderContext for D2DRenderContext<'a> {
426421
}
427422

428423
fn current_transform(&self) -> Affine {
429-
self.current_transform()
424+
// This is an unwrap because we protect the invariant.
425+
self.ctx_stack.last().unwrap().transform
430426
}
431427

432428
fn make_image(

0 commit comments

Comments
 (0)