mirror of
https://github.com/penpot/penpot.git
synced 2026-09-08 13:09:22 +00:00
🐛 Fix clear canvas
This commit is contained in:
parent
e6f5b270de
commit
d9fea603f8
@ -2180,8 +2180,11 @@ impl RenderState {
|
|||||||
let frame_type = self.render_shape_tree_partial(base_object, tree, timestamp, true)?;
|
let frame_type = self.render_shape_tree_partial(base_object, tree, timestamp, true)?;
|
||||||
|
|
||||||
if !self.options.is_interactive_transform() {
|
if !self.options.is_interactive_transform() {
|
||||||
self.surfaces
|
self.surfaces.draw_tile_atlas_to_backbuffer(
|
||||||
.draw_tile_atlas_to_backbuffer(&self.viewbox, &self.tile_viewbox);
|
&self.viewbox,
|
||||||
|
&self.tile_viewbox,
|
||||||
|
self.background_color,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
match frame_type {
|
match frame_type {
|
||||||
|
|||||||
@ -518,10 +518,18 @@ impl Surfaces {
|
|||||||
self.tiles.clear();
|
self.tiles.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn draw_tile_atlas_to_backbuffer(&mut self, viewbox: &Viewbox, tile_viewbox: &TileViewbox) {
|
pub fn draw_tile_atlas_to_backbuffer(
|
||||||
|
&mut self,
|
||||||
|
viewbox: &Viewbox,
|
||||||
|
tile_viewbox: &TileViewbox,
|
||||||
|
background: skia::Color,
|
||||||
|
) {
|
||||||
self.tiles.update(viewbox, tile_viewbox);
|
self.tiles.update(viewbox, tile_viewbox);
|
||||||
self.backbuffer.canvas().draw_atlas(
|
let atlas_image = self.tile_atlas.image_snapshot();
|
||||||
&self.tile_atlas.image_snapshot(),
|
let canvas = self.backbuffer.canvas();
|
||||||
|
canvas.clear(background);
|
||||||
|
canvas.draw_atlas(
|
||||||
|
&atlas_image,
|
||||||
&self.tiles.transforms,
|
&self.tiles.transforms,
|
||||||
&self.tiles.textures,
|
&self.tiles.textures,
|
||||||
None,
|
None,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user