mirror of
https://github.com/penpot/penpot.git
synced 2026-06-09 17:02:05 +00:00
Merge pull request #9997 from penpot/elenatorro-fix-background-clear
🐛 Fix clear canvas
This commit is contained in:
commit
ff3587ca2d
@ -2180,8 +2180,11 @@ impl RenderState {
|
||||
let frame_type = self.render_shape_tree_partial(base_object, tree, timestamp, true)?;
|
||||
|
||||
if !self.options.is_interactive_transform() {
|
||||
self.surfaces
|
||||
.draw_tile_atlas_to_backbuffer(&self.viewbox, &self.tile_viewbox);
|
||||
self.surfaces.draw_tile_atlas_to_backbuffer(
|
||||
&self.viewbox,
|
||||
&self.tile_viewbox,
|
||||
self.background_color,
|
||||
);
|
||||
}
|
||||
|
||||
match frame_type {
|
||||
|
||||
@ -518,10 +518,18 @@ impl Surfaces {
|
||||
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.backbuffer.canvas().draw_atlas(
|
||||
&self.tile_atlas.image_snapshot(),
|
||||
let atlas_image = self.tile_atlas.image_snapshot();
|
||||
let canvas = self.backbuffer.canvas();
|
||||
canvas.clear(background);
|
||||
canvas.draw_atlas(
|
||||
&atlas_image,
|
||||
&self.tiles.transforms,
|
||||
&self.tiles.textures,
|
||||
None,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user