WebKit Bugzilla
Attachment 370652 Details for
Bug 198257
: Add a GraphicsLayer::Type for ScrolledContents
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198257-20190526113602.patch (text/plain), 5.49 KB, created by
Simon Fraser (smfr)
on 2019-05-26 11:36:03 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Simon Fraser (smfr)
Created:
2019-05-26 11:36:03 PDT
Size:
5.49 KB
patch
obsolete
>Subversion Revision: 245777 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 2e4050f12c74535c53373175ecfb84a01845ece8..58b626e1334995a0e091bc87e50503af5649cc59 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,25 @@ >+2019-05-26 Simon Fraser <simon.fraser@apple.com> >+ >+ Add a GraphicsLayer::Type for ScrolledContents >+ https://bugs.webkit.org/show_bug.cgi?id=198257 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This ScrolledContents layer type will be used to choose different tiling behaviors >+ in a future patch. >+ >+ * platform/graphics/GraphicsLayer.cpp: >+ (WebCore::GraphicsLayer::supportsLayerType): >+ * platform/graphics/GraphicsLayer.h: >+ * platform/graphics/ca/GraphicsLayerCA.cpp: >+ (WebCore::GraphicsLayer::supportsLayerType): >+ (WebCore::GraphicsLayerCA::initialize): >+ (WebCore::GraphicsLayerCA::adjustCoverageRect const): >+ * rendering/RenderLayerBacking.cpp: >+ (WebCore::RenderLayerBacking::updateScrollingLayers): >+ * rendering/RenderLayerCompositor.cpp: >+ (WebCore::RenderLayerCompositor::ensureRootLayer): >+ > 2019-05-25 Zalan Bujtas <zalan@apple.com> > > [LFC][IFC] Introduce DisplayRun to display tree >diff --git a/Source/WebCore/platform/graphics/GraphicsLayer.cpp b/Source/WebCore/platform/graphics/GraphicsLayer.cpp >index 2500fd462f040de4787dc5ce648c95bbcb186c42..7342e44b4f2523d99664574d6cd5aeea9c2d1295 100644 >--- a/Source/WebCore/platform/graphics/GraphicsLayer.cpp >+++ b/Source/WebCore/platform/graphics/GraphicsLayer.cpp >@@ -79,6 +79,7 @@ bool GraphicsLayer::supportsLayerType(Type type) > case Type::Normal: > case Type::PageTiledBacking: > case Type::ScrollContainer: >+ case Type::ScrolledContents: > return true; > case Type::Shape: > return false; >diff --git a/Source/WebCore/platform/graphics/GraphicsLayer.h b/Source/WebCore/platform/graphics/GraphicsLayer.h >index de3cf58c8a7bad1aebd5fc95b82b66bd639f93d2..7e16d9e51fd2c9122c69283e333c9fac26f26b31 100644 >--- a/Source/WebCore/platform/graphics/GraphicsLayer.h >+++ b/Source/WebCore/platform/graphics/GraphicsLayer.h >@@ -240,6 +240,7 @@ public: > Normal, > PageTiledBacking, > ScrollContainer, >+ ScrolledContents, > Shape > }; > >diff --git a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp >index 90c803c261713f6e042359d8eafbefcc6f87cfeb..fbe4c357924a0a616db2e3da2048fcc5f4234dec 100644 >--- a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp >+++ b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp >@@ -304,6 +304,7 @@ bool GraphicsLayer::supportsLayerType(Type type) > case Type::Normal: > case Type::PageTiledBacking: > case Type::ScrollContainer: >+ case Type::ScrolledContents: > return true; > case Type::Shape: > #if PLATFORM(COCOA) >@@ -415,6 +416,7 @@ void GraphicsLayerCA::initialize(Type layerType) > PlatformCALayer::LayerType platformLayerType; > switch (layerType) { > case Type::Normal: >+ case Type::ScrolledContents: > platformLayerType = PlatformCALayer::LayerType::LayerTypeWebLayer; > break; > case Type::PageTiledBacking: >@@ -1448,6 +1450,7 @@ bool GraphicsLayerCA::adjustCoverageRect(VisibleAndCoverageRects& rects, const F > tiledBacking()->adjustTileCoverageRect(coverageRect, size(), oldVisibleRect, rects.visibleRect, pageScaleFactor() * deviceScaleFactor()); > break; > case Type::Normal: >+ case Type::ScrolledContents: > if (m_layer->layerType() == PlatformCALayer::LayerTypeTiledBackingLayer) > coverageRect.unite(adjustTiledLayerVisibleRect(tiledBacking(), oldVisibleRect, rects.visibleRect, m_sizeAtLastCoverageRectUpdate, m_size)); > break; >diff --git a/Source/WebCore/rendering/RenderLayerBacking.cpp b/Source/WebCore/rendering/RenderLayerBacking.cpp >index c9a9a3b703b40a584d9abc4686a27702dbbfe535..4b46e8cb0d76a055e9138837e01e813d3c9001dd 100644 >--- a/Source/WebCore/rendering/RenderLayerBacking.cpp >+++ b/Source/WebCore/rendering/RenderLayerBacking.cpp >@@ -1825,7 +1825,7 @@ bool RenderLayerBacking::updateScrollingLayers(bool needsScrollingLayers) > m_scrollContainerLayer->setMasksToBounds(true); > > // Inner layer which renders the content that scrolls. >- m_scrolledContentsLayer = createGraphicsLayer("scrolled contents"); >+ m_scrolledContentsLayer = createGraphicsLayer("scrolled contents", GraphicsLayer::Type::ScrolledContents); > m_scrolledContentsLayer->setDrawsContent(true); > m_scrolledContentsLayer->setAnchorPoint({ }); > >diff --git a/Source/WebCore/rendering/RenderLayerCompositor.cpp b/Source/WebCore/rendering/RenderLayerCompositor.cpp >index f6d258a7e645850741fda2c932134f173371959a..663362abc6071cb3a69b523ab86c8c60d2c5a566 100644 >--- a/Source/WebCore/rendering/RenderLayerCompositor.cpp >+++ b/Source/WebCore/rendering/RenderLayerCompositor.cpp >@@ -3783,7 +3783,7 @@ void RenderLayerCompositor::ensureRootLayer() > m_overflowControlsHostLayer = GraphicsLayer::create(graphicsLayerFactory(), *this); > m_overflowControlsHostLayer->setName("overflow controls host"); > >- m_scrolledContentsLayer = GraphicsLayer::create(graphicsLayerFactory(), *this); >+ m_scrolledContentsLayer = GraphicsLayer::create(graphicsLayerFactory(), *this, GraphicsLayer::Type::ScrolledContents); > m_scrolledContentsLayer->setName("scrolled contents"); > m_scrolledContentsLayer->setAnchorPoint({ }); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198257
: 370652