Bug 229402

Summary: WebGL calls into static GraphicsContextGLOpenGL functions needlessly
Product: WebKit Reporter: Kimmo Kinnunen <kkinnunen>
Component: WebGLAssignee: Kimmo Kinnunen <kkinnunen>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, changseok, dino, esprehn+autocc, ews-watchlist, gyuyoung.kim, kbr, kkinnunen, kondapallykalyan, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 229404    
Attachments:
Description Flags
Patch
none
Patch
ews-feeder: commit-queue-
Patch
none
Patch for landing none

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>