[whatwg] Enabling LCD Text and antialiasing in canvas

Gregg Tavares gman at google.com
Wed Mar 13 12:04:09 PDT 2013

Another question: And I see this brought up above

It seems like an opaque canvas should be an orthogonal issue to
subpixel-aa. Subpixel AA seems like it should be a Canvas2DRenderingContext
setting though maybe with a name like

   ctx.antialiasingRenderQuality =

With options of


This would let the developer choose. It would be clear what the limits are,
when to use it, and would let the developer choose what they need, even in
an opaque canvas.

As a developer I'd like to be able to chose an opaque canvas for perf since
compositing an opaque canvas on the page (with GPU blending off) is
significantly faster than with it on. Choosing opaque for perf I shouldn't
then suddenly get anti-aliasing that doesn't fit my use case. A typical
example is to scale a canvas that is smaller than the size it will be
displayed to get more perf or to get a pixelated retro look. It would be
less than desirable if I also mark the canvas as opaque to get perf and
suddenly my scaled canvas has color fringing all over the place.

More information about the whatwg mailing list