Desktop: Fix bitmap file export not preserving alpha (#3673)

Fix Export not preserving alpha
This commit is contained in:
Timon
2026-01-26 14:51:48 +01:00
committed by GitHub
parent c07124332b
commit b4e9d7b9eb
4 changed files with 10 additions and 14 deletions

View File

@@ -1,7 +1,7 @@
use std::borrow::Cow;
use crate::window::Window;
use crate::wrapper::{Color, TargetTexture, WgpuContext, WgpuExecutor};
use crate::wrapper::{TargetTexture, WgpuContext, WgpuExecutor};
#[derive(derivative::Derivative)]
#[derivative(Debug)]
@@ -232,10 +232,7 @@ impl RenderState {
return;
};
let size = glam::UVec2::new(viewport_texture.width(), viewport_texture.height());
let result = futures::executor::block_on(
self.executor
.render_vello_scene_to_target_texture(&scene, size, &Default::default(), Color::TRANSPARENT, &mut self.overlays_texture),
);
let result = futures::executor::block_on(self.executor.render_vello_scene_to_target_texture(&scene, size, &Default::default(), None, &mut self.overlays_texture));
if let Err(e) = result {
tracing::error!("Error rendering overlays: {:?}", e);
return;

View File

@@ -3,8 +3,6 @@ use graphite_editor::application::{Editor, Environment, Host, Platform};
use graphite_editor::messages::prelude::{FrontendMessage, Message};
pub use graphite_editor::consts::FILE_EXTENSION;
// TODO: Remove usage of this reexport in desktop create and remove this line
pub use graphene_std::Color;
pub use wgpu_executor::TargetTexture;
pub use wgpu_executor::WgpuContext;