cursor: Do less work if we don't have a connection to GBM at all
This commit is contained in:
parent
59e064f610
commit
f6a73bcf22
@ -314,6 +314,8 @@ meta_cursor_image_load_from_buffer (MetaCursorTracker *tracker,
|
||||
|
||||
shm_buffer = wl_shm_buffer_get (buffer);
|
||||
if (shm_buffer)
|
||||
{
|
||||
if (tracker->gbm)
|
||||
{
|
||||
int rowstride = wl_shm_buffer_get_stride (shm_buffer);
|
||||
|
||||
@ -339,13 +341,13 @@ meta_cursor_image_load_from_buffer (MetaCursorTracker *tracker,
|
||||
gbm_format = GBM_FORMAT_ARGB8888;
|
||||
}
|
||||
|
||||
if (tracker->gbm)
|
||||
meta_cursor_image_load_gbm_buffer (tracker->gbm,
|
||||
image,
|
||||
(uint8_t *) wl_shm_buffer_get_data (shm_buffer),
|
||||
width, height, rowstride,
|
||||
gbm_format);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* HW cursors must be 64x64, but 64x64 is huge, and no cursor theme actually uses
|
||||
|
Loading…
Reference in New Issue
Block a user