[PATCH xserver 3/4] glamor: Drop glamor_set_screen_pixmap().

Keith Packard keithp at keithp.com
Thu Jun 1 21:09:40 UTC 2017

Eric Anholt <eric at anholt.net> writes:

> All that was left here was updating the FBO's size.  However, the FBO
> size was always set correctly already through
> glamor_set_pixmap_texture() from whoever had attached a new BO to the
> pixmap.

I remember desperately needing this code at some point; do you have any
idea what has changed which makes that no longer true?

The key path to understand is when the screen is resized; I think
server start up is at least easier to validate. My brain is starting to
hurt from tracing this by hand

		screen->ModifyPixmapHeader (miModifyPixmapHeader)
                        pPixmap->drawable.width = width;
                        pPixmap->drawable.height = height;
                                                        fbo->width = w;
                                                        fbo->height = h;
                                pixmap_priv->fbo->width = screen_pixmap->drawable.width;
                                pixmap_priv->fbo->height = screen_pixmap->drawable.height;

	pScreen->width = pScrnPix->drawable.width = width;
	pScreen->height = pScrnPix->drawable.height = height;

I don't see any conditionals in this call graph that could avoid setting
the screen pixmap size in miModifyPixmapHeader and the fbo size in
glamor_create_fbo_from_tex, whicm means the extra call to
glamor_set_screen_pixmap is not necessary.

Note that xf86RandR12ScreenSetSize also sets the pixmap size again,
which was probably necessary before drivers regularly supported
reallocating the screen pixmap.

(the other three patches were trivial)

For the series:

Reviewed-by: Keith Packard <keithp at keithp.com>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20170601/5544e29f/attachment.sig>

More information about the xorg-devel mailing list