• Post Reply Bookmark Topic Watch Topic
  • New Topic

How does something get Double Buffered  RSS feed

 
shawn larkin
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the (Graphics)graphics environment just getting put into a BufferedImage, and then that BufferedImage is being placed into another BufferedImage. If this is the case, is there a real performance boost on average?
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With double-buffering, the user can both reduce flickering involved in animations and improve performance by specifying a clipping area to be repainted. I don't see why one couldn't repaint only a specified clipping area without using double-buffering - though the animation would probably suffer from flickering (to different degrees on different machines).
I wouldn't speak as an authority on performance - but I can guess (which is what I do anyway).
Without double-buffering, the clipping area is cleared and then redrawn. With double-buffering, something is drawn to an image, then that image is painted to the clipping area...
Nope, I can't even guess about which is more efficient with concerns to the CPU and system resources. Though, as a user, my brain is happier (and probably more effiecient) viewing smooth, flicker-free animations (especially if it's something I've created).
Good Luck.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!