6 ms·
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 hard
by randallu 13y 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.
- bdash 13y agoFor what it's worth, WebKit on OS X uses hardware acceleration for both rendering and compositing by way of Core Animation.
- randallu 13y agoOh, nice! For some reason I thought that was only for canvas.
- bdash 13y agoIt was only used for canvas in the initial release before being deployed more widely.
- Ciechanowski 13y agoWhich technologies do benefit from GPU rendering? Aren't Quartz calls rasterized on CPU?
- bdash 13y agoCore Animation layers have a mode in which Core Graphics calls targeting them are both processed asynchronously by a another thread and rasterized via OpenGL.
- Ciechanowski 13y agoI 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?