[Scummvm-devel] cost of palette changes

Lars Skovlund lskovlun at image.dk
Mon Jun 28 23:00:51 CEST 2010


On Mon, Jun 28, 2010 at 10:48:12PM +0200, Johannes Schickel wrote:

> All I know is that it is indeed expensive and thus should be only
> done when needed. I think our MADE engine once was affected by too
> many palette operations and thus bad performance. I guess testing
> the engine on some small devices would be best to determine whether
> it works fine or not, at least I'm not sure whether we have any real
> rule on how often one can call it per second without worrying too
> much....

I am intrigued by this, because we are going to need partial palette
updates for SCI32 video playing, i.e., palette operations on a subset
of the system palette. My first instinct was to add a method to
Graphics::VideoPlayer to support this (as an alternative to
::setSystemPalette()), but is it cheaper to keep a complete 256-color
palette structure in the engine and ship that to the OSystem, or will
some/all OSystem implementations benefit from only receiving the
partial updates? The excluded colors are for stuff like UI elements
etc. 

> // Johannes

Lars




More information about the Scummvm-devel mailing list