Re: What is more fast GdkDrawable or GdkPixbuf
- From: Carlos Eduardo Rodrigues Diogenes <cerdiogenes yahoo com br>
- To: Olexiy Avramchenko <olexiy ctech cn ua>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: What is more fast GdkDrawable or GdkPixbuf
- Date: Thu, 01 Dec 2005 15:11:27 -0200
Olexiy Avramchenko wrote:
Carlos Eduardo Rodrigues Diogenes wrote:
What of these two components are fastest to copy from one to another
(GdkDrawable to GdkDrawable or GkdPixbuf to GdkPixbuf)?
The fastest case depends on your client's hardware (pixbufs) and X
server's hardware (drawables).
If they are in the same machine, there is any difference?
GdkPixbuf is stored in client (local RAM) memory, so pixbuf -> pixbuf
copy is like memcpy(). You can easily measure it and result will be
near constant on any specific system.
GdkDrawable is more tricky, it is stored in server (remote, even on
another box, RAM or VRAM) memory, some operations on it can be
performed via hardware and operations are usually asynchronous unless
you explicitly synchronize them.
You can get sane results only for the specific client/server
configuration. You can not assume that these results will be true for
any other case.
What do you want to do ? If you spend much time calculating image and
rarely draw on screen - use pixbufs.
I'm starting to work with gnome-mag, a magnifier service for GNOME and
before the magnified contents (that is in a pixbuf) be showed in the
screen it's first copied to a drawable and then copied again to the
drawable that will show it in the user screen.
I think, I'm not sure yet, that the intermediate drawable used is like a
cache, but if copy from GdkPixbuf to GdkPixbuf is fastest, it makes
sense use it like a cache.
Olexiy
Carlos
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]