Skip to content

Commit

Permalink
Merge pull request #2605 from Gobbel2000/frame_paste
Browse files Browse the repository at this point in the history
Include images and saved meshes when pasting `Frame`
  • Loading branch information
hecrj authored Sep 24, 2024
2 parents faff6fb + 26b09e1 commit 3c68b64
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions tiny_skia/src/geometry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ impl geometry::frame::Backend for Frame {
fn paste(&mut self, frame: Self) {
self.primitives.extend(frame.primitives);
self.text.extend(frame.text);
self.images.extend(frame.images);
}

fn translate(&mut self, translation: Vector) {
Expand Down
1 change: 1 addition & 0 deletions wgpu/src/geometry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ impl geometry::frame::Backend for Frame {
}

fn paste(&mut self, frame: Frame) {
self.meshes.extend(frame.meshes);
self.meshes
.extend(frame.buffers.into_meshes(frame.clip_bounds));

Expand Down

0 comments on commit 3c68b64

Please sign in to comment.