[PATCH 05/15] window: Apply buffer_scale automatically in widget_cairo_create
alexl at redhat.com
alexl at redhat.com
Wed May 22 05:41:29 PDT 2013
From: Alexander Larsson <alexl at redhat.com>
---
clients/window.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/clients/window.c b/clients/window.c
index 378cc75..00ffd27 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -1636,11 +1636,13 @@ widget_cairo_update_transform(struct widget *widget, cairo_t *cr)
enum wl_output_transform transform;
int surface_width, surface_height;
int translate_x, translate_y;
+ uint32_t scale;
surface_width = surface->allocation.width;
surface_height = surface->allocation.height;
transform = surface->buffer_transform;
+ scale = surface->buffer_scale;
switch (transform) {
case WL_OUTPUT_TRANSFORM_FLIPPED:
@@ -1698,6 +1700,7 @@ widget_cairo_update_transform(struct widget *widget, cairo_t *cr)
break;
}
+ cairo_scale(cr, scale, scale);
cairo_translate(cr, translate_x, translate_y);
cairo_rotate(cr, angle);
cairo_transform(cr, &m);
--
1.8.1.4
More information about the wayland-devel
mailing list