Bug 51492

Summary: Add WebGL lost context testing extension
Product: WebKit Reporter: Adrienne Walker <enne>
Component: WebGLAssignee: Adrienne Walker <enne>
Status: RESOLVED FIXED    
Severity: Normal CC: amarinichev, cmarrin, enne, eric, kbr, webkit.review.bot, zmo
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 51494    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch kbr: review+

Description Adrienne Walker 2010-12-22 13:42:00 PST
As there's currently no way to test a WebGL's implementation of context lost and restored events, add the WebGL extension proposed on the public_webgl mailing list for forcibly losing context.

(Once committed, I will update the WebGL extension registry and the set of Khronos conformance tests.  However, I wanted to get this reviewed first, as I'm sure there will be changes needed.)
Comment 1 Adrienne Walker 2010-12-22 15:11:24 PST
Created attachment 77263 [details]
Patch
Comment 2 WebKit Review Bot 2010-12-22 15:28:41 PST
Attachment 77263 [details] did not build on mac:
Build output: http://queues.webkit.org/results/7316113
Comment 3 Adrienne Walker 2010-12-22 16:52:31 PST
Created attachment 77278 [details]
Patch
Comment 4 Adrienne Walker 2010-12-23 10:21:13 PST
Created attachment 77342 [details]
Patch
Comment 5 WebKit Review Bot 2010-12-23 10:40:41 PST
Attachment 77342 [details] did not build on mac:
Build output: http://queues.webkit.org/results/7210140
Comment 6 Kenneth Russell 2010-12-23 17:10:24 PST
Comment on attachment 77342 [details]
Patch

Can you look into the Mac build failure?
Comment 7 Adrienne Walker 2010-12-23 17:32:56 PST
(In reply to comment #6)
> (From update of attachment 77342 [details])
> Can you look into the Mac build failure?

Will do.
Comment 8 Adrienne Walker 2010-12-28 13:38:09 PST
Created attachment 77574 [details]
Patch
Comment 9 Darin Adler 2010-12-29 17:51:06 PST
Comment on attachment 77574 [details]
Patch

Really strange to have all this Chromium-specific stuff. An IDL file with Chromium in its name? Is this really platform-specific?
Comment 10 Adrienne Walker 2011-01-04 10:21:24 PST
(In reply to comment #9)
> (From update of attachment 77574 [details])
> Really strange to have all this Chromium-specific stuff. An IDL file with Chromium in its name? Is this really platform-specific?

No, it's not.  This patch implements a WebGL extension that is not necessarily browser-specific.  There are really two issues here:

1) What to call the WebGL extension (currently CHROMIUM_lose_context).
2) What to call the class that implements it (currently ChromiumLoseContext).

Chris Marrin suggested CHROMIUM_lose_context as an extension name on the public_webgl mailing list, so I went with that.  I named the class analogously to how the existing OESTextureFloat class is named, as that seemed like a reasonable approach.  So, that's how this patch ended up with a Chromium-named idl file.

I don't feel very strongly about what this extension should be named.  Thoughts from anybody else?
Comment 11 Kenneth Russell 2011-01-04 11:05:21 PST
(In reply to comment #10)
> I don't feel very strongly about what this extension should be named.  Thoughts from anybody else?

After some thought, since the extension will implicitly be supported in both Safari and Chromium, perhaps it should be called WEBKIT_lose_context. The primary disagreement on the WebGL mailing list was over making this an "official" extension with the WEBGL_ prefix.
Comment 12 Adrienne Walker 2011-01-04 14:20:23 PST
(In reply to comment #11)
> (In reply to comment #10)
> > I don't feel very strongly about what this extension should be named.  Thoughts from anybody else?
> 
> After some thought, since the extension will implicitly be supported in both Safari and Chromium, perhaps it should be called WEBKIT_lose_context. The primary disagreement on the WebGL mailing list was over making this an "official" extension with the WEBGL_ prefix.

That sounds great to me.
Comment 13 Adrienne Walker 2011-01-05 17:04:34 PST
Created attachment 78071 [details]
Patch
Comment 14 Adrienne Walker 2011-01-05 17:08:14 PST
Created attachment 78074 [details]
Patch
Comment 15 Kenneth Russell 2011-01-06 13:00:32 PST
Comment on attachment 78074 [details]
Patch

Looks great. This will improve testability a great deal.
Comment 16 Adrienne Walker 2011-01-07 13:41:49 PST
Committed r75271: <http://trac.webkit.org/changeset/75271>