Add back damage argument to nvnc_set_cursor
It's better to keep feeding buffers to keep buffers in rotation for damage tracking purposes.pull/63/head
parent
9c02e6afaf
commit
aca09358ea
|
@ -281,7 +281,7 @@ int main(int argc, char* argv[])
|
|||
struct nvnc_fb* cursor = create_cursor();
|
||||
assert(cursor);
|
||||
|
||||
nvnc_set_cursor(server, cursor, 0, 0, 32, 32);
|
||||
nvnc_set_cursor(server, cursor, 0, 0, 32, 32, true);
|
||||
nvnc_fb_unref(cursor);
|
||||
|
||||
struct aml_signal* sig = aml_signal_new(SIGINT, on_sigint, NULL, NULL);
|
||||
|
|
|
@ -143,4 +143,5 @@ void nvnc_display_feed_buffer(struct nvnc_display*, struct nvnc_fb*,
|
|||
void nvnc_send_cut_text(struct nvnc*, const char* text, uint32_t len);
|
||||
|
||||
void nvnc_set_cursor(struct nvnc*, struct nvnc_fb*, uint16_t width,
|
||||
uint16_t height, uint16_t hotspot_x, uint16_t hotspot_y);
|
||||
uint16_t height, uint16_t hotspot_x, uint16_t hotspot_y,
|
||||
bool is_damaged);
|
||||
|
|
|
@ -1574,7 +1574,8 @@ cert_alloc_failure:
|
|||
|
||||
EXPORT
|
||||
void nvnc_set_cursor(struct nvnc* self, struct nvnc_fb* fb, uint16_t width,
|
||||
uint16_t height, uint16_t hotspot_x, uint16_t hotspot_y)
|
||||
uint16_t height, uint16_t hotspot_x, uint16_t hotspot_y,
|
||||
bool is_damaged)
|
||||
{
|
||||
if (self->cursor.buffer) {
|
||||
nvnc_fb_release(self->cursor.buffer);
|
||||
|
@ -1582,6 +1583,7 @@ void nvnc_set_cursor(struct nvnc* self, struct nvnc_fb* fb, uint16_t width,
|
|||
}
|
||||
|
||||
self->cursor.buffer = fb;
|
||||
|
||||
if (fb) {
|
||||
// TODO: Hash cursors to check if they actually changed?
|
||||
nvnc_fb_ref(fb);
|
||||
|
@ -1599,6 +1601,9 @@ void nvnc_set_cursor(struct nvnc* self, struct nvnc_fb* fb, uint16_t width,
|
|||
self->cursor.hotspot_y = 0;
|
||||
}
|
||||
|
||||
if (!is_damaged)
|
||||
return;
|
||||
|
||||
self->cursor_seq++;
|
||||
|
||||
struct nvnc_client* client;
|
||||
|
|
Loading…
Reference in New Issue