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

@ -34,7 +34,7 @@ async fn test(run: Rc<TestRun>) -> Result<(), TestError> {
let buffer = client
.spbm
.create_buffer(Color::from_rgba_straight(255, 255, 255, 255))?;
.create_buffer(Color::from_srgba_straight(255, 255, 255, 255))?;
child.attach(buffer.id)?;
child_viewport.set_source(0, 0, 1, 1)?;

View file

@ -25,7 +25,7 @@ async fn test(run: Rc<TestRun>) -> Result<(), TestError> {
let win1 = client.create_window().await?;
win1.map2().await?;
let buffer = client.spbm.create_buffer(Color::from_rgb(255, 0, 0))?;
let buffer = client.spbm.create_buffer(Color::from_srgb(255, 0, 0))?;
let surface = client.comp.create_surface().await?;
let vp = client.viewporter.get_viewport(&surface)?;
vp.set_destination(100, 100)?;

View file

@ -36,11 +36,11 @@ async fn test(run: Rc<TestRun>) -> TestResult {
}};
}
let buf1 = client.spbm.create_buffer(Color::from_rgb(0, 255, 0))?;
let buf1 = client.spbm.create_buffer(Color::from_srgb(0, 255, 0))?;
let (ss1, alpha1) = create_surface!(&buf1, 0, 0);
let buf2 = client.shm.create_buffer(1, 1)?;
buf2.fill(Color::from_rgb(0, 255, 0));
buf2.fill(Color::from_srgb(0, 255, 0));
let (ss2, alpha2) = create_surface!(&buf2.buffer, 100, 0);
client.compare_screenshot("1", false).await?;