summaryrefslogtreecommitdiff
path: root/gsk
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2023-05-01 13:28:27 -0400
committerMatthias Clasen <mclasen@redhat.com>2023-05-01 13:45:20 -0400
commit319762b908d1a6896fb2a07172409e08ce147abd (patch)
treea279898e0558fabd3c9ecd0028bfd579fc89d115 /gsk
parente453a989dfc211f7c5fbf1873b7d90324e7805cc (diff)
downloadgtk+-319762b908d1a6896fb2a07172409e08ce147abd.tar.gz
gsk: Extract scales properly from 2D transforms
We have the code to do it properly.
Diffstat (limited to 'gsk')
-rw-r--r--gsk/gl/gskglrenderjob.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gsk/gl/gskglrenderjob.c b/gsk/gl/gskglrenderjob.c
index 96637054d2..7fa6408fc2 100644
--- a/gsk/gl/gskglrenderjob.c
+++ b/gsk/gl/gskglrenderjob.c
@@ -466,13 +466,14 @@ extract_matrix_metadata (GskGLRenderModelview *modelview)
case GSK_TRANSFORM_CATEGORY_2D:
{
- float xx, xy, yx, yy, dx, dy;
+ float skew_x, skew_y, angle, dx, dy;
- gsk_transform_to_2d (modelview->transform,
- &xx, &xy, &yx, &yy, &dx, &dy);
-
- modelview->scale_x = sqrtf (xx * xx + xy * xy);
- modelview->scale_y = sqrtf (yx * yx + yy * yy);
+ gsk_transform_to_2d_components (modelview->transform,
+ &skew_x, &skew_y,
+ &modelview->scale_x, &modelview->scale_y,
+ &angle, &dx, &dy);
+ modelview->dx = 0;
+ modelview->dy = 0;
}
break;