gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSImage caching


From: Fred Kiefer
Subject: NSImage caching
Date: Fri, 12 Dec 2008 21:36:51 +0100
User-agent: Thunderbird 2.0.0.18 (X11/20081112)

While looking at the unnecessary drawing problem that Wolfgang Lux
noticed, I found that image caching isn't used as much as I would
expect. This is caused by our code not reusing cached representations
for images that aren't full opaque. (See [NSImage _cacheForRep:] lines
1940 and 1965) The un-setting of the background colour here results in
the cached representation being redrawn, with the exactly same contents.

I think this code was wrong to start with, but now that our cached
representations will mostly have alpha information coming along with
them, we just don't need this check any more. Perhaps we should change
the cached representation to use the background colour at all. Only use
that colour, if set, to draw the background for all representations, no
matter whether cached, bitmap or other.

This should speed up the drawing of partly transparent images.

Fred




reply via email to

[Prev in Thread] Current Thread [Next in Thread]