W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2013

Re: [whatwg] remove resetClip from the Canvas 2D spec

From: Simon Sarris <simon.sarris@gmail.com>
Date: Mon, 12 Aug 2013 16:56:07 -0400
Message-ID: <CAA5isUaqWcDhRLj3MVa1Jef_LCgpkohLZo-QHibAK3Cd3d_Pcw@mail.gmail.com>
To: Justin Novosad <junov@google.com>
Cc: WHATWG List <whatwg@whatwg.org>, Stephen White <senorblanco@chromium.org>, Rik Cabanier <cabanier@gmail.com>, Ian Hickson <ian@hixie.ch>
> Good point, I think part of the problem has to do with the fact that save
> is non-selective (saves all of the state).

Yes, since save() and restore() save and restore everything, it creates the
side effect of needing to set ctx.font/fillStyle/strokeStyle more often
than otherwise, which are slow to set, probably because of some CSS parser
activity, but I'm not wise enough to know.

If there was merely a way to save and restore the context, or perhaps some
other subset of state, that would probably work nicely too.
Received on Monday, 12 August 2013 20:56:33 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:23 UTC