answersLogoWhite

0


Best Answer

Buffer is like bucket of data you write to at your own pace so that some other process can read from it at its own pace when it is needed. If you use a single buffer, you may end up overwriting what the other process did not read yet, or the other process may "catch up" with you before you finish writing your current set of data. Basically, you still need to carefully synchronize the two processes. With two buffers, you can write to one buffer while the other process is still reading the other buffer.

User Avatar

Wiki User

16y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

9y ago

Double buffering simply means performing all writes to a temporary buffer, then overwriting the real buffer with your temporary buffer in a single operation. A typical scenario is in an owner-drawn view that requires complex drawing code. Normally, the background is erased and the drawing code redraws the entire image from scratch. This is known as single-buffering. While this fine under normal operation, whenever you resize your window you will trigger dozens of redraw events creating an ugly flicker in your view as it's erased and redrawn multiple times.

To eliminate this flicker you need to stop erasing the image and simply overwrite it with a new image which you create in a separate memory buffer, one that has the same device context as your view. the overwriting process is known as a "bit-blast". Double-buffer costs more memory, of course, but the end result is a view that does not flicker when resized, nor when an another window or object is dragged across your image. Note that although you are no longer erasing the image, the new image overwrites every pixel so there will be no artefacts left behind by the previous image so it does not matter. This is achieved by constructing a new buffer upon which to draw your new image so you always start with a "blank canvas".

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What gain is achieved by double buffering as opposed a single buffering?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is single buffering?

Single buffering is the simplest type of buffering. The web definition is that single buffers are OpenGL contexts that do not have back color buffers.


What is a tic mark in mathematics?

Isn't that the single quote, as opposed to the double quote?


Difference between redhawk and Blackhawk ruger?

Redhawk is a double action revolver, as opposed to the single action Blackhawk.


What is the increased percentage of insulation with double glazed windows as opposed to single glazed?

The percentage insulation witha double glazed window, as oppsoed to a single glazed window is about twenty three percent less. This makes it very energy efficient.


What is agendum?

An agendum is a single task which is to be achieved.


What is an agendum?

An agendum is a single task which is to be achieved.


What is simple cream?

I think you mean Single cream (as opposed to double cream.)Single cream is for pouring and double cream is meant to be whipped so it stands up firm.These are the terms used in the UK. In the USA I think they use different words for the types of cream.


Buffering in OS?

It is a process of storing data in memory area called Buffers while data is being transferred between two devices or between a device and an application. Buffering is done for 3 reasons: a. To cope with the speed mismatch between producer (or sender) and consumer (or receiver) of a data stream. b. To adapt between the devices having different data-transfer size. c. To support copy semantics for application I/O.


What is a characteristic of a aromatic hydrocarbons?

Alternating single and double bonds


Not double but........?

single


What type of circulatory system do animals that use lungs for breathing have?

A circulatory system that involves the lungs is referred to as a double circulatory system. This is opposed to a single loop circulation that fishes have.


Is the oboe a single or a double reed?

I think you are referring to the Bb clarinet which is single but there are acually 3 different types of clarinets. Bb=single Oboe=double Alto=single