ytmytm / geos

Source code of GEOS 2.0 for the Commodore 64 and 128

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rewrite Rectangle+HorizontalLine

ytmytm opened this issue · comments

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.