diff options
author | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2013-11-26 18:19:42 +0100 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2013-11-28 14:14:08 -0800 |
commit | ba34165ce23b857d9b190b249309151972539bea (patch) | |
tree | eb687f34740a45354e780ccb7ca76e061f7d8461 /src/input.c | |
parent | 1fd9c0f81a602ff86526c1132f1f5df0d4aa7585 (diff) | |
download | weston-ba34165ce23b857d9b190b249309151972539bea.tar.gz |
compositor: do not recompute size on pointer_set_cursor
This removes the calls to weston_surface_buffer_width/height() from
input.c, which are the last external calls to them.
Instead, use the cached values from weston_surface::width,height. These
have already been set by weston_surface_commit(), because that is the
only way a weston_surface can get a buffer.
Diffstat (limited to 'src/input.c')
-rw-r--r-- | src/input.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/input.c b/src/input.c index ae0e832b..f965ba19 100644 --- a/src/input.c +++ b/src/input.c @@ -1495,8 +1495,8 @@ pointer_set_cursor(struct wl_client *client, struct wl_resource *resource, pointer->hotspot_y = y; if (surface->buffer_ref.buffer) - pointer_cursor_surface_configure(surface, 0, 0, weston_surface_buffer_width(surface), - weston_surface_buffer_height(surface)); + pointer_cursor_surface_configure(surface, 0, 0, surface->width, + surface->height); } static void |