Hi,

I've been playing with Clutter(X11|GLX)TexturePixmap, and I have a few
comments and questions.

Before I continue, I wanted to say: very cool work, guys. :)

I've an NVidia 7100GS 256MB, and am using svn clutter from today.  My
display is at 640x480 (at least until I splurge for a HDTV).  I am
testing redirecting an MPlayer window, and am particularly concerned
about CPU usage and video smoothness.

When I create an ClutterX11TexturePixmap, I've observed that when the
area of the video window is less than 256k pixels (let's say 640x408),
the CPU usage of the clutter process is around 5%, but when the pixel
area is larger (let's say 640x410) the cpu usage of the process jumps
considerably: from 5% to 18-20%. 

This smells like something related to cache locality, but I was hoping
someone could elucidate.

I have not tried sizes larger than 640x480 as
clutter_x11_texture_pixmap_new_with_pixmap() fails on larger windows,
presumably because this exceeds my display size.

In testing, I found that video redirected to a ClutterX11TexturePixmap
was choppy and not terribly pleasant, and with the CPU increase noted
above, it's not very usable for HD video (notably for h264 1080p, where
every spare cycle is precious).

Fortunately, the situation is quite a bit better with
ClutterGLXTexturePixmap.  Actually, it's stunningly better.

ClutterGLXTexturePixmap has none of the CPU problems or size limitations
mentioned above.  The clutter process floats around 1% when redirecting
a 1920x1080 window.  With a capture from CNN deinterlaced at 60fps, the
scrolling text is smooth.  (Well, it's not worse than unredirected Xv,
anyway.)

The problem however with ClutterGLXTexturePixmap is that
clutter_x11_texture_pixmap_set_automatic doesn't work.  Looking at the
source, I see this comment:

              /* NOTE: Appears this will not work for a named pixmap ? */
              priv->damage = XDamageCreate (dpy,
                                            priv->pixmap,
                                            XDamageReportNonEmpty);

I wanted to point out while this does appear to be true, you can create
a damage region for the window, rather than the pixmap.  I've
implemented this naively, calling
clutter_x11_texture_pixmap_update_area() on the whole pixmap for each
damage notification on the window.  It works quite nicely.

Given the limitation noted in the comment, and how well handling damage
notifications works in the window id, and how much better
ClutterGLXTexturePixmap is compared to ClutterX11TexturePixmap (at least
on my nvidia card), perhaps the clutter API could be updated to more
conveniently allow texturizing a named pixmap while checking the
redirected window itself for damage updates.

Cheers,
Jason.

-- 
To unsubscribe send a mail to [EMAIL PROTECTED]

Reply via email to