[webkit-reviews] review granted: [Bug 223511] GraphicsContextGLOpenGL should avoid calling into ANGLE MakeCurrent : [Attachment 423726] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 19 12:10:46 PDT 2021


Kenneth Russell <kbr at google.com> has granted Kimmo Kinnunen
<kkinnunen at apple.com>'s request for review:
Bug 223511: GraphicsContextGLOpenGL should avoid calling into ANGLE MakeCurrent
https://bugs.webkit.org/show_bug.cgi?id=223511

Attachment 423726: Patch

https://bugs.webkit.org/attachment.cgi?id=423726&action=review




--- Comment #6 from Kenneth Russell <kbr at google.com> ---
Comment on attachment 423726
  --> https://bugs.webkit.org/attachment.cgi?id=423726
Patch

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

I agree with Simon that it's unfortunate this optimization is needed. Would you
consider reaching out to the ANGLE developers on Slack to see whether we can
instead optimize ANGLE's EGL_MakeCurrent? Maybe we can instead optimize its
global lock management and/or thread-local variables using cheaper intrinsics
to maintain complete correctness and still get a good speed boost.

Regardless, setting r+ to unblock you since this is a significant performance
increase.

Also - agree that moving to using ANGLE's explicit context entry points would
be great, and probably a big win.

> Source/WebCore/platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:49
> +static GraphicsContextGLOpenGL* currentContext;

As soon as WebKit supports rendering to OffscreenCanvas from web workers, this
optimization will break. Are you sure you want to go in this direction? At
least I think it would be worth filing a bug and adding a FIXME or similar
about it.


More information about the webkit-reviews mailing list