pixmap resizing was Re: How to disable/limit pixmap cache in X

Gavin McCullagh gmccullagh at gmail.com
Fri Sep 21 05:08:59 PDT 2007


Hi,

On Wed, 19 Sep 2007, Glynn Clements wrote:

> Yes, the server can refuse to create the pixmap, sacrificing the
> client to protect the server and other clients.
> 
> It just needs to be borne in mind that this will probably be fatal to
> the client.
> 
> I had assumed that Jim was under the impression that the server was
> merely "caching" this data as an optimisation, and that reducing the
> amount of memory used would merely degrade performance. That isn't the
> case.

I have one further question on this topic if nobody minds.  It will
hopefully help me understand a different aspect of firefox's behaviour with
pixmaps.

It appears that where firefox gets an image for display, embedded in HTML,
at say 400x300 pixels, it will send the full size image to the X server
cache, rather than rescaling the image first -- even if the image is
1600x1200 or even larger.  Firefox then apparently uses X to do the
resizing for it.

My question is, is there a compelling reason for this -- are video cards
quicker at the resize?  Is there any "best practice" in this situation?  It
seems to me that our problem would go away if firefox simply resized the
image before sending it as a pixmap.  It's always seemed to me that the
resize looked poor anyway (perhaps it's done by simple resampling).

In the opinion of X developers would it make sense for firefox to do this
resample itself (perhaps in situations where the image was very large)?

Gavin

[1] Anyone who has any knowledge of HTML knows that this is a terrible way to
write webpages, but browsers do have to deal with it.  Our example webpage
is this one (authored in FrontPage apparently):

http://www.carteretcountyschools.org/bms/teacherwebs/sdavenport/artgallery6.htm




More information about the xorg mailing list