[webkit-changes] [WebKit/WebKit] 3dfb58: [Cocoa] Small canvases, which aren't supposed to g...

Myles C. Maxfield noreply at github.com
Tue Jul 18 11:28:59 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3dfb58beb2151d8039d5e56f6ddccddc9cd9d1ce
      https://github.com/WebKit/WebKit/commit/3dfb58beb2151d8039d5e56f6ddccddc9cd9d1ce
  Author: Myles C. Maxfield <mmaxfield at apple.com>
  Date:   2023-07-18 (Tue, 18 Jul 2023)

  Changed paths:
    A LayoutTests/compositing/canvas/accelerated-small-canvas-compositing-expected.txt
    A LayoutTests/compositing/canvas/accelerated-small-canvas-compositing.html
    A LayoutTests/platform/gtk/compositing/canvas/accelerated-small-canvas-compositing-expected.txt
    A LayoutTests/platform/ios/compositing/canvas/accelerated-small-canvas-compositing-expected.txt
    M Source/WebCore/rendering/RenderLayerCompositor.cpp

  Log Message:
  -----------
  [Cocoa] Small canvases, which aren't supposed to get compositing layers, get compositing layers if they have a 3D-but-could-be-2D transform
https://bugs.webkit.org/show_bug.cgi?id=259297
rdar://112439265

Reviewed by Simon Fraser.

We already have existing code which will avoid compositing small canvases. However, if
the small canvas has a 3D-but-could-be-2D transform, we'll composite it regardless. This
patch extends the current logic to not composite small canvases in this case.

This patch causes a 41% - 48% progression on the Images subtest in MotionMark. Layers
have cost, y'all.

* LayoutTests/compositing/canvas/accelerated-small-canvas-compositing-expected.txt
* LayoutTests/compositing/canvas/accelerated-small-canvas-compositing.html
* Source/WebCore/rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForTransform const): This patch doesn't
modify m_compositingPolicy, because that's global for the whole RenderLayerCompositor. We
only want to change the policy in this specific case.

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




More information about the webkit-changes mailing list