[webkit-reviews] review granted: [Bug 58626] Add restoreContext() to WEBKIT_lose_context : [Attachment 101505] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 20 15:33:46 PDT 2011


James Robinson <jamesr at chromium.org> has granted Kenneth Russell
<kbr at google.com>'s request for review:
Bug 58626: Add restoreContext() to WEBKIT_lose_context
https://bugs.webkit.org/show_bug.cgi?id=58626

Attachment 101505: Patch
https://bugs.webkit.org/attachment.cgi?id=101505&action=review

------- Additional Comments from James Robinson <jamesr at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=101505&action=review


OK, R=me.  Left one suggestion for your consideration.

> Source/WebCore/html/canvas/WebGLRenderingContext.cpp:347
> +    WebGLRenderingContextLostCallback(WebGLRenderingContext* cb) :
m_context(cb) { }

nit: should be explicit

>>> Source/WebCore/html/canvas/WebGLRenderingContext.cpp:4768
>>> +	 }
>> 
>> I'm not sure why we have to do this - what are the semantics of getError()
after a lost context event is fired?  We replace m_context on restoration, so
why is it important what errors exist on the old m_context?
> 
> See http://www.khronos.org/registry/webgl/specs/latest/#5.14.3 . This is an
attempt to clear the OpenGL error state upon context loss and signal the
CONTEXT_LOST_WEBGL OpenGL error to the application. (Note also that this is
just a refactoring of existing code.)

I see.	Would it be easier to do this faking out in
WebGLRenderingContext::getError() and not touch the underlying context at all
after it is lost?


More information about the webkit-reviews mailing list