mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-21 14:42:25 +00:00
output: drop wlr_output_cursor_set_image()
This function takes a pointer to memory with a hardcoded format and many parameters to describe the pixel buffer. wlr_output_cursor_set_buffer() can be used instead.
This commit is contained in:
parent
f8d70fbece
commit
6f8287128b
@ -551,12 +551,6 @@ bool wlr_output_is_direct_scanout_allowed(struct wlr_output *output);
|
|||||||
|
|
||||||
|
|
||||||
struct wlr_output_cursor *wlr_output_cursor_create(struct wlr_output *output);
|
struct wlr_output_cursor *wlr_output_cursor_create(struct wlr_output *output);
|
||||||
/**
|
|
||||||
* Sets the cursor image. The image must be already scaled for the output.
|
|
||||||
*/
|
|
||||||
bool wlr_output_cursor_set_image(struct wlr_output_cursor *cursor,
|
|
||||||
const uint8_t *pixels, int32_t stride, uint32_t width, uint32_t height,
|
|
||||||
int32_t hotspot_x, int32_t hotspot_y);
|
|
||||||
bool wlr_output_cursor_set_buffer(struct wlr_output_cursor *cursor,
|
bool wlr_output_cursor_set_buffer(struct wlr_output_cursor *cursor,
|
||||||
struct wlr_buffer *buffer, int32_t hotspot_x, int32_t hotspot_y);
|
struct wlr_buffer *buffer, int32_t hotspot_x, int32_t hotspot_y);
|
||||||
bool wlr_output_cursor_move(struct wlr_output_cursor *cursor,
|
bool wlr_output_cursor_move(struct wlr_output_cursor *cursor,
|
||||||
|
@ -390,25 +390,6 @@ static bool output_cursor_attempt_hardware(struct wlr_output_cursor *cursor) {
|
|||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wlr_output_cursor_set_image(struct wlr_output_cursor *cursor,
|
|
||||||
const uint8_t *pixels, int32_t stride, uint32_t width, uint32_t height,
|
|
||||||
int32_t hotspot_x, int32_t hotspot_y) {
|
|
||||||
struct wlr_buffer *buffer = NULL;
|
|
||||||
|
|
||||||
if (pixels) {
|
|
||||||
struct wlr_readonly_data_buffer *ro_buffer = readonly_data_buffer_create(
|
|
||||||
DRM_FORMAT_ARGB8888, stride, width, height, pixels);
|
|
||||||
if (ro_buffer == NULL) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
buffer = &ro_buffer->base;
|
|
||||||
}
|
|
||||||
bool ok = wlr_output_cursor_set_buffer(cursor, buffer, hotspot_x, hotspot_y);
|
|
||||||
|
|
||||||
wlr_buffer_drop(buffer);
|
|
||||||
return ok;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wlr_output_cursor_set_buffer(struct wlr_output_cursor *cursor,
|
bool wlr_output_cursor_set_buffer(struct wlr_output_cursor *cursor,
|
||||||
struct wlr_buffer *buffer, int32_t hotspot_x, int32_t hotspot_y) {
|
struct wlr_buffer *buffer, int32_t hotspot_x, int32_t hotspot_y) {
|
||||||
struct wlr_renderer *renderer = cursor->output->renderer;
|
struct wlr_renderer *renderer = cursor->output->renderer;
|
||||||
|
Loading…
Reference in New Issue
Block a user