Re: [LAD] Xputty - damn tiny abstraction Layer to create X11 window/widgets with cairo surfaces

From: Hermann Meyer <brummer-@web.de>
Date: Sun Jul 21 2019 - 17:25:44 EEST

Am 20.07.19 um 21:35 schrieb Will J Godfrey:
> On Sat, 20 Jul 2019 17:24:47 +0200
> Hermann Meyer <brummer-@web.de> wrote:
>
>> However, I've setup a online Documentation for libxputty here:
>>
>> https://brummer10.github.io/Xputty/html/xputty_8h.html
>>
>> regards
>>
>> hermann
> And *that* is the best news of the lot!
> So many projects have little or no documentation until they are a very long way
> into development.
>

Yea, I've made the experience that I never ever do any documentation
"afterwards". So this time I would do it from the beginning on. At least
it helps as well myself, to not forgot what it is about.

However, today I make a big step regarding transparent widgets. Those
who've done any development with X11 and cairo knows that it could be
tricky.

Today I find out that the big difference is to NOT USEĀ 
cairo_image_surface_create. Avoid it. When working in a X11 context, the
way to go is cairo_surface_create_similar on the xlib surface as buffer.
This avoid unnecessary coping the image data from the graphic server to
CPU and back. The CPU footprint boils down to below 2% on full screen
action here. Even on resize action, when the surfaces needs to be
resized/destroyed and new created.

Before this change CPU could reach 80% and more and the desktop starts
to stutter.
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
https://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Sun Jul 21 20:15:01 2019

This archive was generated by hypermail 2.1.8 : Sun Jul 21 2019 - 20:15:01 EEST