[Webkit-unassigned] [Bug 90217] [chromium] Avoid calling getUniformLocation??() in the compositor startup

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 2 14:41:51 PDT 2012


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





--- Comment #11 from alexst at chromium.org  2012-07-02 14:41:48 PST ---
> +    m_vertexShader = 0;
> +    m_fragmentShader = 0;

>Hm, this is a bit confusing - do these two member variables just exist to store some transient state?  If so, why are they member variables and not just maintained on the stack?

Well, the previous implementation assumed that nothing outside of the base class needs to happen between compile and link. That changed with the introduction of bindUniforms and could further change if  another type of shader is introduced. For example, one that needs to call bindAttribLocation on some new vertex data. Holding on to shader id's allows for such behavior to happen without re-implementing a bunch of compile logic in the subclass.

That said, I refactored the cleanup code to be more robust/explicit.

New patch on the way.

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