glamor: Make glamor_set_alu take a DrawablePtr

Preparation for the following commit, no functional change intended.
This commit is contained in:
Michel Dänzer 2024-01-04 16:03:01 +01:00 committed by Michel Dänzer
parent 4805d901c3
commit 8f66c15694
8 changed files with 12 additions and 11 deletions

View File

@ -378,7 +378,7 @@ glamor_copy_fbo_fbo_draw(DrawablePtr src,
if (gc && !glamor_set_planemask(gc->depth, gc->planemask))
goto bail_ctx;
if (!glamor_set_alu(screen, gc ? gc->alu : GXcopy))
if (!glamor_set_alu(dst, gc ? gc->alu : GXcopy))
goto bail_ctx;
if (bitplane && !glamor_priv->can_copyplane)
@ -529,7 +529,7 @@ glamor_copy_fbo_fbo_temp(DrawablePtr src,
if (gc && !glamor_set_planemask(gc->depth, gc->planemask))
goto bail_ctx;
if (!glamor_set_alu(screen, gc ? gc->alu : GXcopy))
if (!glamor_set_alu(dst, gc ? gc->alu : GXcopy))
goto bail_ctx;
/* Find the size of the area to copy

View File

@ -971,7 +971,7 @@ glamor_generate_radial_gradient_picture(ScreenPtr screen,
0))
goto GRADIENT_FAIL;
glamor_set_alu(screen, GXcopy);
glamor_set_alu(&pixmap->drawable, GXcopy);
/* Set all the stops and colors to shader. */
if (stops_count > RADIAL_SMALL_STOPS) {
@ -1288,7 +1288,7 @@ glamor_generate_linear_gradient_picture(ScreenPtr screen,
1))
goto GRADIENT_FAIL;
glamor_set_alu(screen, GXcopy);
glamor_set_alu(&pixmap->drawable, GXcopy);
/* Normalize the PTs. */
glamor_set_normalize_pt(xscale, yscale,

View File

@ -120,8 +120,9 @@ glamor_set_planemask(int depth, unsigned long planemask)
}
Bool
glamor_set_alu(ScreenPtr screen, unsigned char alu)
glamor_set_alu(DrawablePtr drawable, unsigned char alu)
{
ScreenPtr screen = drawable->pScreen;
glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
if (glamor_priv->is_gles) {

View File

@ -668,7 +668,7 @@ void glamor_set_destination_pixmap_fbo(glamor_screen_private *glamor_priv, glamo
* */
void glamor_set_destination_pixmap_priv_nc(glamor_screen_private *glamor_priv, PixmapPtr pixmap, glamor_pixmap_private *pixmap_priv);
Bool glamor_set_alu(ScreenPtr screen, unsigned char alu);
Bool glamor_set_alu(DrawablePtr drawable, unsigned char alu);
Bool glamor_set_planemask(int depth, unsigned long planemask);
RegionPtr glamor_bitmap_to_region(PixmapPtr pixmap);

View File

@ -1235,7 +1235,7 @@ glamor_composite_with_shader(CARD8 op,
glamor_set_destination_pixmap_priv_nc(glamor_priv, dest_pixmap, dest_pixmap_priv);
glamor_composite_set_shader_blend(glamor_priv, dest_pixmap_priv, &key, shader, &op_info);
glamor_set_alu(screen, GXcopy);
glamor_set_alu(dest->pDrawable, GXcopy);
glamor_priv->has_source_coords = key.source != SHADER_SOURCE_SOLID;
glamor_priv->has_mask_coords = (key.mask != SHADER_MASK_NONE &&

View File

@ -143,7 +143,7 @@ glamor_set_solid(DrawablePtr drawable,
pixel = gc->fgPixel;
if (!glamor_set_alu(drawable->pScreen, alu)) {
if (!glamor_set_alu(drawable, alu)) {
switch (gc->alu) {
case GXclear:
pixel = 0;
@ -209,7 +209,7 @@ glamor_set_tiled(DrawablePtr drawable,
GLint offset_uniform,
GLint size_inv_uniform)
{
if (!glamor_set_alu(drawable->pScreen, gc->alu))
if (!glamor_set_alu(drawable, gc->alu))
return FALSE;
if (!glamor_set_planemask(gc->depth, gc->planemask))

View File

@ -447,7 +447,7 @@ glamor_xv_render(glamor_port_private *port_priv, int id)
off[2] = Loff * yco + Coff * (uco[2] + vco[2]) + bright;
gamma = 1.0;
glamor_set_alu(screen, GXcopy);
glamor_set_alu(&pixmap->drawable, GXcopy);
for (i = 0; i < 3; i++) {
if (port_priv->src_pix[i]) {

View File

@ -559,7 +559,7 @@ xwl_glamor_eglstream_post_damage(struct xwl_window *xwl_window,
* won't actually draw to it
*/
xwl_glamor_egl_make_current(xwl_screen);
glamor_set_alu(xwl_screen->screen, GXcopy);
glamor_set_alu(&pixmap->drawable, GXcopy);
glBindFramebuffer(GL_FRAMEBUFFER, 0);