1
0
Fork 0
forked from wry/wry

theme: store colors in linear space

This commit is contained in:
Julian Orth 2025-02-25 15:43:05 +01:00
parent b7f93b37a6
commit 135f37dbcd
27 changed files with 221 additions and 135 deletions

View file

@ -4,7 +4,7 @@ use {
globals::{Global, GlobalName},
leaks::Tracker,
object::{Object, Version},
theme::Color,
theme::{Color, TransferFunction},
wire::{
JayCompositorId,
jay_damage_tracking::{
@ -96,12 +96,8 @@ impl JayDamageTrackingRequestHandler for JayDamageTracking {
req: SetVisualizerColor,
_slf: &Rc<Self>,
) -> Result<(), Self::Error> {
self.client.state.damage_visualizer.set_color(Color {
r: req.r,
g: req.g,
b: req.b,
a: req.a,
});
let color = Color::new(TransferFunction::Srgb, req.r, req.g, req.b) * req.a;
self.client.state.damage_visualizer.set_color(color);
Ok(())
}