Opened 19 years ago

Closed 19 years ago

Last modified 6 years ago

#8419 closed patch

GUI: Less CPU-intensive credits scroll

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


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 background.

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 19 years ago.
Patch against an April 15 CVS snapshot

Download all attachments as: .zip

Change History (4)

by eriktorbjorn, 19 years ago

Attachment: credits.diff added

Patch against an April 15 CVS snapshot

comment:1 by fingolfin, 19 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, 19 years ago

Owner: set to fingolfin
Status: newclosed

comment:3 by digitall, 6 years ago

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