summaryrefslogtreecommitdiffstats
path: root/wgpu/src/backend.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2023-06-03 03:04:38 +0200
committerLibravatar GitHub <noreply@github.com>2023-06-03 03:04:38 +0200
commitc15f1b5f6575792cc89bb5fba2e613428397e46a (patch)
tree77526943d7aac8004e3ac7dca07154dcbbe25a0f /wgpu/src/backend.rs
parentb353767d2d9703aae35f10ebf8a9ee1490c3ae37 (diff)
parentb5fc0f4a3aa45d33d81d5799396f0b0770c4dff3 (diff)
downloadiced-c15f1b5f6575792cc89bb5fba2e613428397e46a.tar.gz
iced-c15f1b5f6575792cc89bb5fba2e613428397e46a.tar.bz2
iced-c15f1b5f6575792cc89bb5fba2e613428397e46a.zip
Merge pull request #1888 from iced-rs/web-colors
Introduce `web-colors` feature flag to enable "sRGB linear" blending
Diffstat (limited to 'wgpu/src/backend.rs')
-rw-r--r--wgpu/src/backend.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/wgpu/src/backend.rs b/wgpu/src/backend.rs
index 844987f2..b524c615 100644
--- a/wgpu/src/backend.rs
+++ b/wgpu/src/backend.rs
@@ -1,6 +1,7 @@
use crate::core;
use crate::core::{Color, Font, Point, Size};
use crate::graphics::backend;
+use crate::graphics::color;
use crate::graphics::{Primitive, Transformation, Viewport};
use crate::quad;
use crate::text;
@@ -239,7 +240,7 @@ impl Backend {
load: match clear_color {
Some(background_color) => wgpu::LoadOp::Clear({
let [r, g, b, a] =
- background_color.into_linear();
+ color::pack(background_color).components();
wgpu::Color {
r: f64::from(r),