From f613beae5c39cfc6f7aefda079e20efc5c244231 Mon Sep 17 00:00:00 2001 From: Vasiliy Ulyanov Date: Mon, 9 Feb 2015 12:17:47 +0300 Subject: [PATCH] VIGS: add new plane for cursor support Change-Id: Ife6bd3219ecd338ccec1b35f00f912ae5cc35e44 Signed-off-by: Vasiliy Ulyanov --- hw/vigs/vigs_gl_backend.c | 5 ++++- hw/vigs/vigs_protocol.h | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/vigs/vigs_gl_backend.c b/hw/vigs/vigs_gl_backend.c index e0cb37e..f66b8c0 100644 --- a/hw/vigs/vigs_gl_backend.c +++ b/hw/vigs/vigs_gl_backend.c @@ -1800,9 +1800,10 @@ vigs_gl_backend_sort_planes(const struct vigs_plane *planes, { /* * Sort planes, only 2 of them now, don't bother... + * The 3rd plane is for HW cursor (should always be on top). */ - assert(VIGS_MAX_PLANES == 2); + assert(VIGS_MAX_PLANES == 3); if (planes[0].z_pos <= planes[1].z_pos) { sorted_planes[0] = &planes[0]; @@ -1811,6 +1812,8 @@ vigs_gl_backend_sort_planes(const struct vigs_plane *planes, sorted_planes[0] = &planes[1]; sorted_planes[1] = &planes[0]; } + + sorted_planes[2] = &planes[2]; } /* diff --git a/hw/vigs/vigs_protocol.h b/hw/vigs/vigs_protocol.h index 8dcc158..3c3e1ab 100644 --- a/hw/vigs/vigs_protocol.h +++ b/hw/vigs/vigs_protocol.h @@ -37,9 +37,9 @@ /* * Bump this whenever protocol changes. */ -#define VIGS_PROTOCOL_VERSION 20 +#define VIGS_PROTOCOL_VERSION 21 -#define VIGS_MAX_PLANES 2 +#define VIGS_MAX_PLANES 3 typedef signed char vigsp_s8; typedef signed short vigsp_s16; -- 2.7.4