Include images and saved meshes when pasting Frame
`tiny_skia::Frame` was ignoring images in `Frame::paste`, making images not show up when created in a `with_clip` context. `wgpu::Frame` similarly did not pass through meshes in its paste method, that may have been saved from a nested `with_clip` call.
This commit is contained in:
parent
142aba2f17
commit
26b09e1b4d
2 changed files with 2 additions and 0 deletions
|
|
@ -256,6 +256,7 @@ impl geometry::frame::Backend for Frame {
|
||||||
fn paste(&mut self, frame: Self) {
|
fn paste(&mut self, frame: Self) {
|
||||||
self.primitives.extend(frame.primitives);
|
self.primitives.extend(frame.primitives);
|
||||||
self.text.extend(frame.text);
|
self.text.extend(frame.text);
|
||||||
|
self.images.extend(frame.images);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn translate(&mut self, translation: Vector) {
|
fn translate(&mut self, translation: Vector) {
|
||||||
|
|
|
||||||
|
|
@ -395,6 +395,7 @@ impl geometry::frame::Backend for Frame {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn paste(&mut self, frame: Frame) {
|
fn paste(&mut self, frame: Frame) {
|
||||||
|
self.meshes.extend(frame.meshes);
|
||||||
self.meshes
|
self.meshes
|
||||||
.extend(frame.buffers.into_meshes(frame.clip_bounds));
|
.extend(frame.buffers.into_meshes(frame.clip_bounds));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue