If you have draw being called again before the previous call to it has finished rendering, this will prevent lines which don't fit in the active canvas context from being drawn. Your example ties draw to pressing a button so it could be hard to see this have any significance, but I'm playing around with one where I tie draw to resize and it was getting really messy without this check in there. Doesn't seem to impact performance in any significant way.
If you have draw being called again before the previous call to it has finished rendering, this will prevent lines which don't fit in the active canvas context from being drawn. Your example ties draw to pressing a button so it could be hard to see this have any significance, but I'm playing around with one where I tie draw to resize and it was getting really messy without this check in there. Doesn't seem to impact performance in any significant way.