ytmytm / geos

Source code of GEOS 2.0 for the Commodore 64 and 128
3 stars 0 forks source link

Rewrite Rectangle+HorizontalLine #9

Open ytmytm opened 3 years ago

ytmytm commented 3 years ago

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.

Same thing for InvertLine vs InvertRectangle.