<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi Rakesh,<div><br><div><div>On 21 Feb 2014, at 2:18 pm, Rakesh Sadhu <<a href="mailto:rakeshsadhu@hotmail.com">rakeshsadhu@hotmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="hmmessage" style="font-size: 12pt; font-family: Calibri; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div dir="ltr">I have a question, When a glcontext is lost and again restored , what should be the behaviour of associated extensions ?<br></div></div></blockquote><div><br></div><div>When a ContextLost occurs on a WebGLRenderingContext all extensions should be reset, as described by the specification (with the exception of the special extension that can manually trigger a ContextLost). This doesn’t necessarily mean the values get NULLed (since you may have an existing reference), just that they will fire exceptions if you use them.</div><div><br></div><div>I have an in-progress pull request on a test case for this, on the Khronos github repository.</div><div><br></div><div>BTW - this question is probably best suited to the WebGL mailing lists, unless you think there is a WebKit bug.</div><div><br></div><div>Dean</div><br><blockquote type="cite"><div class="hmmessage" style="font-size: 12pt; font-family: Calibri; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div dir="ltr">I have a test case <span class="Apple-converted-space"> </span><a href="http://www.khronos.org/registry/webgl/sdk/tests/conformance/context/context-lost-restored.html">http://www.khronos.org/registry/webgl/sdk/tests/conformance/context/context-lost-restored.html</a>,<br>and in it I am confused to see that upon context restoration , test case expects extension 's related API's to be NULL .<br><br>here is the js code snippet from above mentioned link:<br><br><br><pre id="line1"><span>function testOESVertexArrayObject() {
<span id="line258"></span> if (OES_vertex_array_object) {
<span id="line259"></span> // Extension must still be lost.
<span id="line260"></span> shouldBeNull("OES_vertex_array_object.createVertexArrayOES()"); // WHY ????
<span id="line261"></span> // Try re-enabling extension
<span id="line262"></span>
<span id="line263"></span> old_OES_vertex_array_object = OES_vertex_array_object;
<span id="line264"></span> OES_vertex_array_object = reGetExtensionAndTestForProperty(gl, "OES_vertex_array_object", false);
<span id="line265"></span> shouldBeTrue("OES_vertex_array_object.createVertexArrayOES() != null");
<span id="line266"></span> shouldBeTrue("old_OES_vertex_array_object.createVertexArrayOES() == null");
<span id="line267"></span> }
<span id="line268"></span>}
<span id="line269"></span>
<span id="line270"></span>function testExtensions() {
<span id="line271"></span> testOESTextureFloat();
<span id="line272"></span> testOESVertexArrayObject();
<span id="line273"></span> // Only the WEBGL_lose_context extension should be the same object after context lost.
<span id="line274"></span> new_WEBGL_lose_context = reGetExtensionAndTestForProperty(gl, "WEBGL_lose_context", true);
<span id="line275"></span>}
<span id="line276"></span><br><br>/// this function is a callback function , which is attached to addeventlistener in above mention link//<br><br><span id="line277"></span>function testRestoredContext()
<span id="line278"></span>{
<span id="line279"></span> debug("Test restored context");
<span id="line280"></span> shouldBeFalse("contextRestoredEventFired");
<span id="line281"></span> contextRestoredEventFired = true;
<span id="line282"></span> shouldBeFalse("gl.isContextLost()");
<span id="line283"></span> shouldBe("gl.getError()", "gl.NO_ERROR");
<span id="line284"></span>
<span id="line285"></span> // Validate that using old resources fails.
<span id="line286"></span> testResources(gl.INVALID_OPERATION);
<span id="line287"></span>
<span id="line288"></span> testRendering();
<span id="line289"></span>
<span id="line290"></span> // Validate new resources created in testRendering().
<span id="line291"></span> testResources(gl.NO_ERROR);
<span id="line292"></span>
<span id="line293"></span> testExtensions();
<span id="line294"></span>
<span id="line295"></span> debug("");
<span id="line296"></span>}<br><br>Our Webkit Nightly Build fails </span><br><span> shouldBeNull("OES_vertex_array_object.createVertexArrayOES()")</span></pre>which it should fail , however khronous test case suite expects it to PASS , adn i tested this on chrome on windows, that passes :(<br><br><br>Kindly put some light here..<br>regards<br>rsadhu<br><br><div><br></div>regards<br><div>RSadhu</div></div>_______________________________________________<br>webkit-dev mailing list<br><a href="mailto:webkit-dev@lists.webkit.org">webkit-dev@lists.webkit.org</a><br><a href="https://lists.webkit.org/mailman/listinfo/webkit-dev">https://lists.webkit.org/mailman/listinfo/webkit-dev</a></div></blockquote></div><br></div></body></html>