On Thu, 10 Mar 2005 11:29:37 -0500, Gili wrote:

>       The fact that it is transient does not solve the problem I
>mentioned. What I am saying is that if I render the exact same corner
>multiple times (by hitting refresh on my browser 1000 times) then
>render(Graphics2D) will get triggered 1000 times and I will have to
>repaint it. What I am saying is that I know for a fact when the image
>needs to be regenerated and when it should use the cached version and
>RenderedDynamicImageResource does not give me the capability to do much
>about it. The most I can do is g2d.drawImage(cachedImage) I guess but I
>doubt it is as efficient as just giving it the BufferedImage
>directly... I don't want to be cloning the image contents on every
>rendering if I don't have to.

        Hmm, here's a pretty simple solution: add
RenderedDynamicImageResource.isChanged(). If it returns false, use the
cached image in the transient variable. Always invoke isChanged()
before render(Graphics2D). This would work for me. Would it work for
you?

Gili



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to