Re: [whatwg] new constructor method for Path2D

2014-03-10 Thread Rik Cabanier
On Sun, Mar 9, 2014 at 10:52 PM, Dirk Schulze dschu...@adobe.com wrote: On Mar 10, 2014, at 3:44 AM, Rik Cabanier caban...@gmail.com wrote: On Wed, Mar 5, 2014 at 1:46 PM, Rik Cabanier caban...@gmail.com wrote: While implementing the Path2D object in mozilla, we ran into a

Re: [whatwg] new constructor method for Path2D

2014-03-10 Thread Joe Gregorio
On Mon, Mar 10, 2014 at 2:02 PM, Rik Cabanier caban...@gmail.com wrote: What are you not sure about? The current Path2D interface might be unacceptably slow under certain circumstances and there's currently no way for authors to work around this. There has to be a hint. If not, I don't see

Re: [whatwg] new constructor method for Path2D

2014-03-10 Thread Rik Cabanier
On Mon, Mar 10, 2014 at 11:07 AM, Joe Gregorio jcgrego...@google.comwrote: On Mon, Mar 10, 2014 at 2:02 PM, Rik Cabanier caban...@gmail.com wrote: What are you not sure about? The current Path2D interface might be unacceptably slow under certain circumstances and there's currently no

Re: [whatwg] new constructor method for Path2D

2014-03-10 Thread Dirk Schulze
On Mar 10, 2014, at 7:02 PM, Rik Cabanier caban...@gmail.com wrote: On Sun, Mar 9, 2014 at 10:52 PM, Dirk Schulze dschu...@adobe.com wrote: On Mar 10, 2014, at 3:44 AM, Rik Cabanier caban...@gmail.com wrote: On Wed, Mar 5, 2014 at 1:46 PM, Rik Cabanier caban...@gmail.com wrote:

Re: [whatwg] new constructor method for Path2D

2014-03-10 Thread Domenic Denicola
What about making the Path2D constructor a property of each context? E.g. var path = new myContext.Path2D(...); Each context would have a different constructor tied to it, allowing this kind of optimization.

Re: [whatwg] new constructor method for Path2D

2014-03-10 Thread Justin Novosad
On Mon, Mar 10, 2014 at 2:14 PM, Rik Cabanier caban...@gmail.com wrote: On Mon, Mar 10, 2014 at 11:07 AM, Joe Gregorio jcgrego...@google.com wrote: What part is slow, the decoding and re-encoding, or is just always the encoding step that is slow? It's decoding/re-encoding of an

Re: [whatwg] new constructor method for Path2D

2014-03-10 Thread Tab Atkins Jr.
On Mon, Mar 10, 2014 at 11:38 AM, Justin Novosad ju...@google.com wrote: On Mon, Mar 10, 2014 at 2:14 PM, Rik Cabanier caban...@gmail.com wrote: On Mon, Mar 10, 2014 at 11:07 AM, Joe Gregorio jcgrego...@google.com wrote: What part is slow, the decoding and re-encoding, or is just always the

Re: [whatwg] new constructor method for Path2D

2014-03-10 Thread Rik Cabanier
On Mon, Mar 10, 2014 at 11:38 AM, Justin Novosad ju...@google.com wrote: On Mon, Mar 10, 2014 at 2:14 PM, Rik Cabanier caban...@gmail.com wrote: On Mon, Mar 10, 2014 at 11:07 AM, Joe Gregorio jcgrego...@google.com wrote: What part is slow, the decoding and re-encoding, or is just

Re: [whatwg] new constructor method for Path2D

2014-03-10 Thread Justin Novosad
On Mon, Mar 10, 2014 at 4:22 PM, Rik Cabanier caban...@gmail.com wrote: On Mon, Mar 10, 2014 at 11:38 AM, Justin Novosad ju...@google.com wrote: On Mon, Mar 10, 2014 at 2:14 PM, Rik Cabanier caban...@gmail.com wrote: On Mon, Mar 10, 2014 at 11:07 AM, Joe Gregorio jcgrego...@google.com

Re: [whatwg] new constructor method for Path2D

2014-03-10 Thread Rik Cabanier
On Mon, Mar 10, 2014 at 1:33 PM, Justin Novosad ju...@google.com wrote: On Mon, Mar 10, 2014 at 4:22 PM, Rik Cabanier caban...@gmail.com wrote: On Mon, Mar 10, 2014 at 11:38 AM, Justin Novosad ju...@google.comwrote: On Mon, Mar 10, 2014 at 2:14 PM, Rik Cabanier

Re: [whatwg] new constructor method for Path2D

2014-03-09 Thread Rik Cabanier
On Wed, Mar 5, 2014 at 1:46 PM, Rik Cabanier caban...@gmail.com wrote: While implementing the Path2D object in mozilla, we ran into a performance issue. The mozilla implementation uses different backends for the canvas 2D context. Even within the same document, different canvas objects can

Re: [whatwg] new constructor method for Path2D

2014-03-09 Thread Dirk Schulze
On Mar 10, 2014, at 3:44 AM, Rik Cabanier caban...@gmail.com wrote: On Wed, Mar 5, 2014 at 1:46 PM, Rik Cabanier caban...@gmail.com wrote: While implementing the Path2D object in mozilla, we ran into a performance issue. The mozilla implementation uses different backends for the

Re: [whatwg] new constructor method for Path2D

2014-03-06 Thread Dirk Schulze
On Mar 5, 2014, at 11:54 PM, Rik Cabanier caban...@gmail.com wrote: On Wed, Mar 5, 2014 at 2:43 PM, Ian Hickson i...@hixie.ch wrote: On Wed, 5 Mar 2014, Jeff Muizelaar wrote: On Mar 5, 2014, at 5:34 PM, Ian Hickson i...@hixie.ch wrote: On Wed, 5 Mar 2014, Rik Cabanier wrote: To work

Re: [whatwg] new constructor method for Path2D

2014-03-06 Thread Rik Cabanier
On Thu, Mar 6, 2014 at 2:28 AM, Dirk Schulze dschu...@adobe.com wrote: On Mar 5, 2014, at 11:54 PM, Rik Cabanier caban...@gmail.com wrote: On Wed, Mar 5, 2014 at 2:43 PM, Ian Hickson i...@hixie.ch wrote: On Wed, 5 Mar 2014, Jeff Muizelaar wrote: On Mar 5, 2014, at 5:34 PM, Ian Hickson

[whatwg] new constructor method for Path2D

2014-03-05 Thread Rik Cabanier
While implementing the Path2D object in mozilla, we ran into a performance issue. The mozilla implementation uses different backends for the canvas 2D context. Even within the same document, different canvas objects can be on top of different graphics libraries. For best performance, the Path2D

Re: [whatwg] new constructor method for Path2D

2014-03-05 Thread Ian Hickson
On Wed, 5 Mar 2014, Rik Cabanier wrote: To work around this, we could add a couple of constructor methods to the 2D context: Path2D createPath(); Creates a new empty Path object [...] This used to be how many Web APIs worked, but over the years we've received enormous volumes of

Re: [whatwg] new constructor method for Path2D

2014-03-05 Thread Jeff Muizelaar
On Mar 5, 2014, at 5:34 PM, Ian Hickson i...@hixie.ch wrote: On Wed, 5 Mar 2014, Rik Cabanier wrote: To work around this, we could add a couple of constructor methods to the 2D context: Path2D createPath(); Creates a new empty Path object [...] This used to be how many Web APIs

Re: [whatwg] new constructor method for Path2D

2014-03-05 Thread Ian Hickson
On Wed, 5 Mar 2014, Jeff Muizelaar wrote: On Mar 5, 2014, at 5:34 PM, Ian Hickson i...@hixie.ch wrote: On Wed, 5 Mar 2014, Rik Cabanier wrote: To work around this, we could add a couple of constructor methods to the 2D context: Path2D createPath(); Creates a new empty Path

Re: [whatwg] new constructor method for Path2D

2014-03-05 Thread Rik Cabanier
On Wed, Mar 5, 2014 at 2:43 PM, Ian Hickson i...@hixie.ch wrote: On Wed, 5 Mar 2014, Jeff Muizelaar wrote: On Mar 5, 2014, at 5:34 PM, Ian Hickson i...@hixie.ch wrote: On Wed, 5 Mar 2014, Rik Cabanier wrote: To work around this, we could add a couple of constructor methods to the