diff options
author | Timm Bäder <mail@baedert.org> | 2018-03-15 13:52:07 +0100 |
---|---|---|
committer | Timm Bäder <mail@baedert.org> | 2018-03-15 13:52:07 +0100 |
commit | ebfadae56813e2a68a3cc7a004abb494250ae822 (patch) | |
tree | 0afaf8d3c7e2b42c0b6f7cdc36f848db990301e5 /gsk/gl | |
parent | 65e3dda06568367e301327ff5127fcc9d205979a (diff) | |
download | gtk+-ebfadae56813e2a68a3cc7a004abb494250ae822.tar.gz |
gl renderer: Draw offscreen nodes in device pixels
We need to draw them upscaled, of course. This fixes button hover (or,
more generally, crossfade nodes) in hidpi setups.
Diffstat (limited to 'gsk/gl')
-rw-r--r-- | gsk/gl/gskglrenderer.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c index b67f6cdeb4..7afc34879c 100644 --- a/gsk/gl/gskglrenderer.c +++ b/gsk/gl/gskglrenderer.c @@ -2269,11 +2269,12 @@ add_offscreen_ops (GskGLRenderer *self, render_target = gsk_gl_driver_create_render_target (self->gl_driver, *texture_id, TRUE, TRUE); graphene_matrix_init_ortho (&item_proj, - min_x, max_x, - min_y, max_y, + min_x * self->scale_factor, max_x * self->scale_factor, + min_y * self->scale_factor, max_y * self->scale_factor, ORTHO_NEAR_PLANE, ORTHO_FAR_PLANE); graphene_matrix_scale (&item_proj, 1, -1, 1); graphene_matrix_init_identity (&identity); + graphene_matrix_scale (&identity, self->scale_factor, self->scale_factor, 1); prev_render_target = ops_set_render_target (builder, render_target); /* Clear since we use this rendertarget for the first time */ @@ -2286,7 +2287,9 @@ add_offscreen_ops (GskGLRenderer *self, width, height)); if (reset_clip) prev_clip = ops_set_clip (builder, - &GSK_ROUNDED_RECT_INIT (min_x * self->scale_factor, min_y * self->scale_factor, width, height)); + &GSK_ROUNDED_RECT_INIT (min_x * self->scale_factor, + min_y * self->scale_factor, + width, height)); gsk_gl_renderer_add_render_ops (self, child_node, builder); |