I have no idea about construction and resizing, but webgl's frame flinging (and 
by extension skia-gl's) should Just Work already.
WebGL content blithely calls SurfaceStream::SwapProducer, and somewhere in 
Layers/TextureClient/Host code there's a call to SurfaceStream::SwapConsumer.
The only thing WebGL needs moved between the client and host size of things is 
the SurfaceStream pointer.

-Jeff

----- Original Message -----
From: "Robert O'Callahan" <rob...@ocallahan.org>
To: "Nicolas Silva" <nical.si...@gmail.com>
Cc: "Kyle Huey" <m...@kylehuey.com>, "Morris Tseng" <mts...@mozilla.com>, "Jeff 
Gilbert" <jgilb...@mozilla.com>, "Benoit Jacob" <bja...@mozilla.com>, "Milan 
Sreckovic" <msrecko...@mozilla.com>, "Matt Woodrow" <mwood...@mozilla.com>, 
"Nicholas Cameron" <n...@mozilla.com>, "dev-platform" 
<dev-platform@lists.mozilla.org>
Sent: Thursday, October 31, 2013 12:54:42 PM
Subject: Re: Layer Construction for Off Main Thread <canvas>

On Thu, Oct 31, 2013 at 11:19 PM, Nicolas Silva <nical.si...@gmail.com>wrote:

> With OMTC these days the Layer classes don't hold any logic. All the fancy
> stuff goes into classes inheriting from CompositableClient (and
> CompositableHost on the compositor side). While Layer classes can only be
> manipulated from the main thread and use the PLayerTransaction IPDL
> protocol to sync with the compositor, Compositable classes can be used by
> either the PLayerTransaction or the PImageBridge protocol. The logic to
> attach a Compositable using PImageBridge to a Layer using PLayerTransaction
> is rather simple (look at ImageClientBridge and ImageContainer) and mostly
> implemented in the CompositableClient/Host abstraction so you don't have to
> redo most of it.
>
> As Nick said you could have on the main thread a dummy CanvasClient
> analogous to ImageClientBridge which just forward an "asyncID" which is the
> ID used to connect the layer and the compositable on the compositor side,
> and on the ImageBridge thread you would have the usual CanvasClient. Then
> you'd need the equivalent of ImageContainer that would interface with the
> WebGLContext and forward frames to the ImageClient on the ImageBridge
> thread.
>

This last point is very important. It's very important that CanvasClient
and ImageBridge and stuff like that not exposed outside the layers system.

I think someone from gfx really needs to help with this part.

Rob
-- 
Jtehsauts  tshaei dS,o n" Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o  Whhei csha iids  teoa
stiheer :p atroa lsyazye,d  'mYaonu,r  "sGients  uapr,e  tfaokreg iyvoeunr,
'm aotr  atnod  sgaoy ,h o'mGee.t"  uTph eann dt hwea lmka'n?  gBoutt  uIp
waanndt  wyeonut  thoo mken.o w  *
*
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to