Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Well, your browser is already GPU-accelerated. What makes it slow is the process of making GPU-memory accessible to your JavaScript.

An example of that is drawing a DIV and applying a CSS 3D Transform to it. By doing so you'll modify it's display on the screen so you'll need to recompute it's actual bounding box. If you compute the BBox on the GPU and never access it anywhere else, everything is fine but as soon as you have to use it in JS you're screwed because you'll have to transfer data from your GPU to your RAM. Doing so at 60fps is very expensive, then you'll take a performance hit from JavaScript being usually slower than C/C++.

That's not the only problem you'll have, text rendering is probably the biggest one. As you might know, textures are rendered using memory friendly algorithms. To ensure maximum readability and quality you'll have to (1) use a lot of memory and / or (2) apply some advanced filtering so your texture doesn't lose quality. Those techniques are quite hard to implement if you're not a 3D programmer (just check what happens if you try to rotate text in CSS and select it) but more importantly you'll find yourself reinventing the wheel.



If you were happy to ignore hover, you'd only need to compute the bounding box when there's an event like a click.


True, but picking is only one pass of rendering (and a pretty fast one as you can see here: https://github.com/aout/SAGE/tree/Multipass/Sage3D/Resources...).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: