[Webkit-unassigned] [Bug 43221] Move WebGL-specific code out of GraphicsContext3D so that G3D can be used as a generic accelerated drawing API

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 4 09:53:08 PDT 2010


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





--- Comment #16 from Chris Marrin <cmarrin at apple.com>  2010-08-04 09:53:07 PST ---
(In reply to comment #15)
> (In reply to comment #13)
> > (From update of attachment 63401 [details] [details])
> > WebCore/html/canvas/WebGLRenderingContext.cpp:58
> >  +  #define EXTRACT(x) ((x) ? (x)->object() : 0)
> > I think this is the wrong change. Why would we generically pass a 0 to GraphicsContext3D when we don't have a proper object? It would be better to avoid the call and generate the appropriate WebGL error.
> 
> 0, or null at the JavaScript level, is a perfectly valid value to pass to many of the entry points, for example when detaching a renderbuffer from a framebuffer object. The entry points which do not accept null already have validation which synthesizes the appropriate OpenGL error.
> 
> This change only simplifies uses of the ternary operator throughout this file, restoring logic that was previously inside the GraphicsContext3D implementations, and avoiding possible crashes that have been introduced in handleNPOTTextures() and restoreStatesAfterVertexAttrib0Simulation() due to dereferencing of a possibly NULL object.

Ah, right, I forgot about that. Could we at least do this with an inline function rather than a macro?

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