Bug 229402 - WebGL calls into static GraphicsContextGLOpenGL functions needlessly
Summary: WebGL calls into static GraphicsContextGLOpenGL functions needlessly
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kimmo Kinnunen
URL:
Keywords: InRadar
Depends on:
Blocks: webglcleanup
  Show dependency treegraph
 
Reported: 2021-08-23 03:24 PDT by Kimmo Kinnunen
Modified: 2021-08-26 05:47 PDT (History)
10 users (show)

See Also:


Attachments
Patch (30.02 KB, patch)
2021-08-23 03:29 PDT, Kimmo Kinnunen
no flags Details | Formatted Diff | Diff
Patch (33.60 KB, patch)
2021-08-23 04:28 PDT, Kimmo Kinnunen
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (33.49 KB, patch)
2021-08-23 04:31 PDT, Kimmo Kinnunen
no flags Details | Formatted Diff | Diff
Patch for landing (33.76 KB, patch)
2021-08-25 00:19 PDT, Kimmo Kinnunen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kimmo Kinnunen 2021-08-23 03:24:05 PDT
WebGL calls into static GraphicsContextGLOpenGL functions needlessly

The calls are problematic:
* No other call sites than WebGL layer 
* The functionality is not needed for ANGLE, but present
* GraphicsContextGL is now an interface with multiple implementations, GraphicsContextGLOpenGL is just one implementation
Comment 1 Kimmo Kinnunen 2021-08-23 03:29:15 PDT
Created attachment 436178 [details]
Patch
Comment 2 Kimmo Kinnunen 2021-08-23 04:28:06 PDT
Created attachment 436184 [details]
Patch
Comment 3 Kimmo Kinnunen 2021-08-23 04:31:57 PDT
Created attachment 436185 [details]
Patch
Comment 4 Kenneth Russell 2021-08-23 18:12:04 PDT
Comment on attachment 436185 [details]
Patch

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

Looks good in principle; I didn't look into the failures on the platforms not yet using ANGLE. Hopefully they won't be hard to figure out. r+

> Source/WebCore/html/canvas/WebGLFramebuffer.cpp:409
> +#endif

Now might be a good time to add comments to the #endifs like:

#endif // !USE(ANGLE)

because it's hard to see what it matches up with once these blocks span multiple lines of code.

> Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:639
>  #endif

Please consider commenting the #endifs to make them easier to read.
Comment 5 Kimmo Kinnunen 2021-08-25 00:19:10 PDT
Created attachment 436373 [details]
Patch for landing
Comment 6 EWS 2021-08-26 05:46:04 PDT
Committed r281621 (240977@main): <https://commits.webkit.org/240977@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 436373 [details].
Comment 7 Radar WebKit Bug Importer 2021-08-26 05:47:16 PDT
<rdar://problem/82385595>