summaryrefslogtreecommitdiff
path: root/lib/drmtest.c
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2013-10-09 17:42:52 +0100
committerDamien Lespiau <damien.lespiau@intel.com>2013-10-15 19:32:09 +0100
commit252dca1c7b41410e7ff4ab61590a1433a8747e1f (patch)
tree204318c0add6680f30fc7539789fdb443050b0ad /lib/drmtest.c
parent5a97ea91e11a4d2a2cfd46f18e0a69c2f0f279af (diff)
lib: Add kmstest_paint_color()
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Diffstat (limited to 'lib/drmtest.c')
-rw-r--r--lib/drmtest.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/drmtest.c b/lib/drmtest.c
index 2660af72..435a7458 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -1347,6 +1347,14 @@ static int create_bo_for_fb(int fd, int width, int height, int bpp,
return 0;
}
+void kmstest_paint_color(cairo_t *cr, int x, int y, int w, int h,
+ double r, double g, double b)
+{
+ cairo_rectangle(cr, x, y, w, h);
+ cairo_set_source_rgb(cr, r, g, b);
+ cairo_fill(cr);
+}
+
void
kmstest_paint_color_gradient(cairo_t *cr, int x, int y, int w, int h,
int r, int g, int b)