Re: [whatwg] new constructor method for Path2D

2014-03-10 Thread Rik Cabanier
On Mon, Mar 10, 2014 at 1:33 PM, Justin Novosad wrote: > > > > On Mon, Mar 10, 2014 at 4:22 PM, Rik Cabanier wrote: > >> >> >> >> On Mon, Mar 10, 2014 at 11:38 AM, Justin Novosad wrote: >> >>> >>> >>> >>> On Mon, Mar 10, 2014 at 2:14 PM, Rik Cabanier wrote: >>> On Mon, Mar 10, 2014 at 11:07

Re: [whatwg] new constructor method for Path2D

2014-03-10 Thread Justin Novosad
On Mon, Mar 10, 2014 at 4:22 PM, Rik Cabanier wrote: > > > > On Mon, Mar 10, 2014 at 11:38 AM, Justin Novosad wrote: > >> >> >> >> On Mon, Mar 10, 2014 at 2:14 PM, Rik Cabanier wrote: >> >>> On Mon, Mar 10, 2014 at 11:07 AM, Joe Gregorio >> >wrote: >>> >>> > >>> >>> > What part is slow, the dec

Re: [whatwg] new constructor method for Path2D

2014-03-10 Thread Rik Cabanier
On Mon, Mar 10, 2014 at 11:38 AM, Justin Novosad wrote: > > > > On Mon, Mar 10, 2014 at 2:14 PM, Rik Cabanier wrote: > >> On Mon, Mar 10, 2014 at 11:07 AM, Joe Gregorio > >wrote: >> >> > >> >> > What part is slow, the decoding and re-encoding, or is just always the >> > encoding step >> > that i

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 wrote: > On Mon, Mar 10, 2014 at 2:14 PM, Rik Cabanier wrote: >> On Mon, Mar 10, 2014 at 11:07 AM, Joe Gregorio > >wrote: >> > What part is slow, the decoding and re-encoding, or is just always the >> > encoding step >> > that is slow? >> >> It's d

Re: [whatwg] new constructor method for Path2D

2014-03-10 Thread Justin Novosad
On Mon, Mar 10, 2014 at 2:14 PM, Rik Cabanier wrote: > On Mon, Mar 10, 2014 at 11:07 AM, Joe Gregorio >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 already constructed path. C

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 Dirk Schulze
On Mar 10, 2014, at 7:02 PM, Rik Cabanier wrote: > On Sun, Mar 9, 2014 at 10:52 PM, Dirk Schulze wrote: > >> >> >>> On Mar 10, 2014, at 3:44 AM, "Rik Cabanier" wrote: >>> On Wed, Mar 5, 2014 at 1:46 PM, Rik Cabanier >> wrote: While implementing the Path2D object in mozilla

Re: [whatwg] new constructor method for Path2D

2014-03-10 Thread Rik Cabanier
On Mon, Mar 10, 2014 at 11:07 AM, Joe Gregorio wrote: > > > > On Mon, Mar 10, 2014 at 2:02 PM, Rik Cabanier 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 ar

Re: [whatwg] new constructor method for Path2D

2014-03-10 Thread Joe Gregorio
On Mon, Mar 10, 2014 at 2:02 PM, Rik Cabanier 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 a way that f

Re: [whatwg] new constructor method for Path2D

2014-03-10 Thread Rik Cabanier
On Sun, Mar 9, 2014 at 10:52 PM, Dirk Schulze wrote: > > > > On Mar 10, 2014, at 3:44 AM, "Rik Cabanier" wrote: > > > >> On Wed, Mar 5, 2014 at 1:46 PM, Rik Cabanier > wrote: > >> > >> While implementing the Path2D object in mozilla, we ran into a > performance > >> issue. > >> > >> The mozilla

Re: [whatwg] new constructor method for Path2D

2014-03-09 Thread Dirk Schulze
> On Mar 10, 2014, at 3:44 AM, "Rik Cabanier" wrote: > >> On Wed, Mar 5, 2014 at 1:46 PM, Rik Cabanier 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. >>

Re: [whatwg] new constructor method for Path2D

2014-03-09 Thread Rik Cabanier
On Wed, Mar 5, 2014 at 1:46 PM, Rik Cabanier 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 be on top o

Re: [whatwg] new constructor method for Path2D

2014-03-06 Thread Rik Cabanier
On Thu, Mar 6, 2014 at 2:28 AM, Dirk Schulze wrote: > > On Mar 5, 2014, at 11:54 PM, Rik Cabanier wrote: > > > On Wed, Mar 5, 2014 at 2:43 PM, Ian Hickson wrote: > > > >> On Wed, 5 Mar 2014, Jeff Muizelaar wrote: > >>> On Mar 5, 2014, at 5:34 PM, Ian Hickson wrote: > On Wed, 5 Mar 2014, R

Re: [whatwg] new constructor method for Path2D

2014-03-06 Thread Dirk Schulze
On Mar 5, 2014, at 11:54 PM, Rik Cabanier wrote: > On Wed, Mar 5, 2014 at 2:43 PM, Ian Hickson wrote: > >> On Wed, 5 Mar 2014, Jeff Muizelaar wrote: >>> On Mar 5, 2014, at 5:34 PM, Ian Hickson wrote: On Wed, 5 Mar 2014, Rik Cabanier wrote: > > To work around this, we could add a

Re: [whatwg] new constructor method for Path2D

2014-03-05 Thread Rik Cabanier
On Wed, Mar 5, 2014 at 2:43 PM, Ian Hickson wrote: > On Wed, 5 Mar 2014, Jeff Muizelaar wrote: > > On Mar 5, 2014, at 5:34 PM, Ian Hickson 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

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 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 empt

Re: [whatwg] new constructor method for Path2D

2014-03-05 Thread Jeff Muizelaar
On Mar 5, 2014, at 5:34 PM, Ian Hickson 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, 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

[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