Add general comment on knockout rendering.

svn path=/trunk/netsurf/; revision=5327
This commit is contained in:
Michael Drake 2008-09-15 18:47:37 +00:00
parent 7447ca1d4c
commit caafa2704e
1 changed files with 42 additions and 0 deletions

View File

@ -18,6 +18,48 @@
/** \file
* Knockout rendering (implementation).
*
* Knockout rendering is an optimisation which is particularly for
* unaccelerated screen redraw. It tries to avoid plotting the same area more
* than once.
*
* If the object is to plot two overlapping rectangles (one large, one small),
* such as:
*
* +-----------------+
* |#################|
* |####+-------+####|
* |####|:::::::|####|
* |####|:::::::|####|
* |####|:::::::|####|
* |####+-------+####|
* |#################|
* +-----------------+
*
* Without knockout rendering we plot the bottom rectangle and then the top one:
*
* +-----------------+ +-----------------+
* |#################| |#################|
* |#################| |####+-------+####|
* |#################| |####|:::::::|####|
* |#################| and then, |####|:::::::|####|
* |#################| |####|:::::::|####|
* |#################| |####+-------+####|
* |#################| |#################|
* +-----------------+ +-----------------+
*
* With knockoout rendering, the bottom rectangle is split up into smaller
* ones and each pixel is just plotted once:
*
* +-----------------+
* |#################|
* +----+-------+----+
* |####|:::::::|####|
* |####|:::::::|####|
* |####|:::::::|####|
* +----+-------+----+
* |#################|
* +-----------------+
*/
#define NDEBUG