[Webkit-unassigned] [Bug 70117] Only expose window.WebGLRenderingContext to Web content when WebGL is enabled

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Sep 9 17:42:49 PDT 2012


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





--- Comment #4 from Dean Jackson <dino at apple.com>  2012-09-09 17:43:07 PST ---
The code on get.webgl.org does this:


    if (gl == null) {
        try { gl = canvas.getContext("experimental-webgl"); experimental = true; }
        catch (x) { gl = null; }
    }

Creating a context just to test if WebGL is enabled is exactly what we want to avoid. It's OK for get.webgl.org because that has to be a conclusive result, but for scripts like modernizr, doing this on EVERY load of a page, even those that will never use WebGL, is a huge waste (and may trigger side effects like on OS X where we jump to a discrete GPU).

I think we need to come up with another method. I'm not sure about window.WebGLRenderingContext being hidden when WebGL is not enabled.

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