DirectFB - Home of the pragmatist Roadmap

[directfb-dev] Re: possible directfb bug
Mailing List archive

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

[directfb-dev] Re: possible directfb bug

Quoting Alex SONG (
> On Wed, 12 Jun 2002, Denis Oliver Kropp wrote:
> <snip>
> > df_dok uses the same surface for blit and stretch-blit (melted.png).
> yes it does, i looked at blit_colorkey for some stupid reason. well it
> doesn't seem to happen with df_dok then. is this because the source
> surface is not being written to (since melted.png is only rendered at the
> start) ?


> > The alternating would happen if software writes to a surface and blits from it
> > using hardware afterwards. This is a common case for displaying videos.
> yes i noticed the problems while displaying videos. i will clarify my
> problem again. when i display a video with software stretchblit it is fine
> and let's call this speed speed1. i then change the software stretchblit
> to a hardware blit and this i also fine. now when i change back to a
> software stretchblit it gets played back at speed2. now the problem is
> that speed2 is much slower than speed1. so what i am feeling is that
> something is not being reset properly as a stretchblit is capable of
> speed1 but for some reason it can't after swithing from a hardware blit.
> in both cases the software is writing to a surface and then blitting using
> hardware and software. there is no reason why stretchblit should have
> different performance from the first time and the second time. this is why
> i think there is a bug somewhere.

It's not a bug, it's just a stupid heuristic. Imagine the following sequence:

Action                              | S | V |
Surface created                     | + | . |
Software writes to surface          | + | . |  writes to system memory
Software stretch blits from surface | + | . |  reads from system memory
Hardware blits from surface         | + | + |  copied to video memory
Software writes to surface          | - | + |  writes to video memory
Software stretch blits from surface | - | + |  reads from video memory

S = system memory instance
V = video memory instance
. = invalid (not allocated)
+ = stored (allocated, contains recent data)
- = restore (allocated, but data is outdated)

Best regards,
  Denis Oliver Kropp

| DirectFB - Hardware accelerated graphics |
|                 |

                            Convergence GmbH

Info:  To unsubscribe send a mail to with 
"unsubscribe directfb-dev" as subject.

Home | Main Index | Thread Index / Development / Old Archives