Re: [AD] Fw: Acquire/Release speed issue

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


[I reversed the order of your tests]

> Full-screen mode:
> screen: 7157 ticks
> video:  4484 ticks
> sub-screen: 6859 ticks
> video2: 4735 ticks
>
> Basically, create a video bitmap covering most of the screen, and
> locking that is way faster than locking the equivalent screen subbitmap.

The video bitmap doesn't cover most of the screen.  It is allocated in the 
non-visible VRAM and doesn't overlap the screen.  The screen sub-bitmap does 
cover most of the screen, and locking a sub-bitmap is equivalent to locking 
its parent anyway.

> Windowed mode:
> $ ./temp.exe
> screen: 1844 ticks
> video:  516 ticks
> sub-screen: 1844 ticks
> video2: 485 ticks
>
> Here, FS is waaay slower than windowed mode(!). However, the same
> pattern can be seen: locking a video bitmap covering most of the screen
> is still faster than a sub-bitmap or the screen itself.

In windowed mode, the screen and all video bitmaps are in non-visible VRAM, 
so locking is faster than in fullscreen mode.  Locking the screen is slower 
than locking a video bitmap because the unlocking operation causes a scan of 
the dirty lines flags to be performed and a (partial) blit from the screen 
(backbuffer) to the primary surface (frontbuffer) if necessary.

-- 
Eric Botcazou




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/