Use consistent color strategy in glyphon

This commit is contained in:
Héctor Ramón Jiménez 2023-06-01 03:10:02 +02:00
parent c528f2129e
commit b5fc0f4a3a
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
2 changed files with 11 additions and 2 deletions

View file

@ -36,7 +36,16 @@ impl Pipeline {
.into_iter(),
)),
renderers: Vec::new(),
atlas: glyphon::TextAtlas::new(device, queue, format),
atlas: glyphon::TextAtlas::new(
device,
queue,
format,
if color::GAMMA_CORRECTION {
glyphon::ColorMode::Accurate
} else {
glyphon::ColorMode::Web
},
),
prepare_layer: 0,
measurement_cache: RefCell::new(Cache::new()),
render_cache: Cache::new(),