Reset cairo surface when drawing console
authorDavid Herrmann <dh.herrmann@googlemail.com>
Sat, 26 Nov 2011 15:48:59 +0000 (16:48 +0100)
committerDavid Herrmann <dh.herrmann@googlemail.com>
Sat, 26 Nov 2011 15:48:59 +0000 (16:48 +0100)
We must use SOURCE operator to reset the surface. Otherwise, we end up doing
nothing here because our alpha value is 0.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
src/console.c

index 76b134f..6bc6f79 100644 (file)
@@ -206,8 +206,7 @@ void kmscon_console_draw(struct kmscon_console *con)
 
        cairo_save(con->cr);
 
-       cairo_set_operator(con->cr, CAIRO_OPERATOR_OVER);
-       cairo_scale(con->cr, con->res_x, con->res_y);
+       cairo_set_operator(con->cr, CAIRO_OPERATOR_SOURCE);
        cairo_set_source_rgba(con->cr, 0.0, 0.0, 0.0, 0.0);
        cairo_paint(con->cr);