Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Big drop in canvas performance above 3840px #18080

Commits on Sep 26, 2023

  1. Big drop in canvas performance above 3840px

    https://bugs.webkit.org/show_bug.cgi?id=236173
    rdar://88536159
    
    Reviewed by Simon Fraser.
    
    Limiting the accelerted canvas 2d context to arbitrary 5120*2880 is
    not useful. The performance difference gets more beneficial to
    hardware rasterization the higher the resolution.
    
    The limit did not protect against hitting hardware rasterization
    limits, since the limits are always per dimension, not per area.
    
    As per above, capping based on any upper limit is not useful. Thus
    remove the upper limit.
    
    Reuse the unused lower limit as the trigger. The lower limit is
    justified, as very small areas might be useful to rasterize with CPU.
    Start the limit at 0, to match the previous behavior.
    
    The hardware acceleration limits are checked in the respective
    ImageBufferBackends, e.g. ImageBufferIOSurfaceBackend::calculateSafeSize.
    This is done in WP for both GPUP mode and in-process mode. Both will
    fall back to Unaccelerated.
    
    Changes the RemoteRenderingBackend::createImageBuffer() to use
    buffer options instead of rendering mode. The the buffer
    options may be honored, but rendering mode would imply that it must
    be honored. Later on when the rendering mode is more policy based on
    rendering purpose, this is more clear.
    
    * LayoutTests/compositing/canvas/accelerated-canvas-compositing-size-limit-expected.txt:
    * LayoutTests/compositing/canvas/accelerated-canvas-compositing-size-limit.html:
    * LayoutTests/compositing/canvas/accelerated-small-canvas-compositing-expected.txt: Removed.
    * LayoutTests/compositing/canvas/accelerated-small-canvas-compositing.html: Removed.
    * LayoutTests/fast/canvas/image-buffer-backend-variants-expected.txt:
    * LayoutTests/platform/ios/compositing/canvas/accelerated-canvas-compositing-size-limit-expected.txt: Removed.
    * LayoutTests/platform/ios/fast/canvas/image-buffer-backend-variants-expected.txt:
    * LayoutTests/platform/mac-wk1/compositing/canvas/accelerated-canvas-compositing-size-limit-expected.txt: Added.
    * LayoutTests/platform/mac-wk1/fast/canvas/image-buffer-backend-variants-expected.txt:
    * LayoutTests/platform/mac-wk2/TestExpectations:
    * LayoutTests/platform/mac-wk2/compositing/canvas/accelerated-canvas-compositing-size-limit-expected.txt: Removed.
    * LayoutTests/platform/wincairo/TestExpectations:
    * Source/WebCore/html/CanvasBase.cpp:
    (WebCore::CanvasBase::shouldAccelerate const):
    (WebCore::CanvasBase::allocateImageBuffer const):
    * Source/WebCore/html/CanvasBase.h:
    * Source/WebCore/page/Settings.yaml:
    
    Canonical link: https://commits.webkit.org/268440@main
    kkinnunen-apple committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    45446c5 View commit details
    Browse the repository at this point in the history