Change how dirty screen, window and viewport areas are tracked for later redrawing
Track dirty viewport areas seperately form general screen redraws. Maintain a dirty block grid per viewport, with a smaller block size. Use even smaller block size in viewport map mode. Use a rectangle array for general screen redraws instead of a block grid. Add a dirty bit to windows and widgets, to simplify the common case of repainting a whole window or widget, without catching neighbouring windows or viewports.
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
* (this is btw. also possible if needed). This is used to avoid a
|
||||
* flickering of the screen by the video driver constantly repainting it.
|
||||
*
|
||||
* This whole mechanism is controlled by an rectangle defined in #_invalid_rect. This
|
||||
* This whole mechanism was controlled by an rectangle defined in #_invalid_rect. This
|
||||
* rectangle defines the area on the screen which must be repaint. If a new object
|
||||
* needs to be repainted this rectangle is extended to 'catch' the object on the
|
||||
* screen. At some point (which is normally uninteresting for patch writers) this
|
||||
@@ -32,7 +32,6 @@
|
||||
* rectangle information. Then a new round begins by marking objects "dirty".
|
||||
*
|
||||
* @see VideoDriver::MakeDirty
|
||||
* @see _invalid_rect
|
||||
* @see _screen
|
||||
*/
|
||||
|
||||
@@ -134,6 +133,7 @@ const char *GetCharAtPosition(const char *str, int x, FontSize start_fontsize =
|
||||
|
||||
void DrawDirtyBlocks();
|
||||
void SetDirtyBlocks(int left, int top, int right, int bottom);
|
||||
void UnsetDirtyBlocks(int left, int top, int right, int bottom);
|
||||
void MarkWholeScreenDirty();
|
||||
|
||||
void GfxInitPalettes();
|
||||
|
||||
Reference in New Issue
Block a user