[gtk+] gl renderer: Fix hidpi fallback rendering
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gl renderer: Fix hidpi fallback rendering
- Date: Mon, 20 Mar 2017 09:54:15 +0000 (UTC)
commit 9e12fc7853cfadc43fe0523a9502704335e8e079
Author: Alexander Larsson <alexl redhat com>
Date: Sun Mar 19 19:24:50 2017 +0100
gl renderer: Fix hidpi fallback rendering
When allocating the surface, take scale into consideration.
gsk/gskglrenderer.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gsk/gskglrenderer.c b/gsk/gskglrenderer.c
index 6b75ff1..deeabbc 100644
--- a/gsk/gskglrenderer.c
+++ b/gsk/gskglrenderer.c
@@ -779,8 +779,9 @@ gsk_gl_renderer_add_render_item (GskGLRenderer *self,
cairo_t *cr;
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
- ceil (node->bounds.size.width),
- ceil (node->bounds.size.height));
+ item.size.width,
+ item.size.height);
+ cairo_surface_set_device_scale (surface, scale_factor, scale_factor);
cr = cairo_create (surface);
cairo_translate (cr, -node->bounds.origin.x, -node->bounds.origin.y);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]