Implement partial parallelisation of non-map mode viewport rendering

This commit is contained in:
Jonathan G Rennison
2022-11-09 22:24:31 +00:00
parent 07b752fe69
commit 7685c36f35
12 changed files with 479 additions and 269 deletions

View File

@@ -2147,16 +2147,10 @@ void NWidgetViewport::Draw(const Window *w)
if (this->disp_flags & ND_NO_TRANSPARENCY) {
TransparencyOptionBits to_backup = _transparency_opt;
_transparency_opt &= (1 << TO_SIGNS) | (1 << TO_LOADING); // Disable all transparency, except textual stuff
w->DrawViewport();
w->DrawViewport(this->disp_flags);
_transparency_opt = to_backup;
} else {
w->DrawViewport();
}
/* Optionally shade the viewport. */
if (this->disp_flags & (ND_SHADE_GREY | ND_SHADE_DIMMED)) {
GfxFillRect(this->pos_x, this->pos_y, this->pos_x + this->current_x - 1, this->pos_y + this->current_y - 1,
(this->disp_flags & ND_SHADE_DIMMED) ? PALETTE_TO_TRANSPARENT : PALETTE_NEWSPAPER, FILLRECT_RECOLOUR);
w->DrawViewport(this->disp_flags);
}
}