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:
@@ -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);
|
const char *p_name = drm_output_get_plane_type_name(plane);
|
||||||
|
|
||||||
assert(!b->cursors_are_broken);
|
assert(!b->cursors_are_broken);
|
||||||
|
assert(plane);
|
||||||
if (!plane)
|
assert(plane->state_cur->complete);
|
||||||
return NULL;
|
assert(!plane->state_cur->output || plane->state_cur->output == output);
|
||||||
|
|
||||||
if (!plane->state_cur->complete)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
if (plane->state_cur->output && plane->state_cur->output != output)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
/* We use GBM to import SHM buffers. */
|
/* We use GBM to import SHM buffers. */
|
||||||
if (b->gbm == NULL)
|
assert(b->gbm);
|
||||||
return NULL;
|
|
||||||
|
|
||||||
plane_state = drm_output_state_get_plane(output_state, plane);
|
plane_state = drm_output_state_get_plane(output_state, plane);
|
||||||
|
assert(!plane_state->fb);
|
||||||
if (plane_state && plane_state->fb)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
/* We can't scale with the legacy API, and we don't try to account for
|
/* We can't scale with the legacy API, and we don't try to account for
|
||||||
* simple cropping/translation in cursor_bo_update. */
|
* simple cropping/translation in cursor_bo_update. */
|
||||||
|
|||||||
Reference in New Issue
Block a user