window: Apply buffer_scale automatically in widget_cairo_create
This commit is contained in:
committed by
Kristian Høgsberg
parent
5e9b652a15
commit
2aaa8b76cf
@@ -1650,11 +1650,13 @@ widget_cairo_update_transform(struct widget *widget, cairo_t *cr)
|
|||||||
enum wl_output_transform transform;
|
enum wl_output_transform transform;
|
||||||
int surface_width, surface_height;
|
int surface_width, surface_height;
|
||||||
int translate_x, translate_y;
|
int translate_x, translate_y;
|
||||||
|
uint32_t scale;
|
||||||
|
|
||||||
surface_width = surface->allocation.width;
|
surface_width = surface->allocation.width;
|
||||||
surface_height = surface->allocation.height;
|
surface_height = surface->allocation.height;
|
||||||
|
|
||||||
transform = surface->buffer_transform;
|
transform = surface->buffer_transform;
|
||||||
|
scale = surface->buffer_scale;
|
||||||
|
|
||||||
switch (transform) {
|
switch (transform) {
|
||||||
case WL_OUTPUT_TRANSFORM_FLIPPED:
|
case WL_OUTPUT_TRANSFORM_FLIPPED:
|
||||||
@@ -1712,6 +1714,7 @@ widget_cairo_update_transform(struct widget *widget, cairo_t *cr)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cairo_scale(cr, scale, scale);
|
||||||
cairo_translate(cr, translate_x, translate_y);
|
cairo_translate(cr, translate_x, translate_y);
|
||||||
cairo_rotate(cr, angle);
|
cairo_rotate(cr, angle);
|
||||||
cairo_transform(cr, &m);
|
cairo_transform(cr, &m);
|
||||||
|
|||||||
Reference in New Issue
Block a user