Re: New drawing/scrolling model
- From: Alexander Larsson <alexl redhat com>
- To: Søren Sandmann <sandmann cs au dk>
- Cc: GTK Devel List <gtk-devel-list gnome org>
- Subject: Re: New drawing/scrolling model
- Date: Fri, 03 May 2013 09:01:02 +0200
On fre, 2013-05-03 at 00:03 +0200, Søren Sandmann wrote:
Alexander Larsson <alexl redhat com> writes:
* Try a tile-based approach for GtkPixelCache to avoid having
to do a same-surface copy (usign an intermediate surface) when
scrolling the cache.
An alternative to tiles is to keep track of an origin within the
surface:
+--------+--------------------------+
| Bot R | Bottom left |
| | |
+--------O--------------------------+
| Top R | Top left |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
+--------+--------------------------+
with the contents of the surface addressed modulo width and
height. Scrolling is then just a matter of moving that origin, but
copying from the surface may require four separate blits. Similarly,
rendering to some rectangle may have to be split into four separate
operations.
Yeah, a 2d circular buffer. I've thought about this and its clearly
doable, although somewhat of a nightmare to handle all the cases.
t still has some overhead that it shares with the tiled version though,
we need to traverse the scenegraph multiple times, which isn't super
cheap currently. It would be nice it cairo could let us stitch together
a surface made out of multiple subsurfaces, then we could avoid such
overhead.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]