Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: cedef1fc1b6dbbc88693b053b1079c32d92acdad
      
https://github.com/WebKit/WebKit/commit/cedef1fc1b6dbbc88693b053b1079c32d92acdad
  Author: Matt Woodrow <[email protected]>
  Date:   2024-07-17 (Wed, 17 Jul 2024)

  Changed paths:
    M 
LayoutTests/tiled-drawing/scrolling/overflow/overflow-tile-coverage-expected.txt
    M Source/WebCore/platform/graphics/GraphicsLayer.cpp
    M Source/WebCore/platform/graphics/GraphicsLayer.h
    M Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
    M Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
    M Source/WebCore/rendering/RenderLayerBacking.cpp

  Log Message:
  -----------
  Making a layer tiled generates repaints for two rendering updates.
https://bugs.webkit.org/show_bug.cgi?id=276691
<rdar://131877728>

Reviewed by Simon Fraser.

One issue is that RenderLayerBacking tries to call setTileCoverage on the
tile controller, but this is an implementation detail of GraphicsLayerCA and
isn't created until the graphics layer flush. This again works on the successive
rendering update, and we start to create extra tiles for the scrollable area.

This is fixed by setting the desired coverage on the GraphicsLayer itself, and
letting that propagate it to any lazily created tile controllers.

A second issue is that GraphicsLayerCA flushing computes the coverage rects for
the layer (which take into account tiling state) before it computes if a tiled
layer is needed. This again needs two passes before it converges on the required
answer.

This is fixed by moving the call to changeLayerTypeTo up so that it happens
before computing coverage rects.

Reviewed previously by Simon as a subset of bug 276465.

* 
LayoutTests/tiled-drawing/scrolling/overflow/overflow-tile-coverage-expected.txt:
* Source/WebCore/platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::setTileCoverage):
* Source/WebCore/platform/graphics/GraphicsLayer.h:
* Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly):
(WebCore::GraphicsLayerCA::recursiveCommitChanges):
(WebCore::GraphicsLayerCA::commitLayerTypeChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::setTileCoverage):
(WebCore::GraphicsLayerCA::changeLayerTypeTo):
* Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h:
* Source/WebCore/rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::adjustTiledBackingCoverage):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to