[Scummvm-devel] cost of palette changes
Johannes Schickel
lordhoto at scummvm.org
Mon Jun 28 23:52:03 CEST 2010
On 06/28/2010 11:00 PM, Lars Skovlund wrote:
> On Mon, Jun 28, 2010 at 10:48:12PM +0200, Johannes Schickel wrote:
> 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.
>
We allow partial palette updates in our OSystem API. I don't know
whether I got you right, but I would think that partial (i.e. when you
specify the color range changed) updates are not slower than full
updates, so in case you don't need the palette anyway, I see no reason
to store it in the client code too. On the other hand I am not aware of
any optimizations for partial updates, maybe the SDL backend has those
since we use SDL for that conversion too, so it's hard to tell whether
it will be faster or not :-).
// Johannes
More information about the Scummvm-devel
mailing list