BSW code implements HorizontalLine and has Rectangle as repeated calls to that.
It would be faster to avoid the cost of initial setup of GetScanLine and left/right bitmasks for every row if Rectangle would be optimized to reuse those values (just advance r5 and r6 by SC_BYTE_WIDTH (=40) bytes) and HorizontalLine to become 1-pixel high Rectangle instead.
BSW code implements
HorizontalLine
and hasRectangle
as repeated calls to that.It would be faster to avoid the cost of initial setup of
GetScanLine
and left/right bitmasks for every row ifRectangle
would be optimized to reuse those values (just advancer5
andr6
bySC_BYTE_WIDTH
(=40) bytes) andHorizontalLine
to become 1-pixel highRectangle
instead.Same thing for
InvertLine
vsInvertRectangle
.