mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
virtio-gpu: add cursor update tracepoint
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
parent
9d9e152136
commit
e9c1b459f2
2 changed files with 9 additions and 1 deletions
|
@ -91,13 +91,20 @@ static void update_cursor_data_virgl(VirtIOGPU *g,
|
|||
static void update_cursor(VirtIOGPU *g, struct virtio_gpu_update_cursor *cursor)
|
||||
{
|
||||
struct virtio_gpu_scanout *s;
|
||||
bool move = cursor->hdr.type != VIRTIO_GPU_CMD_MOVE_CURSOR;
|
||||
|
||||
if (cursor->pos.scanout_id >= g->conf.max_outputs) {
|
||||
return;
|
||||
}
|
||||
s = &g->scanout[cursor->pos.scanout_id];
|
||||
|
||||
if (cursor->hdr.type != VIRTIO_GPU_CMD_MOVE_CURSOR) {
|
||||
trace_virtio_gpu_update_cursor(cursor->pos.scanout_id,
|
||||
cursor->pos.x,
|
||||
cursor->pos.y,
|
||||
move ? "move" : "update",
|
||||
cursor->resource_id);
|
||||
|
||||
if (move) {
|
||||
if (!s->current_cursor) {
|
||||
s->current_cursor = cursor_alloc(64, 64);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue