libweston: Remove old coordinate conversion functions
We don't need these anymore, as all users have been moved to the weston_coord equivalents. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
64d9270804
commit
ac04199db1
@ -1807,10 +1807,6 @@ weston_view_update_transform(struct weston_view *view);
|
||||
void
|
||||
weston_view_geometry_dirty(struct weston_view *view);
|
||||
|
||||
void
|
||||
weston_view_to_global_float(struct weston_view *view,
|
||||
float sx, float sy, float *x, float *y);
|
||||
|
||||
struct weston_coord_global __attribute__ ((warn_unused_result))
|
||||
weston_coord_surface_to_global(const struct weston_view *view,
|
||||
struct weston_coord_surface coord);
|
||||
@ -1823,14 +1819,6 @@ struct weston_coord_buffer __attribute__ ((warn_unused_result))
|
||||
weston_coord_surface_to_buffer(const struct weston_surface *surface,
|
||||
struct weston_coord_surface coord);
|
||||
|
||||
void
|
||||
weston_view_from_global(struct weston_view *view,
|
||||
int32_t x, int32_t y, int32_t *vx, int32_t *vy);
|
||||
void
|
||||
weston_view_from_global_fixed(struct weston_view *view,
|
||||
wl_fixed_t x, wl_fixed_t y,
|
||||
wl_fixed_t *vx, wl_fixed_t *vy);
|
||||
|
||||
void
|
||||
weston_view_activate_input(struct weston_view *view,
|
||||
struct weston_seat *seat,
|
||||
|
@ -662,22 +662,6 @@ weston_surface_create(struct weston_compositor *compositor)
|
||||
return surface;
|
||||
}
|
||||
|
||||
WL_EXPORT void
|
||||
weston_view_to_global_float(struct weston_view *view,
|
||||
float sx, float sy, float *x, float *y)
|
||||
{
|
||||
struct weston_vector v = { { sx, sy, 0.0f, 1.0f } };
|
||||
|
||||
assert(!view->transform.dirty);
|
||||
|
||||
weston_matrix_transform(&view->transform.matrix, &v);
|
||||
|
||||
assert(fabs(v.f[3]) > 1e-6);
|
||||
|
||||
*x = v.f[0] / v.f[3];
|
||||
*y = v.f[1] / v.f[3];
|
||||
}
|
||||
|
||||
WL_EXPORT struct weston_coord_global
|
||||
weston_coord_surface_to_global(const struct weston_view *view,
|
||||
struct weston_coord_surface coord)
|
||||
@ -788,18 +772,6 @@ weston_matrix_transform_region(pixman_region32_t *dest,
|
||||
free(dest_rects);
|
||||
}
|
||||
|
||||
WL_EXPORT void
|
||||
weston_surface_to_buffer_float(struct weston_surface *surface,
|
||||
float sx, float sy, float *bx, float *by)
|
||||
{
|
||||
struct weston_vector v = {{sx, sy, 0.0, 1.0}};
|
||||
|
||||
weston_matrix_transform(&surface->surface_to_buffer_matrix, &v);
|
||||
|
||||
*bx = v.f[0] / v.f[3];
|
||||
*by = v.f[1] / v.f[3];
|
||||
}
|
||||
|
||||
/** Transform a rectangle from surface coordinates to buffer coordinates
|
||||
*
|
||||
* \param surface The surface to fetch wp_viewport and buffer transformation
|
||||
@ -1506,63 +1478,6 @@ weston_view_geometry_dirty(struct weston_view *view)
|
||||
weston_view_geometry_dirty(child);
|
||||
}
|
||||
|
||||
WL_EXPORT void
|
||||
weston_view_to_global_fixed(struct weston_view *view,
|
||||
wl_fixed_t vx, wl_fixed_t vy,
|
||||
wl_fixed_t *x, wl_fixed_t *y)
|
||||
{
|
||||
struct weston_coord_surface cs;
|
||||
struct weston_coord_global cg;
|
||||
|
||||
cs = weston_coord_surface_from_fixed(vx, vy, view->surface);
|
||||
cg = weston_coord_surface_to_global(view, cs);
|
||||
|
||||
*x = wl_fixed_from_double(cg.c.x);
|
||||
*y = wl_fixed_from_double(cg.c.y);
|
||||
}
|
||||
|
||||
WL_EXPORT void
|
||||
weston_view_from_global_float(struct weston_view *view,
|
||||
float x, float y, float *vx, float *vy)
|
||||
{
|
||||
struct weston_vector v = { { x, y, 0.0f, 1.0f } };
|
||||
|
||||
assert(!view->transform.dirty);
|
||||
|
||||
weston_matrix_transform(&view->transform.inverse, &v);
|
||||
|
||||
assert(fabs(v.f[3]) > 1e-6);
|
||||
|
||||
*vx = v.f[0] / v.f[3];
|
||||
*vy = v.f[1] / v.f[3];
|
||||
}
|
||||
|
||||
WL_EXPORT void
|
||||
weston_view_from_global_fixed(struct weston_view *view,
|
||||
wl_fixed_t x, wl_fixed_t y,
|
||||
wl_fixed_t *vx, wl_fixed_t *vy)
|
||||
{
|
||||
float vxf, vyf;
|
||||
|
||||
weston_view_from_global_float(view,
|
||||
wl_fixed_to_double(x),
|
||||
wl_fixed_to_double(y),
|
||||
&vxf, &vyf);
|
||||
*vx = wl_fixed_from_double(vxf);
|
||||
*vy = wl_fixed_from_double(vyf);
|
||||
}
|
||||
|
||||
WL_EXPORT void
|
||||
weston_view_from_global(struct weston_view *view,
|
||||
int32_t x, int32_t y, int32_t *vx, int32_t *vy)
|
||||
{
|
||||
float vxf, vyf;
|
||||
|
||||
weston_view_from_global_float(view, x, y, &vxf, &vyf);
|
||||
*vx = floorf(vxf);
|
||||
*vy = floorf(vyf);
|
||||
}
|
||||
|
||||
/**
|
||||
* \param surface The surface to be repainted
|
||||
*
|
||||
|
@ -344,9 +344,6 @@ bool
|
||||
weston_touch_device_can_calibrate(struct weston_touch_device *device);
|
||||
|
||||
/* weston_surface */
|
||||
void
|
||||
weston_surface_to_buffer_float(struct weston_surface *surface,
|
||||
float x, float y, float *bx, float *by);
|
||||
pixman_box32_t
|
||||
weston_surface_to_buffer_rect(struct weston_surface *surface,
|
||||
pixman_box32_t rect);
|
||||
@ -370,13 +367,6 @@ weston_spring_update(struct weston_spring *spring, const struct timespec *time);
|
||||
|
||||
/* weston_view */
|
||||
|
||||
void
|
||||
weston_view_to_global_fixed(struct weston_view *view,
|
||||
wl_fixed_t sx, wl_fixed_t sy,
|
||||
wl_fixed_t *x, wl_fixed_t *y);
|
||||
void
|
||||
weston_view_from_global_float(struct weston_view *view,
|
||||
float x, float y, float *vx, float *vy);
|
||||
bool
|
||||
weston_view_is_opaque(struct weston_view *ev, pixman_region32_t *region);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user