diff options
author | Timm Bäder <mail@baedert.org> | 2020-09-19 18:16:04 +0200 |
---|---|---|
committer | Timm Bäder <mail@baedert.org> | 2020-09-24 19:08:22 +0200 |
commit | 15994db74dba3722ce8e1d4541f91412222770c3 (patch) | |
tree | b3a681be28d78ef285b340cb6a81a6503aaf6d6c /gsk | |
parent | 467be0b7dca010a4d0c7014cee38fa33daaf11be (diff) | |
download | gtk+-15994db74dba3722ce8e1d4541f91412222770c3.tar.gz |
gl renderer: Use scale_x/y when rendering clipped nodes
Diffstat (limited to 'gsk')
-rw-r--r-- | gsk/gl/gskglrenderer.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c index bb5b16688a..e207c4a0f7 100644 --- a/gsk/gl/gskglrenderer.c +++ b/gsk/gl/gskglrenderer.c @@ -1332,17 +1332,18 @@ render_clipped_child (GskGLRenderer *self, else { /* well fuck */ - const float scale = ops_get_scale (builder); + const float scale_x = builder->scale_x; + const float scale_y = builder->scale_y; gboolean is_offscreen; TextureRegion region; GskRoundedRect scaled_clip; memset (&scaled_clip, 0, sizeof (GskRoundedRect)); - scaled_clip.bounds.origin.x = clip->origin.x * scale; - scaled_clip.bounds.origin.y = clip->origin.y * scale; - scaled_clip.bounds.size.width = clip->size.width * scale; - scaled_clip.bounds.size.height = clip->size.height * scale; + scaled_clip.bounds.origin.x = clip->origin.x * scale_x; + scaled_clip.bounds.origin.y = clip->origin.y * scale_y; + scaled_clip.bounds.size.width = clip->size.width * scale_x; + scaled_clip.bounds.size.height = clip->size.height * scale_y; ops_push_clip (builder, &scaled_clip); if (!add_offscreen_ops (self, builder, &child->bounds, |