simplegeo / polymaps

Polymaps is a free JavaScript library for making dynamic, interactive maps in modern web browsers.
http://polymaps.org/
Other
1.6k stars 213 forks source link

canvas tiling in chrome 18.0.1025.142 + #118

Open olamothe opened 12 years ago

olamothe commented 12 years ago

There seems to be a problem with newer version of chrome that breaks the tiling of canvas inside polymaps, like in this example :

http://polymaps.org/ex/mandelbrot.html#1.00/0/0

When you first load the example, you can see that the translate attributes doesn't seem to be applied correctly to each canvas.

I tried with the newest available version of Chrome (dev channel) , and it looks like loading the example just crash the browser.

Any ideas ?

olamothe commented 12 years ago

There seems to be a problem when you change the default value of tileSize from 256 to something else : eg. tileSize of 512 seems to break the tiling of the canvas in newer version of chrome.

olamothe commented 12 years ago

The same error occur with the newest version of Safari, on Lion. The underlying problem it seems is the hardware accelerated canvas. If you start either browser with the option off the problem disappear :

For chrome : start from the command line with the flag --disable-accelerated-2d-canvas

For safari on MacOs activate the debug menu from the terminal : defaults write com.apple.Safari IncludeDebugMenu 1 defaults write com.apple.Safari IncludeInternalDebugMenu 1 Uncheck the 'Enable canvas accelerated drawing'

With the hardware acceleration disabled, the problem disappear. I reported the bug on the webkit bugzilla : https://bugs.webkit.org/show_bug.cgi?id=83189

In the meantime, I don't know if any of you guys had any ideas for a way to fix this with some hack inside polymaps