Re: Can GTK+ make use of XSHM extension from MIT



Hello;

ext Bin Chen wrote:
Hello,

I am running GTK+ in a singal machine, the machine is slow so I want
make GTK+ use XSHM extension to accelerate the drawing speed.

By taking a look at both GTK+ source code and the MIT-SHM paper, my
conclusion is :

1) The XSHM can only support XImage and Pixmap.
  
It is supporting the creation of XImage structure in shared memory and
'transferring' it to X-server to be used as a pixmap.

2) The GTK+ engine update the image using XCopyArea, so its impossible
to accelerate the entire process.

I am thinking a case, we do all the rendering process in GTK+
side(such as use pango to render text, use other library to render
image), the transfer the rendered image to XServer using XSHM, then
draw this Image to the window.

  

SHM extension is made to 'accelerate' data transfer between X client and
server when they reside on same machine. When data is on server end, it
can be used and manipulated via Xlib commands such as XCopyArea and the
operation is done on server side. Operation performance depends on the
X-server driver implementation.

Will this work?
  

Your usecase is valid, but are you facing some performance issues with
current implementation? Have you profiled where the time is actually
spent? You might want to create these buffers (images) beforehand and
then transfer them to server. See also XRender API for rendering and
manipulating buffers on server-side.


Thanks.
Bin
_______________________________________________
maemo-developers mailing list
maemo-developers maemo org
https://lists.maemo.org/mailman/listinfo/maemo-developers

  


// Tapani Pälli

-- 
Software Engineer
Open Source Software Operations 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]