VIGS: add new plane for cursor support 17/35117/1
authorVasiliy Ulyanov <v.ulyanov@samsung.com>
Mon, 9 Feb 2015 09:17:47 +0000 (12:17 +0300)
committerVasiliy Ulyanov <v.ulyanov@samsung.com>
Mon, 9 Feb 2015 09:17:47 +0000 (12:17 +0300)
Change-Id: Ife6bd3219ecd338ccec1b35f00f912ae5cc35e44
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
hw/vigs/vigs_gl_backend.c
hw/vigs/vigs_protocol.h

index e0cb37e..f66b8c0 100644 (file)
@@ -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];
 }
 
 /*
index 8dcc158..3c3e1ab 100644 (file)
@@ -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;