#8419 closed patch
GUI: Less CPU-intensive credits scroll
Reported by: | eriktorbjorn | Owned by: | fingolfin |
---|---|---|---|
Priority: | normal | Component: | GUI |
Version: | Keywords: | ||
Cc: | Game: |
Description
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)
Change History (4)
by , 20 years ago
Attachment: | credits.diff added |
---|
comment:1 by , 20 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 , 20 years ago
Owner: | set to |
---|---|
Status: | new → closed |
comment:3 by , 6 years ago
Component: | → GUI |
---|
Patch against an April 15 CVS snapshot