gzz-dev
[Top][All Lists]
Advanced

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

Re: [Gzz] View2D enhancing.


From: Tuomas Lukka
Subject: Re: [Gzz] View2D enhancing.
Date: Tue, 8 Jul 2003 10:32:20 +0300
User-agent: Mutt/1.5.4i

On Tue, Jul 08, 2003 at 01:19:02AM +0300, Matti Katila wrote:
> 
> Hi boys and girls,
> 
> 
> I run into problems with View2D. I would like to make it use faster way 
> to change scene i.e., through setParams. As you already know we have more 
> than one main node with FenPDF. I have made a simple interface to change 
> scene's parameters but it doesn't work because no one keeps track of all 
> possible coordinate systems since recursive view2ds can be just one 
> instance in the whole view. 
> 
> So can we add a new parameter to View2D?
> 
>     public abstract void render(VobScene vs, 
> -             Object plane,
> +             Object plane, Object key,
>               int matchingParent,
>                   int box2screen, int box2plane
>                       );
> 
> 
> With this change and simple helper class:

Umm, I'm not at all in the clear about what you're trying to achieve
and how.

You need to give lots more detail about this so that everyone can understand
the issues.

> 
> /** Very simple util to save integer in map.
>  */
> public class CoordsysCache {
>     private Map coords = new WeakHashMap(10);
>     public void set(Object key, int cs) {
>       coords.put(key, new Integer(cs));
>     }
>     
>     public int get(Object key) {
>       return ((Integer)coords.get(key)).intValue();
>     }
> }
> 
> 
> We could use setParams easily and make things faster.

This is very bad on Kaffe and possibly others, creating lots of
Integer objects for the GC to worry about.

        Tuomas




reply via email to

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