[webkit-changes] [WebKit/WebKit] 5bafe4: Debug webgl/2.0.y/conformance2/state/gl-object-get...

Kimmo Kinnunen noreply at github.com
Tue Mar 7 22:35:08 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5bafe4c47632b71279c3998ddb0721a5c2712923
      https://github.com/WebKit/WebKit/commit/5bafe4c47632b71279c3998ddb0721a5c2712923
  Author: Kimmo Kinnunen <kkinnunen at apple.com>
  Date:   2023-03-07 (Tue, 07 Mar 2023)

  Changed paths:
    M Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
    M Source/WebCore/html/canvas/WebGLRenderingContextBase.h

  Log Message:
  -----------
  Debug webgl/2.0.y/conformance2/state/gl-object-get-calls.html is slow because synthetic errors construct many strings
https://bugs.webkit.org/show_bug.cgi?id=253497
rdar://106352552

Reviewed by Simon Fraser.

Avoid using makeString for WebGL synthetic errors in case the
error string is not going to be printed to the console.
This improves runtime of Debug gl-object-get-calls.html  from 24s
to 14s on MBP Pro Max.

Fix by not calling the printToConsole function that takes the message
unless the print happens. Also try to move the message into the
ConsoleMessage, in anticipation that ConsoleMessage could accept
rvalue reference of the message sometime in the future.

* Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::shouldPrintToConsole const):
(WebCore::WebGLRenderingContextBase::printToConsole):
(WebCore::WebGLRenderingContextBase::synthesizeGLError):
(WebCore::WebGLRenderingContextBase::synthesizeLostContextGLError):
(WebCore::WebGLRenderingContextBase::recycleContext):
* Source/WebCore/html/canvas/WebGLRenderingContextBase.h:

Canonical link: https://commits.webkit.org/261362@main




More information about the webkit-changes mailing list