some wayland fixes curtosey of valgrind
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
This commit is contained in:
parent
4ab846ad51
commit
0c822d5bfa
2 changed files with 7 additions and 5 deletions
|
|
@ -123,6 +123,7 @@ typedef struct wayland_call_table {
|
||||||
void (*cairo_pattern_set_filter)(cairo_pattern_t* pattern,
|
void (*cairo_pattern_set_filter)(cairo_pattern_t* pattern,
|
||||||
cairo_filter_t filter);
|
cairo_filter_t filter);
|
||||||
void (*cairo_set_antialias)(cairo_t*, cairo_antialias_t);
|
void (*cairo_set_antialias)(cairo_t*, cairo_antialias_t);
|
||||||
|
void (*cairo_set_operator)(cairo_t* cr, cairo_operator_t op);
|
||||||
|
|
||||||
} wayland_call_table_t;
|
} wayland_call_table_t;
|
||||||
|
|
||||||
|
|
@ -220,6 +221,7 @@ MwInline int wayland_load_funcs() {
|
||||||
CAIRO_FUNC(cairo_stroke);
|
CAIRO_FUNC(cairo_stroke);
|
||||||
CAIRO_FUNC(cairo_set_source_surface);
|
CAIRO_FUNC(cairo_set_source_surface);
|
||||||
CAIRO_FUNC(cairo_fill);
|
CAIRO_FUNC(cairo_fill);
|
||||||
|
CAIRO_FUNC(cairo_set_operator);
|
||||||
CAIRO_FUNC(cairo_pattern_set_filter);
|
CAIRO_FUNC(cairo_pattern_set_filter);
|
||||||
#undef CAIRO_FUNC
|
#undef CAIRO_FUNC
|
||||||
|
|
||||||
|
|
@ -277,6 +279,7 @@ MwInline int wayland_load_funcs() {
|
||||||
#define cairo_stroke wl_call_tbl.cairo_stroke
|
#define cairo_stroke wl_call_tbl.cairo_stroke
|
||||||
#define cairo_set_source_surface wl_call_tbl.cairo_set_source_surface
|
#define cairo_set_source_surface wl_call_tbl.cairo_set_source_surface
|
||||||
#define cairo_fill wl_call_tbl.cairo_fill
|
#define cairo_fill wl_call_tbl.cairo_fill
|
||||||
|
#define cairo_set_operator wl_call_tbl.cairo_set_operator
|
||||||
#define cairo_pattern_set_filter wl_call_tbl.cairo_pattern_set_filter
|
#define cairo_pattern_set_filter wl_call_tbl.cairo_pattern_set_filter
|
||||||
|
|
||||||
#ifndef WL_PROTOCOLS_DEFINED
|
#ifndef WL_PROTOCOLS_DEFINED
|
||||||
|
|
|
||||||
|
|
@ -2082,7 +2082,9 @@ static void MwLLPolygonImpl(MwLL handle, MwPoint* points, int points_count, MwLL
|
||||||
}
|
}
|
||||||
cairo_close_path(handle->wayland.front_cairo);
|
cairo_close_path(handle->wayland.front_cairo);
|
||||||
|
|
||||||
|
cairo_set_operator(handle->wayland.front_cairo, CAIRO_OPERATOR_SOURCE);
|
||||||
cairo_fill(handle->wayland.front_cairo);
|
cairo_fill(handle->wayland.front_cairo);
|
||||||
|
cairo_set_operator(handle->wayland.front_cairo, CAIRO_OPERATOR_OVER);
|
||||||
|
|
||||||
handle->wayland.events_pending = 1;
|
handle->wayland.events_pending = 1;
|
||||||
}
|
}
|
||||||
|
|
@ -2264,6 +2266,8 @@ static void MwLLDrawPixmapImpl(MwLL handle, MwRect* rect, MwLLPixmap pixmap) {
|
||||||
cairo_set_source_surface(c, pixmap->wayland.cs, 0, 0);
|
cairo_set_source_surface(c, pixmap->wayland.cs, 0, 0);
|
||||||
cairo_pattern_set_filter(cairo_get_source(c), CAIRO_FILTER_NEAREST);
|
cairo_pattern_set_filter(cairo_get_source(c), CAIRO_FILTER_NEAREST);
|
||||||
|
|
||||||
|
cairo_set_operator(handle->wayland.front_cairo, CAIRO_OPERATOR_OVER);
|
||||||
|
|
||||||
cairo_paint(c);
|
cairo_paint(c);
|
||||||
|
|
||||||
cairo_set_source_surface(selected_cairo, cs, rect->x, rect->y);
|
cairo_set_source_surface(selected_cairo, cs, rect->x, rect->y);
|
||||||
|
|
@ -2577,11 +2581,6 @@ static void MwLLEndStateChangeImpl(MwLL handle) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static int MwLLWaylandCallInitImpl(void) {
|
static int MwLLWaylandCallInitImpl(void) {
|
||||||
/*
|
|
||||||
* Order of precedence:
|
|
||||||
* - MILSKO_BACKEND
|
|
||||||
* - manually checking environment variables
|
|
||||||
*/
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
MwBool loadWayland = MwFALSE;
|
MwBool loadWayland = MwFALSE;
|
||||||
if(getenv("MILSKO_BACKEND")) {
|
if(getenv("MILSKO_BACKEND")) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue