[Webkit-unassigned] [Bug 44926] Multiple accelerated 2D canvases should be able to use the same GraphicsContext3D

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 31 15:54:26 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=44926





--- Comment #18 from Chris Marrin <cmarrin at apple.com>  2010-08-31 15:54:26 PST ---
(In reply to comment #17)
> Thanks for looking through this patch.  I'll do my best to address all the line-by-line comments.
> 
> The point you make about the FBO treatment is a valid one, Chris.  We'll also want to generalize this in order to support multisampling.  Here's what I propose to make this more general:
> 
> 1.) No new functions on GraphicsContext3D
> 2.) CanvasFramebuffer adopts a more general interface to look something like:
> 
> create(SharedContext3D*, IntSize)
> bind()
> publishToPlatformLayer(PlatformLayer*)
> publishToTexture(unsigned)
> 
> and not expose any specifics about what the FBO binds to.  Then implementations can bind a CanvasFramebuffer to either a color texture or a RenderBuffer and deal with the details of how to expose the rendering results to either a PlatformLayer (for compositing) or a texture (to draw the rendering results in another canvas).  The specifics of allocating a compositing target (texture, CALayer, etc) and doing the copy/blit/resolve will be handled by each platform.

This looks pretty good. Since CanvasFrameBuffer is intimately tied to SharedContext3D, perhaps its ctor should not be public and there should be a createFramebuffer method on SharedContext? That would make the relationship more clear I think. I like the model of the context vending the buffer you'll be drawing into.

How are you creating the PlatformLayer? Doesn't the SharedContext need to vend that as well? Did I miss the call that does that?

Also, I'm not sure it's appropriate to call this a Framebuffer. It's really an FBO, plus Renderbuffers, plus context info. So maybe calling it a DrawingBuffer would be more appropriate. That's the term we use in the WebGL spec and it really refers to the combination of all these things. Also, using the term "Canvas" here is misleading. this is more general that just Canvas.

And while I'm being the pedantic naming police, SharedContext3D would be more accurately named SharedGraphicsContext3D.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list