Hi; On Sun, 2008-06-29 at 20:04 -0400, Jason Tackaberry wrote: > > 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.
Ok, but if your concerned about this, your hooking into MPlayer in a very inefficient way.. > > 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.) Yes, that is because ClutterX11TexturePixmap updates the texture in a slow but 'portable' manner. It 'manually' copies pixels from the X drawable to the texture for damaged areas. Its really used as a fallback for hardware that doesn't have the texture from pixmap extension. ClutterGLXTexturePixmap uses this extension if available (and thus faster as avoids copies). > > 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. > Yep, see http://bugzilla.openedhand.com/show_bug.cgi?id=997 .If you could test that patch there it would be helpful. == Matthew -- To unsubscribe send a mail to [EMAIL PROTECTED]
