Hacker News new | ask | show | jobs
by randallu 4524 days ago
No, translateZ just makes it a composited layer. Hardware comes much later in the pipeline and possibly in another process.

The content of the layer isn't hardware rendered. It's rendered by the CPU and uploaded to a texture. In WebKit and probably Blink there's a fast path for images, canvas and video so that they can be directly uploaded or (on some platforms like Mac) bound to a texture avoiding an upload copy.

Microsoft and (maybe) Mozilla have a "hardware rendering" path via Direct2D, but Chrome and WebKit don't, they have compositors which can use the graphics hardware to perform compositing, but not rendering.

1 comments

For what it's worth, WebKit on OS X uses hardware acceleration for both rendering and compositing by way of Core Animation.
Which technologies do benefit from GPU rendering? Aren't Quartz calls rasterized on CPU?
Core Animation layers have a mode in which Core Graphics calls targeting them are both processed asynchronously by a another thread and rasterized via OpenGL.
I presume you mean the "drawsAsynchronously" property. I'm extremely curious, does it really push the rasterization on the GPU? I mean, do you have shaders written, that do all the stuff that CPU normally does? Bezier paths, clipping, stroking, filling?
Oh, nice! For some reason I thought that was only for canvas.
It was only used for canvas in the initial release before being deployed more widely.