Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fe47548b9528d184af449c5e744b0e291533b2df
      
https://github.com/WebKit/WebKit/commit/fe47548b9528d184af449c5e744b0e291533b2df
  Author: Nikolas Zimmermann <[email protected]>
  Date:   2026-08-03 (Mon, 03 Aug 2026)

  Changed paths:
    M Source/WebCore/rendering/svg/RenderSVGContainer.cpp
    M Source/WebCore/rendering/svg/RenderSVGModelObject.h

  Log Message:
  -----------
  [LBSE] Skip per-frame visual-overflow recompute in RenderSVGContainer paint 
cull
https://bugs.webkit.org/show_bug.cgi?id=320814

Reviewed by Rob Buis.

The container paint cull compared the dirty rect against
visualOverflowRectEquivalent(), which recomputes the cached visual
overflow on a miss by unioning all descendant bounds. That cache is
invalidated whenever any descendant changes its transform, so for
container leafs that have their transform changed, the union was
recomputed every frame - O(descendants) of overhead for content
that rarely culls anyway.

Add cachedVisualOverflowRectIfAvailable(), which peeks at the cached rect
without computing it on a miss, and only run the cull when the rect is
already cached.

Covered by existing tests.

* Source/WebCore/rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::paint):
* Source/WebCore/rendering/svg/RenderSVGModelObject.h:
(WebCore::RenderSVGModelObject::cachedVisualOverflowRectIfAvailable const):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to