Convert all scales to int32_t

The type changed in the protocol, so update weston for this.
Alexander Larsson 12 years ago committed by Kristian Høgsberg
parent 14e438c8a2
commit edddbd14ac
  1. 2
      clients/desktop-shell.c
  2. 24
      clients/window.c
  3. 2
      clients/window.h
  4. 4
      src/compositor-x11.c
  5. 12
      src/compositor.c
  6. 14
      src/compositor.h

@ -1115,7 +1115,7 @@ output_handle_done(void *data,
static void
output_handle_scale(void *data,
struct wl_output *wl_output,
uint32_t scale)
int32_t scale)
{
struct output *output = data;

@ -159,7 +159,7 @@ struct toysurface {
*/
cairo_surface_t *(*prepare)(struct toysurface *base, int dx, int dy,
int32_t width, int32_t height, uint32_t flags,
enum wl_output_transform buffer_transform, uint32_t buffer_scale);
enum wl_output_transform buffer_transform, int32_t buffer_scale);
/*
* Post the surface to the server, returning the server allocation
@ -167,7 +167,7 @@ struct toysurface {
* after calling this.
*/
void (*swap)(struct toysurface *base,
enum wl_output_transform buffer_transform, uint32_t buffer_scale,
enum wl_output_transform buffer_transform, int32_t buffer_scale,
struct rectangle *server_allocation);
/*
@ -210,7 +210,7 @@ struct surface {
enum window_buffer_type buffer_type;
enum wl_output_transform buffer_transform;
uint32_t buffer_scale;
int32_t buffer_scale;
cairo_surface_t *cairo_surface;
@ -468,7 +468,7 @@ debug_print(void *proxy, int line, const char *func, const char *fmt, ...)
#endif
static void
surface_to_buffer_size (enum wl_output_transform buffer_transform, uint32_t buffer_scale, int32_t *width, int32_t *height)
surface_to_buffer_size (enum wl_output_transform buffer_transform, int32_t buffer_scale, int32_t *width, int32_t *height)
{
int32_t tmp;
@ -490,7 +490,7 @@ surface_to_buffer_size (enum wl_output_transform buffer_transform, uint32_t buff
}
static void
buffer_to_surface_size (enum wl_output_transform buffer_transform, uint32_t buffer_scale, int32_t *width, int32_t *height)
buffer_to_surface_size (enum wl_output_transform buffer_transform, int32_t buffer_scale, int32_t *width, int32_t *height)
{
int32_t tmp;
@ -531,7 +531,7 @@ to_egl_window_surface(struct toysurface *base)
static cairo_surface_t *
egl_window_surface_prepare(struct toysurface *base, int dx, int dy,
int32_t width, int32_t height, uint32_t flags,
enum wl_output_transform buffer_transform, uint32_t buffer_scale)
enum wl_output_transform buffer_transform, int32_t buffer_scale)
{
struct egl_window_surface *surface = to_egl_window_surface(base);
@ -545,7 +545,7 @@ egl_window_surface_prepare(struct toysurface *base, int dx, int dy,
static void
egl_window_surface_swap(struct toysurface *base,
enum wl_output_transform buffer_transform, uint32_t buffer_scale,
enum wl_output_transform buffer_transform, int32_t buffer_scale,
struct rectangle *server_allocation)
{
struct egl_window_surface *surface = to_egl_window_surface(base);
@ -1017,7 +1017,7 @@ static const struct wl_buffer_listener shm_surface_buffer_listener = {
static cairo_surface_t *
shm_surface_prepare(struct toysurface *base, int dx, int dy,
int32_t width, int32_t height, uint32_t flags,
enum wl_output_transform buffer_transform, uint32_t buffer_scale)
enum wl_output_transform buffer_transform, int32_t buffer_scale)
{
int resize_hint = !!(flags & SURFACE_HINT_RESIZE);
struct shm_surface *surface = to_shm_surface(base);
@ -1095,7 +1095,7 @@ out:
static void
shm_surface_swap(struct toysurface *base,
enum wl_output_transform buffer_transform, uint32_t buffer_scale,
enum wl_output_transform buffer_transform, int32_t buffer_scale,
struct rectangle *server_allocation)
{
struct shm_surface *surface = to_shm_surface(base);
@ -1457,7 +1457,7 @@ window_set_buffer_transform(struct window *window,
void
window_set_buffer_scale(struct window *window,
uint32_t scale)
int32_t scale)
{
window->main_surface->buffer_scale = scale;
wl_surface_set_buffer_scale(window->main_surface->surface,
@ -1720,7 +1720,7 @@ 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;
int32_t scale;
surface_width = surface->allocation.width;
surface_height = surface->allocation.height;
@ -4501,7 +4501,7 @@ display_handle_done(void *data,
static void
display_handle_scale(void *data,
struct wl_output *wl_output,
uint32_t scale)
int32_t scale)
{
struct output *output = data;

@ -258,7 +258,7 @@ window_get_buffer_scale(struct window *window);
void
window_set_buffer_scale(struct window *window,
uint32_t scale);
int32_t scale);
uint32_t
window_get_output_scale(struct window *window);

@ -114,7 +114,7 @@ struct x11_output {
int shm_id;
void *buf;
uint8_t depth;
uint32_t scale;
int32_t scale;
};
static struct xkb_keymap *
@ -777,7 +777,7 @@ static struct x11_output *
x11_compositor_create_output(struct x11_compositor *c, int x, int y,
int width, int height, int fullscreen,
int no_input, char *configured_name,
uint32_t transform, uint32_t scale)
uint32_t transform, int32_t scale)
{
static const char name[] = "Weston Compositor";
static const char class[] = "weston-1\0Weston Compositor";

@ -94,7 +94,7 @@ sigchld_handler(int signal_number, void *data)
static void
weston_output_transform_init(struct weston_output *output, uint32_t transform);
static void
weston_output_scale_init(struct weston_output *output, uint32_t scale);
weston_output_scale_init(struct weston_output *output, int32_t scale);
WL_EXPORT int
weston_output_switch_mode(struct weston_output *output, struct weston_mode *mode)
@ -365,7 +365,7 @@ weston_surface_to_global_float(struct weston_surface *surface,
WL_EXPORT void
weston_transformed_coord(int width, int height,
enum wl_output_transform transform,
uint32_t scale,
int32_t scale,
float sx, float sy, float *bx, float *by)
{
switch (transform) {
@ -411,7 +411,7 @@ weston_transformed_coord(int width, int height,
WL_EXPORT pixman_box32_t
weston_transformed_rect(int width, int height,
enum wl_output_transform transform,
uint32_t scale,
int32_t scale,
pixman_box32_t rect)
{
float x1, x2, y1, y2;
@ -1630,7 +1630,7 @@ surface_set_buffer_transform(struct wl_client *client,
static void
surface_set_buffer_scale(struct wl_client *client,
struct wl_resource *resource,
uint32_t scale)
int32_t scale)
{
struct weston_surface *surface = resource->data;
@ -2669,7 +2669,7 @@ weston_output_transform_init(struct weston_output *output, uint32_t transform)
}
static void
weston_output_scale_init(struct weston_output *output, uint32_t scale)
weston_output_scale_init(struct weston_output *output, int32_t scale)
{
output->scale = scale;
}
@ -2689,7 +2689,7 @@ weston_output_move(struct weston_output *output, int x, int y)
WL_EXPORT void
weston_output_init(struct weston_output *output, struct weston_compositor *c,
int x, int y, int width, int height, uint32_t transform,
uint32_t scale)
int32_t scale)
{
output->compositor = c;
output->x = x;

@ -183,7 +183,7 @@ struct weston_output {
char *make, *model, *serial_number;
uint32_t subpixel;
uint32_t transform;
uint32_t scale;
int32_t scale;
struct weston_mode *current;
struct weston_mode *origin;
@ -612,7 +612,7 @@ struct weston_subsurface {
uint32_t buffer_transform;
/* wl_surface.set_buffer_scale */
uint32_t buffer_scale;
int32_t buffer_scale;
} cached;
int synchronized;
@ -716,7 +716,7 @@ struct weston_surface {
struct weston_buffer_reference buffer_ref;
uint32_t buffer_transform;
uint32_t buffer_scale;
int32_t buffer_scale;
int keep_buffer; /* bool for backends to prevent early release */
/* All the pending state, that wl_surface.commit will apply. */
@ -744,7 +744,7 @@ struct weston_surface {
uint32_t buffer_transform;
/* wl_surface.set_scaling_factor */
uint32_t buffer_scale;
int32_t buffer_scale;
} pending;
/*
@ -1025,7 +1025,7 @@ void
weston_output_move(struct weston_output *output, int x, int y);
void
weston_output_init(struct weston_output *output, struct weston_compositor *c,
int x, int y, int width, int height, uint32_t transform, uint32_t scale);
int x, int y, int width, int height, uint32_t transform, int32_t scale);
void
weston_output_destroy(struct weston_output *output);
@ -1156,12 +1156,12 @@ module_init(struct weston_compositor *compositor,
void
weston_transformed_coord(int width, int height,
enum wl_output_transform transform,
uint32_t scale,
int32_t scale,
float sx, float sy, float *bx, float *by);
pixman_box32_t
weston_transformed_rect(int width, int height,
enum wl_output_transform transform,
uint32_t scale,
int32_t scale,
pixman_box32_t rect);
#ifdef __cplusplus

Loading…
Cancel
Save