backend-drm: Change cursor checks to asserts
We shouldn't get down into trying to place a view on a cursor plane if these checks are not met, so change them to asserts rather than early returns. Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
b3d7df5c3e
commit
5e41b44b10
@ -209,24 +209,15 @@ drm_output_prepare_cursor_view(struct drm_output_state *output_state,
|
||||
const char *p_name = drm_output_get_plane_type_name(plane);
|
||||
|
||||
assert(!b->cursors_are_broken);
|
||||
|
||||
if (!plane)
|
||||
return NULL;
|
||||
|
||||
if (!plane->state_cur->complete)
|
||||
return NULL;
|
||||
|
||||
if (plane->state_cur->output && plane->state_cur->output != output)
|
||||
return NULL;
|
||||
assert(plane);
|
||||
assert(plane->state_cur->complete);
|
||||
assert(!plane->state_cur->output || plane->state_cur->output == output);
|
||||
|
||||
/* We use GBM to import SHM buffers. */
|
||||
if (b->gbm == NULL)
|
||||
return NULL;
|
||||
assert(b->gbm);
|
||||
|
||||
plane_state = drm_output_state_get_plane(output_state, plane);
|
||||
|
||||
if (plane_state && plane_state->fb)
|
||||
return NULL;
|
||||
assert(!plane_state->fb);
|
||||
|
||||
/* We can't scale with the legacy API, and we don't try to account for
|
||||
* simple cropping/translation in cursor_bo_update. */
|
||||
|
Loading…
Reference in New Issue
Block a user