davidedc / livecodelab

a web based livecoding environment
http://livecodelab.net/
MIT License
327 stars 63 forks source link

backgroundViaCanvas in BackgroundPainter #253

Closed rumblesan closed 9 years ago

rumblesan commented 9 years ago

what is this actually for? The default value sets it to false, and it's not changed anywhere. There's a lot of code that isn't being run and without modifying the code it's not run at all

davidedc commented 9 years ago

the idea was to compare whether it was quicker to draw the background using canvas vs. css. I can't recall what the result was but I think I left it to the solution that was more satisfying...

rumblesan commented 9 years ago

so currently it's drawing the background via CSS on a div, not treating it like a canvas at all. Even though we were passing a canvas into the background painter.

I've just done some testing just using a div and it's working as usual in chrome and firefox. There's still code in the background painter to handle using transparencies in gradients, which tbh I'm not sure is that useful a feature, but it works as far as I can tell and other than less code I don't see a reason to remove it.

although less code is always nice ;)

rumblesan commented 9 years ago

closing this as the main question has been answered. Stacked gradients discussion can happen another day

davidedc commented 9 years ago

if I created a canvas for the background and put it in place and I don't use it that's bad and slows things down even if the canvas sits there doing nothing, is that what I did?

rumblesan commented 9 years ago

the canvas was being used, but it was having its stylings set using the css background styling, not by any canvas functionality