Re: [dev-servo] WebGL canvas display

2015-03-14 Thread Robert O'Callahan
On Sun, Mar 15, 2015 at 6:41 PM, Patrick Walton wrote: > Actually, come to think of it, we could probably eliminate that > performance hazard by switching the stacking-context-to-layer mapping from > 1:1 to 1:N. Since finalized display lists are flat lists of drawing > commands, this shouldn't be

Re: [dev-servo] WebGL canvas display

2015-03-14 Thread Patrick Walton
Actually, come to think of it, we could probably eliminate that performance hazard by switching the stacking-context-to-layer mapping from 1:1 to 1:N. Since finalized display lists are flat lists of drawing commands, this shouldn't be that hard: just chop up the list into layers. This would also al

Re: [dev-servo] WebGL canvas display

2015-03-14 Thread Patrick Walton
Well, I don't know how to without sacrificing incremental display list building. The idea behind incremental DL building is to retain display lists at the level of stacking contexts: each stacking context is associated with a DL and optionally a layer. This makes it very easy to avoid reconstructin

Re: [dev-servo] WebGL canvas display

2015-03-14 Thread Robert O'Callahan
On Sun, Mar 15, 2015 at 6:10 PM, Patrick Walton wrote: > We can only layerize stacking contexts, since we have no FrameLayerBuilder. > So we have to promote canvases to stacking contexts if we want to layerize > them. WebKit does the same thing. > You should fix that. Blink is :-) Rob -- oIo o

Re: [dev-servo] WebGL canvas display

2015-03-14 Thread Patrick Walton
We can only layerize stacking contexts, since we have no FrameLayerBuilder. So we have to promote canvases to stacking contexts if we want to layerize them. WebKit does the same thing. Patrick On Mar 14, 2015 10:08 PM, "Robert O'Callahan" wrote: > On Sun, Mar 15, 2015 at 6:38 AM, Patrick Walton

Re: [dev-servo] WebGL canvas display

2015-03-14 Thread Robert O'Callahan
On Sun, Mar 15, 2015 at 6:38 AM, Patrick Walton wrote: > One issue is that we have to unconditionally layerize canvases for this, > which violates the spec. > What do you mean, it violates the spec? Rob -- oIo otoeololo oyooouo otohoaoto oaonoyooonoeo owohooo oioso oaonogoroyo owoiotoho oao ob

Re: [dev-servo] WebGL canvas display

2015-03-14 Thread Patrick Walton
So readback is definitely the easiest way to get started, but obviously it won't work long-term. The right way is to create a new type of layer, a CanvasLayer, that encompasses a native shared surface shared between the WebGL task and the compositor. A "native shared surface" is the same OS-specif

[dev-servo] WebGL canvas display

2015-03-13 Thread Josh Matthews
It sounds likely that we'll have a student spend the summer working on a basic WebGL implementation through the VALS Semester of Code (http://semesterofcode.com/). What's the right way to make that show up? Presumably we don't want to do a readback thing like we did with the 2D canvas (low-hang