Re: libXrender - documentation?

2009-01-29 Thread Charles Lindsey
In 49809721.2020...@sun.com Alan Coopersmith alan.coopersm...@sun.com 
writes:

Charles Lindsey wrote:
   RENDER extension not supported by server
 
 Aaaarhh!

Render support on Solaris 10 depends on which X server  drivers you use.

On x86/x64 hardware, use the Xorg server (which is default in Solaris 10
and later on that hardware) and Render should be supported on almost all
hardware/drivers.

On SPARC hardware, the drivers for the Xsun server only support render
on some graphics cards, and some require patches from SunSolve and/or
adding +xrender to the Xsun command line options to enable it.

Well I wish Sun would admit to it somewhere on their Website.

I am using a SPARC Ultra-2 with the Creator Graphics board inside it,
and the Jan. 06 release of Solaris 10. Can you say whether that should
work? Or whether installing a later release would help (sadly, Sun no
longer provide even browsable access to their patches).

As to the +render flag, I have called 'strings' on Xsun, and no string
containing render within it, so I doubt my version supports that. Is the
Xsun source available someplace? (no trace of it on Opensolaris.org).

-- 
Charles H. Lindsey -At Home, doing my own thing
Tel: +44 161 436 6131Web: http://www.cs.man.ac.uk/~chl
Email: c...@clerew.man.ac.uk  Snail: 5 Clerewood Ave, CHEADLE, SK8 3JU, U.K.
PGP: 2C15F1A9  Fingerprint: 73 6D C2 51 93 A0 01 E7 65 E8 64 7E 14 A4 AB A5
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: libXrender - documentation?

2009-01-28 Thread Charles Lindsey
In 871vupgnte@opera.com Eirik Byrkjeflot Anonsen ei...@opera.com writes:

Clemens Eisserer linuxhi...@gmail.com writes:

[...]
 For sure the Opera/QT combination is not doing anything like that - all
 the calls that actually pass glyphs to/from the server use good ol' Xlib.
 Though there is evidence that xft does use Xrender elsewhere in its
 workings.
 I don't know about opera, but im am pretty (99,5%) sure QT uses Render
 - now if Opera uses QT's graphic context for drawing it will
 implicitly use it.

The text handling in Qt 2 was abysmal (in particular the font
switching), so we (opera) implemented our own.  I don't think we've
changed it much since then.  I believe our implementation uses xft and
classic x fonts directly.

Well, since my copy of Opera has QT bundled inside it, I cannot tell which
is actually making the xft calls.

But for sure, every time the cursor blinks in a mail-editing window,
Opera/QT (whichever) calls XftDrawString16 on every word in the whole
window, just on the offchance that words happens to overlap the cursor
area. And if libxft is doing its own antialiassing (see my reply to
Clemens regarding Solaris-10), the resultant cpu usage hogs 100% (and more
if it could) of the processor.

Which is plain silly (and I shall be moaning to you in opera.os.solaris
about it once I have established exactly why Sun have messed it up :-( ).

-- 
Charles H. Lindsey -At Home, doing my own thing
Tel: +44 161 436 6131 Fax: +44 161 436 6133   Web: http://www.cs.man.ac.uk/~chl
Email: c...@clerew.man.ac.uk  Snail: 5 Clerewood Ave, CHEADLE, SK8 3JU, U.K.
PGP: 2C15F1A9  Fingerprint: 73 6D C2 51 93 A0 01 E7 65 E8 64 7E 14 A4 AB A5
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: libXrender - documentation?

2009-01-28 Thread Charles Lindsey
In 194f62550901261140q12d1ed46k9075ebcc83dea...@mail.gmail.com Clemens 
Eisserer linuxhi...@gmail.com writes:

 I can't see any such calls of XRender* functions in the bits of xft that I
 have been looking at (notably in xftcore.c).
Because xft deals with Glyphs, and for performance/bandwith resons
glyphs are handled in a special manner.
That was what I ment with (using the XRender*Glyphs functions).
xftglyphs: XRenderAddGlyphs
xftrender: XRenderCompositeText...

OK, since you wrote that I have been poking around in the xft source, and
the situation seems to be as follows:

Libxft contains two modules (xftcore and xftrender). One does
antialiassing client-side (with much consumption of cpu resources, some of
it unnecessarily) and the other does it client side by calling
XRenderCompositeText16 and friends (and I don't know what goes on behind
those calls, because of lack of documentation thereof :-) ).

To decide which to use, libxft first calls XRenderQueryExtension to see it
the server is willing, and then calls XRenderFindVisualFormat to see
whether the visual is suitable, and then calls XRenderFindFormat to see
whether the particular font is capable. If any of those fails, it falls
back to xftcore.

Now I am using Solaris-10 as my operating system, and libXrender and
libxft come bundled with it, and its documentation proudly proclaims

   This feature [the XRender Extension] is included in the Solaris 10
   3/05 release (and it was actually in Solaris-9 before that).

So I poked around using truss and the Debug facility in libxft, and
discovered that the Opera/QT/Solaris combination always took the xftcore
route. Finally, in desperation, I tried 'xdpyinfo -ext RENDER' and it told
me:

  RENDER extension not supported by server

Aaaarhh!

So it is evidently a SUN problem, and I shall pursue it in that quarter.
In the meantime, I apologise for impugning the ability of libxft to do
antialiassing properly when presented with the proper environment.

However as far as I know xft already has a XRender aware backend
(using the XRender*Glyphs functions), as well as legacy support for
pre-xrender servers.

Yes, I can now see that is the case.

 But who is actually responsible for the development/maintenance of xft?
 For sure they do not seem to hang around on this list, though I gather
 they are within the overall Xorg structure somewhere.
XFT is more or less a sample implementation, and as far as I know its
not used a lot.

Well, apart from QT (possibly older versions), it is certainly used by
Adobe in the freely available 'acroread', and I think that would count as
a lot.

-- 
Charles H. Lindsey -At Home, doing my own thing
Tel: +44 161 436 6131 Fax: +44 161 436 6133   Web: http://www.cs.man.ac.uk/~chl
Email: c...@clerew.man.ac.uk  Snail: 5 Clerewood Ave, CHEADLE, SK8 3JU, U.K.
PGP: 2C15F1A9  Fingerprint: 73 6D C2 51 93 A0 01 E7 65 E8 64 7E 14 A4 AB A5
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: libXrender - documentation?

2009-01-28 Thread Alan Coopersmith
Charles Lindsey wrote:
 Now I am using Solaris-10 as my operating system, and libXrender and
 libxft come bundled with it, and its documentation proudly proclaims
 
This feature [the XRender Extension] is included in the Solaris 10
3/05 release (and it was actually in Solaris-9 before that).
 
 So I poked around using truss and the Debug facility in libxft, and
 discovered that the Opera/QT/Solaris combination always took the xftcore
 route. Finally, in desperation, I tried 'xdpyinfo -ext RENDER' and it told
 me:
 
   RENDER extension not supported by server
 
 Aaaarhh!

Render support on Solaris 10 depends on which X server  drivers you use.

On x86/x64 hardware, use the Xorg server (which is default in Solaris 10
and later on that hardware) and Render should be supported on almost all
hardware/drivers.

On SPARC hardware, the drivers for the Xsun server only support render
on some graphics cards, and some require patches from SunSolve and/or
adding +xrender to the Xsun command line options to enable it.

-- 
-Alan Coopersmith-   alan.coopersm...@sun.com
 Sun Microsystems, Inc. - X Window System Engineering

___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: libXrender - documentation?

2009-01-27 Thread Eirik Byrkjeflot Anonsen
Clemens Eisserer linuxhi...@gmail.com writes:

[...]
 For sure the Opera/QT combination is not doing anything like that - all
 the calls that actually pass glyphs to/from the server use good ol' Xlib.
 Though there is evidence that xft does use Xrender elsewhere in its
 workings.
 I don't know about opera, but im am pretty (99,5%) sure QT uses Render
 - now if Opera uses QT's graphic context for drawing it will
 implicitly use it.

The text handling in Qt 2 was abysmal (in particular the font
switching), so we (opera) implemented our own.  I don't think we've
changed it much since then.  I believe our implementation uses xft and
classic x fonts directly.

eirik
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: libXrender - documentation?

2009-01-27 Thread Michel Dänzer
On Mon, 2009-01-26 at 20:40 +0100, Clemens Eisserer wrote:
 
  But who is actually responsible for the development/maintenance of xft?
  For sure they do not seem to hang around on this list, though I gather
  they are within the overall Xorg structure somewhere.
 XFT is more or less a sample implementation, and as far as I know its
 not used a lot.
 As far as I know QT does its own glyph handling, so does GTK with pango.

According to

apt-cache --installed rdepends libxft2

Qt4 indeed no longer seems to use Xft (whereas Qt3 did), but Pango still
seems to use it.

Also, /usr/share/doc/libxft2/copyright contains:


It was downloaded from
URL: http://xlibs.freedesktop.org/release/libXft-2.1.7.tar.gz .

Upstream maintainer: Keith Packard


-- 
Earthling Michel Dänzer   |http://www.vmware.com
Libre software enthusiast |  Debian, X and DRI developer
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg

Re: libXrender - documentation?

2009-01-27 Thread Thomas Dickey
On Tue, 27 Jan 2009, Daniel Stone wrote:

 It's a poor place to not want to slash my wrists.

You need some help with your grammar (sorry, I don't have time to teach 
you).

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: libXrender - documentation?

2009-01-27 Thread Thomas Dickey
On Tue, 27 Jan 2009, Clemens Eisserer wrote:

 If the interfaces are documented, it's possible to change the library
 implementations without breaking applications.
 Well, thats exactly what the protocol specification is about, it
 contains everything you need to know to implement a library.

not really - compare the X protocol specification with the Xlib
documentation.  The latter makes allowances here/there for the
platform on which it's implemented.

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: libXrender - documentation?

2009-01-27 Thread James Cloos
 Michel == Michel Dänzer mic...@daenzer.net writes:

Michel but Pango still seems to use [Xft].

Pango has support for multiple backends; on X11 platforms that currently
includes xft and cairo.  Applications can choose which backend they want.

I beleive the cairo backend is recommended for all new apps.

-JimC
-- 
James Cloos cl...@jhcloos.com OpenPGP: 1024D/ED7DAEA6
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: libXrender - documentation?

2009-01-26 Thread Clemens Eisserer
 I can't see any such calls of XRender* functions in the bits of xft that I
 have been looking at (notably in xftcore.c).
Because xft deals with Glyphs, and for performance/bandwith resons
glyphs are handled in a special manner.
That was what I ment with (using the XRender*Glyphs functions).
xftglyphs: XRenderAddGlyphs
xftrender: XRenderCompositeText...

I mentioned Trapezoids only because everthing else AddGlyph and
XPutImage is not really server-side antialiasing, but client-side with
server-side blending. (however for glyphs that doesn't matter, they
are rasterized once client-side, are uploaded and used again and again
by number).

However as far as I know xft already has a XRender aware backend
(using the XRender*Glyphs functions), as well as legacy support for
pre-xrender servers.
I have never used xft by myself, but without RENDER knowledge someone
can see that:
- Probably all functions with *Glyph* inside, are text related
- That there are glyph-sets, to which glyphs can be uploaded and rendered from
- searching the functions in XFT's source.

I know that its not easy, but someone can't expect a step-by-step
tutorial for such low-level stuff.

 For sure the Opera/QT combination is not doing anything like that - all
 the calls that actually pass glyphs to/from the server use good ol' Xlib.
 Though there is evidence that xft does use Xrender elsewhere in its
 workings.
I don't know about opera, but im am pretty (99,5%) sure QT uses Render
- now if Opera uses QT's graphic context for drawing it will
implicitly use it.

 But who is actually responsible for the development/maintenance of xft?
 For sure they do not seem to hang around on this list, though I gather
 they are within the overall Xorg structure somewhere.
XFT is more or less a sample implementation, and as far as I know its
not used a lot.
As far as I know QT does its own glyph handling, so does GTK with pango.

- Clemens
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: libXrender - documentation?

2009-01-26 Thread Clemens Eisserer
 I know that its not easy, but someone can't expect a step-by-step
 tutorial for such low-level stuff.

 hmm - the obvious conclusion is that xft is just a minor/useless library.
 Perhaps it should be removed, then.
The whole discussion is about RENDER's documentation, not xft.

 Or was your comment directed to potential users (probably not, since
 it isn't polite to treat users disrespectfully).
I've written quite a bunch of answers to charles' questions (even some
off-list), so I started to become a bit impatient.
At least I tried to help, instead of coming arround, missing the point
and telling others howto behave :P ;)

- Clemens
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: libXrender - documentation?

2009-01-26 Thread Clemens Eisserer
 The whole discussion is about RENDER's documentation, not xft.

 very well, then apply my comments to RENDER (they're both presented
 as libraries that no one should try to use without some other library
 as a sanitizing layer).

Well at least the sanitizing layers still depend on libXrender...

- Clemens
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: libXrender - documentation?

2009-01-26 Thread Beso
2009/1/26 Thomas Dickey dic...@his.com:
 On Mon, 26 Jan 2009, Clemens Eisserer wrote:

 I know that its not easy, but someone can't expect a step-by-step
 tutorial for such low-level stuff.

 hmm - the obvious conclusion is that xft is just a minor/useless library.
 Perhaps it should be removed, then.
 The whole discussion is about RENDER's documentation, not xft.

 very well, then apply my comments to RENDER (they're both presented
 as libraries that no one should try to use without some other library
 as a sanitizing layer).

maybe i'm missing the point: what's the point in a library that needs
another library
in order to be used? i don't really think it's a good idea. maybe it
would be better
to better implement the library in order for it to be used without
another sanitizing
library, that would cost more resources.

-- 
dott. ing. beso
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: libXrender - documentation?

2009-01-26 Thread Thomas Dickey
On Mon, 26 Jan 2009, Beso wrote:

 2009/1/26 Thomas Dickey dic...@his.com:
 On Mon, 26 Jan 2009, Clemens Eisserer wrote:

 I know that its not easy, but someone can't expect a step-by-step
 tutorial for such low-level stuff.

 hmm - the obvious conclusion is that xft is just a minor/useless library.
 Perhaps it should be removed, then.
 The whole discussion is about RENDER's documentation, not xft.

 very well, then apply my comments to RENDER (they're both presented
 as libraries that no one should try to use without some other library
 as a sanitizing layer).

 maybe i'm missing the point: what's the point in a library that needs 
 another library in order to be used? i don't really think it's a good 
 idea. maybe it would be better to better implement the library in order 
 for it to be used without another sanitizing library, that would cost 
 more resources.

A library may provide a useful abstraction (algorithms that can be 
implemented on top of other system-specific, etc., libraries).

If the interfaces are documented, it's possible to change the library
implementations without breaking applications.

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: libXrender - documentation?

2009-01-26 Thread Clemens Eisserer
 maybe i'm missing the point: what's the point in a library that needs
 another library
 in order to be used? i don't really think it's a good idea. maybe it
 would be better
 to better implement the library in order for it to be used without
 another sanitizing
 library,

Its the same as with xcb or Xlib.
Both aren't used a lot directly by application programmers, instead
programmers use QT4/Gtk or Java2D as sanitizing libraries
Xlib's task is to allow access to the X11 protocol from C, exatly what
libXrender does for the RENDER extension.

 that would cost more resources.
libXRender only contains X11 protocol generation and a few definitions.
If Cairo/QT4/... would have to generate the protocol themself, it
would probably lead to a lot of duplicate code and bloat.

 If the interfaces are documented, it's possible to change the library
 implementations without breaking applications.
Well, thats exactly what the protocol specification is about, it
contains everything you need to know to implement a library.

However, the protocol specification is not a programmer manual howto
use RENDER or libXRender, and at least what I've heard, this is what
most people are asking for (including myself about a year ago ;) ).

- Clemens
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: libXrender - documentation?

2009-01-26 Thread Daniel Stone
On Mon, Jan 26, 2009 at 09:25:09PM -0500, Thomas Dickey wrote:
 There are, in fact, well-known apps using Xlib directly.

There are well-known people who follow the Atkins diet, but I wouldn't
really recommend it.

 (xorg mailing list is a poor place to learn about X)

It's a poor place to not want to slash my wrists.

Cheers,
Daniel


signature.asc
Description: Digital signature
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg

Re: libXrender - documentation?

2009-01-22 Thread Charles Lindsey
In fe028d69955796489b510ce43dbbe803112cd...@rrsmsx503.amr.corp.intel.com 
Wichmann, Mats D mats.d.wichm...@intel.com writes:

It seems that a library providing an API ought to have docs,
even if the main consumer is another library.  That way the
producer/consumer relationship is codified and there's
actually something to refer to if one or the other changes.

Absolutely so. The main reason people might need it, even if they were not
toolkit developers, is so that they could trace apparent bugs or other
misfeatures that they had encountered in some application.

In my case, I was looking for some unacceptable CPU usage in Opera, which
is built on top of QT. I traced that down to a bug/misfeature in libxft,
which I reported on this list on Nov 26th under the Subject LibXft :
xftglyphcore woes, hoping to catch the eye of the libxft developers
(sadly, noone responded). Essentially, libxft was making a meal out of its
anti-aliasing, and I proposed a patch which at least cured the symptoms.

In a subsequent thread 2D antialiasing? on this list, I was bemoaning
the fact that antialiasing by that method would waste huge amounts of
bandwidth if the client were separated from the Xserver by some slow
network, and someone claimed to me, offlist, that Xrender provided
server-side antialiasing.

So I wanted to verify that claim. Now that this list has pointed me to
Keith Packard's The X Rendering Extension, I have done a quick scan of
that, but can still find no mention of antialiasing. Moreover, that
describes the protocol, rather than the libXrender interface that is more
conveniently used to access it,

Xrender is in LSB, but is not documented.  As a result,
LSB would be willing to help if there's interest in working
up docs.  Or, alternatively, listen to an argument that a
library like Xrender actually shouldn't be in the spec, that
only cairo should be exposed.

Yes, that would be welcome, but this is not really a Linux problem. It is
an Xorg problem.

-- 
Charles H. Lindsey -At Home, doing my own thing
Tel: +44 161 436 6131 Fax: +44 161 436 6133   Web: http://www.cs.man.ac.uk/~chl
Email: c...@clerew.man.ac.uk  Snail: 5 Clerewood Ave, CHEADLE, SK8 3JU, U.K.
PGP: 2C15F1A9  Fingerprint: 73 6D C2 51 93 A0 01 E7 65 E8 64 7E 14 A4 AB A5
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: libXrender - documentation?

2009-01-22 Thread Clemens Eisserer
Most likely I will write some XRender documentation as part of my
bachelor thesis.

 In a subsequent thread 2D antialiasing? on this list, I was bemoaning
 the fact that antialiasing by that method would waste huge amounts of
 bandwidth if the client were separated from the Xserver by some slow
 network, and someone claimed to me, offlist, that Xrender provided
 server-side antialiasing.

 So I wanted to verify that claim. Now that this list has pointed me to
 Keith Packard's The X Rendering Extension, I have done a quick scan of
 that, but can still find no mention of antialiasing. Moreover, that
 describes the protocol, rather than the libXrender interface that is more
 conveniently used to access it,
Yes, that was me ;)

Antialiasing is usually done by transferring the geometry you intend
to render into a mask-pixmap, this can be done with:
- XPutImage (client-side geometry rasterization)
- XRenderAddTraps

and doing a composite operation with that mask.

or by using an implicit mask with:
- XRenderCompositeTrapezoids

However as far as I know xft already has a XRender aware backend
(using the XRender*Glyphs functions), as well as legacy support for
pre-xrender servers.

- Clemens
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: libXrender - documentation?

2009-01-21 Thread Clemens Eisserer
Hi Charles,

Unfourtunatly XRender is not very well documented, probably the best
thing available is the specification.
The reason is that most programmers use higher-level APIs like Cairo
or QT4 to access XRender, so if you don't have a good reason why you
directly want to mess with it I recommend using cairo too.

- Clemens
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: libXrender - documentation?

2009-01-21 Thread Thomas Dickey
On Wed, 21 Jan 2009, Clemens Eisserer wrote:

 Hi Charles,

 Unfourtunatly XRender is not very well documented, probably the best
 thing available is the specification.

hmm - googling on that (xrender specification) doesn't find much - just
these random notes here for instance:

http://keithp.com/~keithp/render/protocol.html

which only covers a very small fraction of the library.

(Since it's apparently undocumented - I looked some time ago and concluded 
that the documentation covered at most 10% of the code, the best thing 
available would appear to be the source code - with the caveat that 
change-history also appears to be lacking).

 The reason is that most programmers use higher-level APIs like Cairo
 or QT4 to access XRender, so if you don't have a good reason why you
 directly want to mess with it I recommend using cairo too.

In that case, a pointer to the detailed api of cairo would help Charles.

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: libXrender - documentation?

2009-01-21 Thread Alex Deucher
On Wed, Jan 21, 2009 at 8:14 AM, Thomas Dickey dic...@his.com wrote:
 On Wed, 21 Jan 2009, Clemens Eisserer wrote:

 Hi Charles,

 Unfourtunatly XRender is not very well documented, probably the best
 thing available is the specification.

 hmm - googling on that (xrender specification) doesn't find much - just
 these random notes here for instance:

http://keithp.com/~keithp/render/protocol.html

 which only covers a very small fraction of the library.

 (Since it's apparently undocumented - I looked some time ago and concluded
 that the documentation covered at most 10% of the code, the best thing
 available would appear to be the source code - with the caveat that
 change-history also appears to be lacking).

 The reason is that most programmers use higher-level APIs like Cairo
 or QT4 to access XRender, so if you don't have a good reason why you
 directly want to mess with it I recommend using cairo too.

 In that case, a pointer to the detailed api of cairo would help Charles.

http://cgit.freedesktop.org/xorg/proto/renderproto/tree/renderproto.txt

Alex
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg