glamor: Make glamor_set_alu take a DrawablePtr
Preparation for the following commit, no functional change intended.
This commit is contained in:
parent
4805d901c3
commit
8f66c15694
|
@ -378,7 +378,7 @@ glamor_copy_fbo_fbo_draw(DrawablePtr src,
|
||||||
if (gc && !glamor_set_planemask(gc->depth, gc->planemask))
|
if (gc && !glamor_set_planemask(gc->depth, gc->planemask))
|
||||||
goto bail_ctx;
|
goto bail_ctx;
|
||||||
|
|
||||||
if (!glamor_set_alu(screen, gc ? gc->alu : GXcopy))
|
if (!glamor_set_alu(dst, gc ? gc->alu : GXcopy))
|
||||||
goto bail_ctx;
|
goto bail_ctx;
|
||||||
|
|
||||||
if (bitplane && !glamor_priv->can_copyplane)
|
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))
|
if (gc && !glamor_set_planemask(gc->depth, gc->planemask))
|
||||||
goto bail_ctx;
|
goto bail_ctx;
|
||||||
|
|
||||||
if (!glamor_set_alu(screen, gc ? gc->alu : GXcopy))
|
if (!glamor_set_alu(dst, gc ? gc->alu : GXcopy))
|
||||||
goto bail_ctx;
|
goto bail_ctx;
|
||||||
|
|
||||||
/* Find the size of the area to copy
|
/* Find the size of the area to copy
|
||||||
|
|
|
@ -971,7 +971,7 @@ glamor_generate_radial_gradient_picture(ScreenPtr screen,
|
||||||
0))
|
0))
|
||||||
goto GRADIENT_FAIL;
|
goto GRADIENT_FAIL;
|
||||||
|
|
||||||
glamor_set_alu(screen, GXcopy);
|
glamor_set_alu(&pixmap->drawable, GXcopy);
|
||||||
|
|
||||||
/* Set all the stops and colors to shader. */
|
/* Set all the stops and colors to shader. */
|
||||||
if (stops_count > RADIAL_SMALL_STOPS) {
|
if (stops_count > RADIAL_SMALL_STOPS) {
|
||||||
|
@ -1288,7 +1288,7 @@ glamor_generate_linear_gradient_picture(ScreenPtr screen,
|
||||||
1))
|
1))
|
||||||
goto GRADIENT_FAIL;
|
goto GRADIENT_FAIL;
|
||||||
|
|
||||||
glamor_set_alu(screen, GXcopy);
|
glamor_set_alu(&pixmap->drawable, GXcopy);
|
||||||
|
|
||||||
/* Normalize the PTs. */
|
/* Normalize the PTs. */
|
||||||
glamor_set_normalize_pt(xscale, yscale,
|
glamor_set_normalize_pt(xscale, yscale,
|
||||||
|
|
|
@ -120,8 +120,9 @@ glamor_set_planemask(int depth, unsigned long planemask)
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool
|
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);
|
glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
|
||||||
|
|
||||||
if (glamor_priv->is_gles) {
|
if (glamor_priv->is_gles) {
|
||||||
|
|
|
@ -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);
|
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);
|
Bool glamor_set_planemask(int depth, unsigned long planemask);
|
||||||
RegionPtr glamor_bitmap_to_region(PixmapPtr pixmap);
|
RegionPtr glamor_bitmap_to_region(PixmapPtr pixmap);
|
||||||
|
|
||||||
|
|
|
@ -1235,7 +1235,7 @@ glamor_composite_with_shader(CARD8 op,
|
||||||
|
|
||||||
glamor_set_destination_pixmap_priv_nc(glamor_priv, dest_pixmap, dest_pixmap_priv);
|
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_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_source_coords = key.source != SHADER_SOURCE_SOLID;
|
||||||
glamor_priv->has_mask_coords = (key.mask != SHADER_MASK_NONE &&
|
glamor_priv->has_mask_coords = (key.mask != SHADER_MASK_NONE &&
|
||||||
|
|
|
@ -143,7 +143,7 @@ glamor_set_solid(DrawablePtr drawable,
|
||||||
|
|
||||||
pixel = gc->fgPixel;
|
pixel = gc->fgPixel;
|
||||||
|
|
||||||
if (!glamor_set_alu(drawable->pScreen, alu)) {
|
if (!glamor_set_alu(drawable, alu)) {
|
||||||
switch (gc->alu) {
|
switch (gc->alu) {
|
||||||
case GXclear:
|
case GXclear:
|
||||||
pixel = 0;
|
pixel = 0;
|
||||||
|
@ -209,7 +209,7 @@ glamor_set_tiled(DrawablePtr drawable,
|
||||||
GLint offset_uniform,
|
GLint offset_uniform,
|
||||||
GLint size_inv_uniform)
|
GLint size_inv_uniform)
|
||||||
{
|
{
|
||||||
if (!glamor_set_alu(drawable->pScreen, gc->alu))
|
if (!glamor_set_alu(drawable, gc->alu))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (!glamor_set_planemask(gc->depth, gc->planemask))
|
if (!glamor_set_planemask(gc->depth, gc->planemask))
|
||||||
|
|
|
@ -447,7 +447,7 @@ glamor_xv_render(glamor_port_private *port_priv, int id)
|
||||||
off[2] = Loff * yco + Coff * (uco[2] + vco[2]) + bright;
|
off[2] = Loff * yco + Coff * (uco[2] + vco[2]) + bright;
|
||||||
gamma = 1.0;
|
gamma = 1.0;
|
||||||
|
|
||||||
glamor_set_alu(screen, GXcopy);
|
glamor_set_alu(&pixmap->drawable, GXcopy);
|
||||||
|
|
||||||
for (i = 0; i < 3; i++) {
|
for (i = 0; i < 3; i++) {
|
||||||
if (port_priv->src_pix[i]) {
|
if (port_priv->src_pix[i]) {
|
||||||
|
|
|
@ -559,7 +559,7 @@ xwl_glamor_eglstream_post_damage(struct xwl_window *xwl_window,
|
||||||
* won't actually draw to it
|
* won't actually draw to it
|
||||||
*/
|
*/
|
||||||
xwl_glamor_egl_make_current(xwl_screen);
|
xwl_glamor_egl_make_current(xwl_screen);
|
||||||
glamor_set_alu(xwl_screen->screen, GXcopy);
|
glamor_set_alu(&pixmap->drawable, GXcopy);
|
||||||
|
|
||||||
glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue