[whatwg] Hardware accelerated canvas
Erik Möller
emoller at opera.com
Mon Sep 3 01:55:24 PDT 2012
On Mon, 03 Sep 2012 03:37:24 +0200, Charles Pritchard <chuck at jumis.com>
wrote:
> Canvas GPU acceleration today is done via transform3d and transitions.
I hope everyone are aware that this connection is just coincidental. The
fact that one vendor decided to flip the hardware acceleration switch when
there was a 3d-transform doesn't mean everyone will. Hardware acceleration
and 3d-transforms are separate features. 3d transforms should be available
in software rendering as well.
> Most [installed] GPUs are not able to accelerate the Canvas path drawing
> mechanism.
> They are able to take an array of floats for WebGL, though.
It's true that there are no dedicated hardware for rendering paths in the
GPUs of today, but they are very good at rendering line segments and
triangle strips and paths can be triangulated. With some preprocessing
paths can even be rendered directly using shaders
http://research.microsoft.com/en-us/um/people/cloop/loopblinn05.pdf
>
> What is really meant here by Canvas GPU acceleration?
>
I can of course only speak for Opera, but we strive to hardware accelerate
all parts of the drawing, and for canvas that also entails triangulating
paths and batching to reduce the number of drawcalls. I.e. using an image
atlas to draw several pieces in succession should give a good performance
boost. Of course if we'd want to take it one step further then adding
support at the API level for drawing multiple images would be good.
--
Erik Möller
Core Gfx Lead
Opera Software
twitter.com/erikjmoller
More information about the whatwg
mailing list