[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-kimageshop
Subject: Re: core/color_strategy
From: Patrick Julien <freak () codepimps ! org>
Date: 2003-10-28 22:50:35
[Download RAW message or body]
>
> > Yes, it would, for only 8 bit channels, it's only 65000 values, but I'm
> > afraid I don't really understand what you are saying to me here tho.
>
> Well, going by the Gof book, one could imagine that the image data in a
> tile would be stored not as the actual RGB or whatever values, but as
> pointers to KoColor objects; for every possible colour a KoColor, but the
> same KoColor references many times.
No, that was not the intent of this flyweight, here, I would not want to do
this for speed considerations. In this case here, flyweight is really for
the color strategies, not because we have a lot of them but because their
construction is really going to be expensive.
Look at it, we a TILE_SIZE * 4 X TILE_SIZE * 4 memory buffer that is being
allocated already, we will have the pre-multiplied alpha which will be at
least USHRT_MAX colors too.
Also, we want to skip on all those multiplies and divides that we would need
for rendering otherwise.
_______________________________________________
kimageshop mailing list
kimageshop@mail.kde.org
http://mail.kde.org/mailman/listinfo/kimageshop
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic