Revert "backend-wayland: fix pixman buffer size"
This reverts commit d4eafbaa98.
This commit is contained in:
@@ -301,7 +301,7 @@ wayland_output_get_shm_buffer(struct wayland_output *output)
|
|||||||
|
|
||||||
struct wl_shm_pool *pool;
|
struct wl_shm_pool *pool;
|
||||||
int width, height, stride;
|
int width, height, stride;
|
||||||
struct weston_geometry area;
|
int32_t fx, fy;
|
||||||
int fd;
|
int fd;
|
||||||
unsigned char *data;
|
unsigned char *data;
|
||||||
|
|
||||||
@@ -377,20 +377,13 @@ wayland_output_get_shm_buffer(struct wayland_output *output)
|
|||||||
cairo_image_surface_create_for_data(data, CAIRO_FORMAT_ARGB32,
|
cairo_image_surface_create_for_data(data, CAIRO_FORMAT_ARGB32,
|
||||||
width, height, stride);
|
width, height, stride);
|
||||||
|
|
||||||
if (output->frame) {
|
fx = 0;
|
||||||
frame_interior(output->frame, &area.x, &area.y,
|
fy = 0;
|
||||||
&area.width, &area.height);
|
if (output->frame)
|
||||||
} else {
|
frame_interior(output->frame, &fx, &fy, 0, 0);
|
||||||
area.x = 0;
|
|
||||||
area.y = 0;
|
|
||||||
area.width = output->base.current_mode->width;
|
|
||||||
area.height = output->base.current_mode->height;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Address only the interior, excluding output decorations */
|
|
||||||
sb->pm_image =
|
sb->pm_image =
|
||||||
pixman_image_create_bits(PIXMAN_a8r8g8b8, area.width, area.height,
|
pixman_image_create_bits(PIXMAN_a8r8g8b8, width, height,
|
||||||
(uint32_t *)(data + area.y * stride) + area.x,
|
(uint32_t *)(data + fy * stride) + fx,
|
||||||
stride);
|
stride);
|
||||||
|
|
||||||
return sb;
|
return sb;
|
||||||
|
|||||||
Reference in New Issue
Block a user