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:
@@ -63,7 +63,7 @@ public:
|
||||
* @param company_mask Bitmask of companies to be shown.
|
||||
* @param scale Desired thickness of lines and size of station dots.
|
||||
*/
|
||||
LinkGraphOverlay(const Window *w, uint wid, CargoTypes cargo_mask, uint32 company_mask, uint scale) :
|
||||
LinkGraphOverlay(Window *w, uint wid, CargoTypes cargo_mask, uint32 company_mask, uint scale) :
|
||||
window(w), widget_id(wid), cargo_mask(cargo_mask), company_mask(company_mask), scale(scale)
|
||||
{}
|
||||
|
||||
@@ -83,7 +83,7 @@ public:
|
||||
uint32 GetCompanyMask() { return this->company_mask; }
|
||||
|
||||
protected:
|
||||
const Window *window; ///< Window to be drawn into.
|
||||
Window *window; ///< Window to be drawn into.
|
||||
const uint widget_id; ///< ID of Widget in Window to be drawn to.
|
||||
CargoTypes cargo_mask; ///< Bitmask of cargos to be displayed.
|
||||
uint32 company_mask; ///< Bitmask of companies to be displayed.
|
||||
|
Reference in New Issue
Block a user