wsick / Fayde

Inspired by Silverlight; XAML engine using Javascript and rendering to the HTML5 Canvas.
MIT License
189 stars 27 forks source link

RenderContext.resize is called on every mouse motion #141

Closed asthomas closed 9 years ago

asthomas commented 9 years ago

I put a console.debug statement in RenderContext.resize, and noticed that it is being called every time the mouse moves. This is due to a call to hitTestCtx.resize within Surface.hitTest(). I don't think it is having a substantial CPU impact, but it might if the resize method gets more complicated to deal with high DPI displays.

BSick7 commented 9 years ago

I can see this have a negative effect when using a high-dpi device. I am ensuring the resize is idempotent. minerva v0.4.23 includes these changes.