aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--render/gles2/renderer.c2
-rw-r--r--render/gles2/shaders.c9
-rw-r--r--rootston/output.c2
-rw-r--r--types/wlr_output.c7
-rw-r--r--xwayland/xwayland.c6
5 files changed, 12 insertions, 14 deletions
diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c
index c10493c4..8360c5fb 100644
--- a/render/gles2/renderer.c
+++ b/render/gles2/renderer.c
@@ -42,7 +42,7 @@ static void gles2_begin(struct wlr_renderer *wlr_renderer, uint32_t width,
// enable transparency
glEnable(GL_BLEND);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
// XXX: maybe we should save output projection and remove some of the need
// for users to sling matricies themselves
diff --git a/render/gles2/shaders.c b/render/gles2/shaders.c
index b940ee53..01410d87 100644
--- a/render/gles2/shaders.c
+++ b/render/gles2/shaders.c
@@ -63,8 +63,7 @@ const GLchar tex_fragment_src_rgba[] =
"uniform float alpha;\n"
"\n"
"void main() {\n"
-" gl_FragColor.rgb = texture2D(tex, v_texcoord).rgb;\n"
-" gl_FragColor.a = alpha * texture2D(tex, v_texcoord).a;\n"
+" gl_FragColor = texture2D(tex, v_texcoord) * alpha;\n"
"}\n";
const GLchar tex_fragment_src_rgbx[] =
@@ -74,8 +73,7 @@ const GLchar tex_fragment_src_rgbx[] =
"uniform float alpha;\n"
"\n"
"void main() {\n"
-" gl_FragColor.rgb = texture2D(tex, v_texcoord).rgb;\n"
-" gl_FragColor.a = alpha;\n"
+" gl_FragColor = vec4(texture2D(tex, v_texcoord).rgb, 1.0) * alpha;\n"
"}\n";
const GLchar tex_fragment_src_external[] =
@@ -86,6 +84,5 @@ const GLchar tex_fragment_src_external[] =
"uniform float alpha;\n"
"\n"
"void main() {\n"
-" vec4 col = texture2D(texture0, v_texcoord);\n"
-" gl_FragColor = vec4(col.rgb, col.a * alpha);\n"
+" gl_FragColor = texture2D(texture0, v_texcoord) * alpha;\n"
"}\n";
diff --git a/rootston/output.c b/rootston/output.c
index e07cd935..faa808d1 100644
--- a/rootston/output.c
+++ b/rootston/output.c
@@ -458,7 +458,7 @@ static void render_output(struct roots_output *output) {
}
if (server->config->debug_damage_tracking) {
- wlr_renderer_clear(renderer, (float[]){1, 1, 0, 0});
+ wlr_renderer_clear(renderer, (float[]){1, 1, 0, 1});
}
int nrects;
diff --git a/types/wlr_output.c b/types/wlr_output.c
index a0f27e51..a5a6d0eb 100644
--- a/types/wlr_output.c
+++ b/types/wlr_output.c
@@ -368,7 +368,7 @@ static void output_fullscreen_surface_render(struct wlr_output *output,
assert(renderer);
if (!wlr_surface_has_buffer(surface)) {
- wlr_renderer_clear(renderer, (float[]){0, 0, 0, 0});
+ wlr_renderer_clear(renderer, (float[]){0, 0, 0, 1});
return;
}
@@ -385,8 +385,9 @@ static void output_fullscreen_surface_render(struct wlr_output *output,
pixman_box32_t *rects = pixman_region32_rectangles(damage, &nrects);
for (int i = 0; i < nrects; ++i) {
output_scissor(output, &rects[i]);
- wlr_renderer_clear(renderer, (float[]){0, 0, 0, 0});
- wlr_render_texture_with_matrix(surface->renderer, surface->texture, matrix, 1.0f);
+ wlr_renderer_clear(renderer, (float[]){0, 0, 0, 1});
+ wlr_render_texture_with_matrix(surface->renderer, surface->texture,
+ matrix, 1.0f);
}
wlr_renderer_scissor(renderer, NULL);
diff --git a/xwayland/xwayland.c b/xwayland/xwayland.c
index 51035f0e..36d75845 100644
--- a/xwayland/xwayland.c
+++ b/xwayland/xwayland.c
@@ -185,7 +185,7 @@ static void xwayland_finish_display(struct wlr_xwayland *wlr_xwayland) {
}
static bool xwayland_start_display(struct wlr_xwayland *wlr_xwayland,
- struct wl_display *wl_display, struct wlr_compositor *compositor);
+ struct wl_display *wl_display);
static bool xwayland_start_server(struct wlr_xwayland *wlr_xwayland);
static bool xwayland_start_server_lazy(struct wlr_xwayland *wlr_xwayland);
@@ -289,7 +289,7 @@ static int xwayland_socket_connected(int fd, uint32_t mask, void* data){
}
static bool xwayland_start_display(struct wlr_xwayland *wlr_xwayland,
- struct wl_display *wl_display, struct wlr_compositor *compositor) {
+ struct wl_display *wl_display) {
wlr_xwayland->display_destroy.notify = handle_display_destroy;
wl_display_add_destroy_listener(wl_display, &wlr_xwayland->display_destroy);
@@ -414,7 +414,7 @@ struct wlr_xwayland *wlr_xwayland_create(struct wl_display *wl_display,
wl_signal_init(&wlr_xwayland->events.new_surface);
wl_signal_init(&wlr_xwayland->events.ready);
- if (!xwayland_start_display(wlr_xwayland, wl_display, compositor)) {
+ if (!xwayland_start_display(wlr_xwayland, wl_display)) {
goto error_alloc;
}