play-co / timestep

GNU General Public License v3.0
16 stars 27 forks source link

DOM Renderer #5

Open austinh opened 11 years ago

austinh commented 11 years ago

I recently committed some translate3d support for DOM renderer. However, now that I've done further testing, I've learned that the DOM Renderer does not work all that well. The DOM renderer can and should be a completely viable alternative, especially now that Desktop builds are going to be a bigger part of GC.

ImageScaleView just produces errors with DOM renderer, and uses canvas. The DOM Renderer should avoid Canvas elements as much as possible. Unfortunately, I'm not sure how to refractor ImageScaleView because it's quite dependent on canvas. It may not even be possible with the pixel-by-pixel editing, and therefore the DOM version of imagescaleview should just return a width/height scaled image regardless. RenderSlice is the culprit

a few errors: new WebKitCSSMatrix() useless in non-webkit browsers. Also when matrixes are applied my translate3d does not really do anything, as matrixes override any translates. Should support unprefixed css matrix as well as O/Moz/MS (there are also shims for this!)

DOM/ImageView has the following error : undefined function getImageFromCache

this.getImageFromCache = function(url) { return this._imgCache[url]; }; Adding that should help.

All Canvas related code should probably be abstracted to the canvas backend, but unfortunately it's all over the engine.