protocol: rename wl_surface_scaler to wl_viewport

This seems like a better name, and will not conflict if someone later
extends wl_surface with a request scaler_set (yeah, unlikely).

This code was written by Jonny Lamb, I just diffed his branches and made
a patch for Weston.

Cc: Jonny Lamb <jonny.lamb@collabora.co.uk>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This commit is contained in:
Pekka Paalanen
2014-01-08 15:39:17 +02:00
committed by Kristian Høgsberg
parent 73e9f86e2c
commit b0420aeb3d
5 changed files with 72 additions and 72 deletions
+5 -5
View File
@@ -47,7 +47,7 @@ struct box {
int width, height;
struct wl_scaler *scaler;
struct wl_surface_scaler *surface_scaler;
struct wl_viewport *viewport;
};
static void
@@ -138,12 +138,12 @@ global_handler(struct display *display, uint32_t name,
box->scaler = display_bind(display, name,
&wl_scaler_interface, 1);
box->surface_scaler = wl_scaler_get_surface_scaler(box->scaler,
box->viewport = wl_scaler_get_viewport(box->scaler,
widget_get_wl_surface(box->widget));
wl_surface_scaler_set(box->surface_scaler,
src_x, src_y, src_width, src_height,
SURFACE_WIDTH, SURFACE_HEIGHT); /* dst */
wl_viewport_set(box->viewport,
src_x, src_y, src_width, src_height,
SURFACE_WIDTH, SURFACE_HEIGHT); /* dst */
}
}