mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 01:50:42 -05:00
cursor: Clean up code flow slightly
Reverse the set of expressions so testing for gbm is at the top.
This commit is contained in:
parent
4d08e89c16
commit
d071ba8446
@ -281,7 +281,6 @@ meta_cursor_image_load_from_buffer (MetaCursorImage *image,
|
|||||||
|
|
||||||
ClutterBackend *backend;
|
ClutterBackend *backend;
|
||||||
CoglContext *cogl_context;
|
CoglContext *cogl_context;
|
||||||
struct wl_shm_buffer *shm_buffer;
|
|
||||||
uint32_t gbm_format;
|
uint32_t gbm_format;
|
||||||
uint64_t cursor_width, cursor_height;
|
uint64_t cursor_width, cursor_height;
|
||||||
uint width, height;
|
uint width, height;
|
||||||
@ -297,10 +296,10 @@ meta_cursor_image_load_from_buffer (MetaCursorImage *image,
|
|||||||
width = cogl_texture_get_width (COGL_TEXTURE (image->texture));
|
width = cogl_texture_get_width (COGL_TEXTURE (image->texture));
|
||||||
height = cogl_texture_get_height (COGL_TEXTURE (image->texture));
|
height = cogl_texture_get_height (COGL_TEXTURE (image->texture));
|
||||||
|
|
||||||
shm_buffer = wl_shm_buffer_get (buffer);
|
if (gbm)
|
||||||
if (shm_buffer)
|
|
||||||
{
|
{
|
||||||
if (gbm)
|
struct wl_shm_buffer *shm_buffer = wl_shm_buffer_get (buffer);
|
||||||
|
if (shm_buffer)
|
||||||
{
|
{
|
||||||
int rowstride = wl_shm_buffer_get_stride (shm_buffer);
|
int rowstride = wl_shm_buffer_get_stride (shm_buffer);
|
||||||
|
|
||||||
@ -332,10 +331,7 @@ meta_cursor_image_load_from_buffer (MetaCursorImage *image,
|
|||||||
width, height, rowstride,
|
width, height, rowstride,
|
||||||
gbm_format);
|
gbm_format);
|
||||||
}
|
}
|
||||||
}
|
else
|
||||||
else
|
|
||||||
{
|
|
||||||
if (gbm)
|
|
||||||
{
|
{
|
||||||
/* HW cursors have a predefined size (at least 64x64), which usually is bigger than cursor theme
|
/* HW cursors have a predefined size (at least 64x64), which usually is bigger than cursor theme
|
||||||
size, so themed cursors must be padded with transparent pixels to fill the
|
size, so themed cursors must be padded with transparent pixels to fill the
|
||||||
|
Loading…
Reference in New Issue
Block a user