Opened 15 years ago

Closed 15 years ago

Last modified 12 months ago

#8419 closed patch

GUI: Less CPU-intensive credits scroll

Reported by: eriktorbjorn Owned by: fingolfin
Priority: normal Component: GUI
Keywords: Cc:


Currently the credits scroll in the ScummVM "About"
window is agonizingly slow. This is because each time
the text is updated it issues a full redraw, which will
redraw both of the active dialogs. Both of them will
call the blendRect() function to draw the transparent

On my 450 MHz PIII each call to blendRect() takes
something like a tenth of a second, possibly a bit
longer. The overhead from drawing the remaining parts
of the dialogs is trivial by comparision.

This patch is an attempt to speed things up. The first
time the dialog is drawn, it makes a "snapshot" of the
blended background. Then, instead of issuing a full
redraw every time it redraws only the "About" dialog
itself, and this time it uses that snapshot as
background. (The snapshot will be regenerated if the
screen changes.)

It is, perhaps, a bit hackish, but I really don't see
any other way.

Ticket imported from: #1183808. Ticket imported from: patches/524.

Attachments (1)

credits.diff (5.6 KB ) - added by eriktorbjorn 15 years ago.
Patch against an April 15 CVS snapshot

Download all attachments as: .zip

Change History (4)

by eriktorbjorn, 15 years ago

Attachment: credits.diff added

Patch against an April 15 CVS snapshot

comment:1 by fingolfin, 15 years ago

Good thing to do, Erik, thanks.

Could probably be sped even more by caching the text to be drawn into
another bitmap, instead of redrawing the text each time, and then just
compose the text bitmap over the screen bitmap. Alas, that can be left for
a future enhancement.

comment:2 by fingolfin, 15 years ago

Owner: set to fingolfin
Status: newclosed

comment:3 by digitall, 12 months ago

Component: GUI
Note: See TracTickets for help on using tickets.