summaryrefslogtreecommitdiffstats
path: root/wgpu/src/backend.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@hecrj.dev>2024-02-02 14:54:56 +0100
committerLibravatar GitHub <noreply@github.com>2024-02-02 14:54:56 +0100
commitaea172543cb49f1f1e3625f60b49336f59e26c00 (patch)
treee99e7a55873678ac37fd695a0f46c1350b30dd2f /wgpu/src/backend.rs
parent759f0e922598504705b543185bc7140a652b726a (diff)
parentb3adf3184594c9bf60e0548a0362d30c512f3966 (diff)
downloadiced-aea172543cb49f1f1e3625f60b49336f59e26c00.tar.gz
iced-aea172543cb49f1f1e3625f60b49336f59e26c00.tar.bz2
iced-aea172543cb49f1f1e3625f60b49336f59e26c00.zip
Merge pull request #2120 from iced-rs/transform-primitive
`Transform` primitive
Diffstat (limited to 'wgpu/src/backend.rs')
-rw-r--r--wgpu/src/backend.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/wgpu/src/backend.rs b/wgpu/src/backend.rs
index 25134d68..77b6fa83 100644
--- a/wgpu/src/backend.rs
+++ b/wgpu/src/backend.rs
@@ -1,7 +1,7 @@
-use crate::core::{Color, Size};
+use crate::core::{Color, Size, Transformation};
use crate::graphics::backend;
use crate::graphics::color;
-use crate::graphics::{Transformation, Viewport};
+use crate::graphics::Viewport;
use crate::primitive::pipeline;
use crate::primitive::{self, Primitive};
use crate::quad;
@@ -147,8 +147,8 @@ impl Backend {
}
if !layer.meshes.is_empty() {
- let scaled = transformation
- * Transformation::scale(scale_factor, scale_factor);
+ let scaled =
+ transformation * Transformation::scale(scale_factor);
self.triangle_pipeline.prepare(
device,
@@ -161,8 +161,8 @@ impl Backend {
#[cfg(any(feature = "image", feature = "svg"))]
{
if !layer.images.is_empty() {
- let scaled = transformation
- * Transformation::scale(scale_factor, scale_factor);
+ let scaled =
+ transformation * Transformation::scale(scale_factor);
self.image_pipeline.prepare(
device,