Bug 220099 - Use an enum class to identify WebGL versions
Summary: Use an enum class to identify WebGL versions
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dean Jackson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-12-22 12:35 PST by Dean Jackson
Modified: 2020-12-22 14:56 PST (History)
12 users (show)

See Also:


Attachments
Patch (14.84 KB, patch)
2020-12-22 12:40 PST, Dean Jackson
kbr: review+
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
EWS test (15.62 KB, patch)
2020-12-22 13:25 PST, Dean Jackson
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
EWS test 2 (16.98 KB, patch)
2020-12-22 13:30 PST, Dean Jackson
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
EWS test 3 (18.48 KB, patch)
2020-12-22 13:35 PST, Dean Jackson
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
EWS test 4 (18.83 KB, patch)
2020-12-22 13:43 PST, Dean Jackson
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
EWS test 5 (19.00 KB, patch)
2020-12-22 13:48 PST, Dean Jackson
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
EWS test 6 (19.10 KB, patch)
2020-12-22 14:03 PST, Dean Jackson
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>