Thread: Re: Whats the function of setDoubleBufferedRendering in JSVGCanvas
Re: Whats the function of
setDoubleBufferedRendering in JSVGCanvas
United States
2007-10-04 04:49:45
Hi Naveed,
noni_4444 <naveed.0972gmail.com> wrote on 09/13/2007
02:23:48 AM:
> I have an applet within which i am doing some animation. The animation
is
> flickering no matter whether i set setDoubleBufferedRendering to true
or
> false.
>
> My problem might be something else, but i was just curious about the
actual
> operation of this function. What does this function call achieve? The JSVGCanvas renders the document to
an offscreen buffer so that updates to the screen (for example when a window moves
over the canvas) can be made quickly without having to draw
everything from scratch.
When double buffer is set to true it
maintains two offscreen buffers. One buffer is used to update the screen the other
is used for rendering, when a rendering completes the two buffers are swapped.
This ensures that a 'good' offscreen buffer is always available. Some
additional copying needs to happen to update the 'old' buffer from the
new buffer however.