Deprecate all usages of the Color struct representing gamma space values, fixing round-trip precision bugs (#4149)

* Deprecate all usages of the Color struct representing gamma space values, fixing round-trip precision bugs

* Code review fixes
This commit is contained in:
Keavon Chambers
2026-05-14 22:48:33 -07:00
committed by GitHub
parent 456a7c868d
commit a56746c6bf
67 changed files with 1210 additions and 941 deletions

View File

@@ -13,6 +13,7 @@ use crate::shader_runtime::ShaderRuntime;
use crate::texture_cache::TextureCache;
use anyhow::Result;
use core_types::Color;
use core_types::color::SRGBA8;
use futures::lock::Mutex;
use glam::{Affine2, UVec2};
use graphene_application_io::{ApplicationIo, EditorApi};
@@ -55,9 +56,9 @@ impl WgpuExecutor {
let texture_view = texture.create_view(&wgpu::TextureViewDescriptor::default());
let [r, g, b, a] = background.unwrap_or(Color::TRANSPARENT).to_rgba8();
let SRGBA8 { red, green, blue, alpha } = background.unwrap_or(Color::TRANSPARENT).into();
let render_params = RenderParams {
base_color: vello::peniko::Color::from_rgba8(r, g, b, a),
base_color: vello::peniko::Color::from_rgba8(red, green, blue, alpha),
width: size.x,
height: size.y,
antialiasing_method: AaConfig::Msaa16,