Bug 220099

Summary: Use an enum class to identify WebGL versions
Product: WebKit Reporter: Dean Jackson <dino>
Component: New BugsAssignee: Dean Jackson <dino>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, changseok, cmarcelo, esprehn+autocc, ews-watchlist, graouts, gyuyoung.kim, kbr, kondapallykalyan, luiz, sam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
kbr: review+, ews-feeder: commit-queue-
EWS test
ews-feeder: commit-queue-
EWS test 2
ews-feeder: commit-queue-
EWS test 3
ews-feeder: commit-queue-
EWS test 4
ews-feeder: commit-queue-
EWS test 5
ews-feeder: commit-queue-
EWS test 6 ews-feeder: commit-queue-

Description Dean Jackson 2020-12-22 12:35:34 PST
Use an enum class to identify WebGL versions
Comment 1 Radar WebKit Bug Importer 2020-12-22 12:36:13 PST
<rdar://problem/72596828>
Comment 2 Dean Jackson 2020-12-22 12:40:11 PST
Created attachment 416681 [details]
Patch
Comment 3 Kenneth Russell 2020-12-22 12:44:53 PST
Comment on attachment 416681 [details]
Patch

Looks good to me. r+
Comment 4 Sam Weinig 2020-12-22 12:48:28 PST
Comment on attachment 416681 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=416681&action=review

r=me

Out of interest, why does the platform level GraphicsContext need to know which version of WebGL is being used?

> Source/WebCore/html/HTMLCanvasElement.cpp:338
> +        return getContextWebGL(HTMLCanvasElement::toWebGLVersion (type));

Looks like you have an extra space here.
Comment 5 Dean Jackson 2020-12-22 13:18:44 PST
Comment on attachment 416681 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=416681&action=review

>> Source/WebCore/html/HTMLCanvasElement.cpp:338
>> +        return getContextWebGL(HTMLCanvasElement::toWebGLVersion (type));
> 
> Looks like you have an extra space here.

Fixed.
Comment 6 Dean Jackson 2020-12-22 13:20:02 PST
(In reply to Sam Weinig from comment #4)
> Comment on attachment 416681 [details]

> Out of interest, why does the platform level GraphicsContext need to know
> which version of WebGL is being used?

There are a number of places in the GL API that differ between GLES 2 and 3, or rather need to do different things based on the underlying API. I guess this flag should reflect that rather than WebGL versions.
Comment 7 Dean Jackson 2020-12-22 13:25:19 PST
Created attachment 416685 [details]
EWS test
Comment 8 Dean Jackson 2020-12-22 13:30:25 PST
Created attachment 416686 [details]
EWS test 2
Comment 9 Dean Jackson 2020-12-22 13:35:56 PST
Created attachment 416688 [details]
EWS test 3
Comment 10 Dean Jackson 2020-12-22 13:43:43 PST
Created attachment 416690 [details]
EWS test 4
Comment 11 Dean Jackson 2020-12-22 13:46:26 PST
Not my day with the non-Apple ports :)
Comment 12 Dean Jackson 2020-12-22 13:48:57 PST
Created attachment 416691 [details]
EWS test 5
Comment 13 Dean Jackson 2020-12-22 14:03:28 PST
Created attachment 416693 [details]
EWS test 6
Comment 14 Dean Jackson 2020-12-22 14:38:26 PST
Committed r271065: <https://trac.webkit.org/changeset/271065>