Java and hardware graphics acceleration

[quote] Yes, I can see that it might matter for a huge animated GIF, but I bet it would solve more problems than it caused if image loading was simply not asynchronous.
[/quote]
Those apis were developed a long, long time ago (in a galaxy far, far away).

Also, there are advantages to async image loading, for cases when you load your images from a url on a remote server - you don’t want your call blocked. Or, imagine some service which generates gif frames (like a streaming movie). A sync call will never be complete.

So, obviously, for backward compatibility reasons, the imageio based implementation will have to be async.

Then, there’s my favorite ImageProducer/Consumer stuff. Don’t get me started…

But I agree, I’d very much like to see toolkit image loading to be implemented on top of imageio. For one, it’ll support more image formats, less code to support, etc.

Are the 2 always going to be seperate though?

I realy don’t see the logic in having Image loading methods in java.awt.Toolkit, javax.imageio.ImageIO, java.awt.Component, etc etc etc etc.

Why not have a class that encapsulates all ‘loading of Images from datasource’, rather than half a dozen methods, liberally spread among totally unrelated classes across the entire AWT :-/
At the moment, the API looks like Images in AWT were an afterthought :-/

ah the confession :stuck_out_tongue:
AWT was designed by chimps, who were miles-away at the time.

[quote] I realy don’t see the logic in having Image loading methods in java.awt.Toolkit, javax.imageio.ImageIO, java.awt.Component, etc etc etc etc.
[/quote]
Neither do I, but we can’t remove Toolkit/Component ones for obvious compatibility reasons. All we can do is implement them using imageio, and encourage people to use imageio directly…

I’d be great to see them deprecated in 1.5…1.6 :stuck_out_tongue:

[quote]Swapping in general really hurts Java performance and it absolutely kills it dead under Winblows.
[/quote]
;D When I first read that I thought it was a typo, but Jeff isn’t usually that far off, he usually has the correct letters but in the wrong order…