aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glamor/glamor_fill.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/glamor/glamor_fill.c')
-rw-r--r--xorg-server/glamor/glamor_fill.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/xorg-server/glamor/glamor_fill.c b/xorg-server/glamor/glamor_fill.c
index 2fa726e72..073904d2a 100644
--- a/xorg-server/glamor/glamor_fill.c
+++ b/xorg-server/glamor/glamor_fill.c
@@ -156,7 +156,7 @@ glamor_init_solid_shader(ScreenPtr screen)
GLint fs_prog, vs_prog;
glamor_priv = glamor_get_screen_private(screen);
- glamor_get_context(glamor_priv);
+ glamor_make_current(glamor_priv);
glamor_priv->solid_prog = glCreateProgram();
vs_prog = glamor_compile_glsl_prog(GL_VERTEX_SHADER, solid_vs);
fs_prog = glamor_compile_glsl_prog(GL_FRAGMENT_SHADER, solid_fs);
@@ -169,7 +169,6 @@ glamor_init_solid_shader(ScreenPtr screen)
glamor_priv->solid_color_uniform_location =
glGetUniformLocation(glamor_priv->solid_prog, "color");
- glamor_put_context(glamor_priv);
}
void
@@ -178,9 +177,8 @@ glamor_fini_solid_shader(ScreenPtr screen)
glamor_screen_private *glamor_priv;
glamor_priv = glamor_get_screen_private(screen);
- glamor_get_context(glamor_priv);
+ glamor_make_current(glamor_priv);
glDeleteProgram(glamor_priv->solid_prog);
- glamor_put_context(glamor_priv);
}
static void
@@ -196,7 +194,7 @@ _glamor_solid_boxes(PixmapPtr pixmap, BoxPtr box, int nbox, float *color)
glamor_set_destination_pixmap_priv_nc(pixmap_priv);
- glamor_get_context(glamor_priv);
+ glamor_make_current(glamor_priv);
glUseProgram(glamor_priv->solid_prog);
glUniform4fv(glamor_priv->solid_color_uniform_location, 1, color);
@@ -255,7 +253,6 @@ _glamor_solid_boxes(PixmapPtr pixmap, BoxPtr box, int nbox, float *color)
free(vertices);
glDisableVertexAttribArray(GLAMOR_VERTEX_POS);
- glamor_put_context(glamor_priv);
glamor_priv->state = RENDER_STATE;
glamor_priv->render_idle_cnt = 0;
}
@@ -338,13 +335,12 @@ glamor_solid(PixmapPtr pixmap, int x, int y, int width, int height,
return FALSE;
}
- glamor_get_context(glamor_priv);
+ glamor_make_current(glamor_priv);
if (!glamor_set_alu(screen, alu)) {
if (alu == GXclear)
fg_pixel = 0;
else {
glamor_fallback("unsupported alu %x\n", alu);
- glamor_put_context(glamor_priv);
return FALSE;
}
}
@@ -355,7 +351,6 @@ glamor_solid(PixmapPtr pixmap, int x, int y, int width, int height,
glamor_solid_boxes(pixmap, &box, 1, fg_pixel);
glamor_set_alu(screen, GXcopy);
- glamor_put_context(glamor_priv);
return TRUE;
}