Re: New drawing/scrolling model



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.


Søren


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