WebKit Bugzilla
Attachment 371014 Details for
Bug 198404
: Use an OptionSet<> for GraphicsLayerPaintingPhase
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198404-20190530185350.patch (text/plain), 25.39 KB, created by
Simon Fraser (smfr)
on 2019-05-30 18:53:51 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Simon Fraser (smfr)
Created:
2019-05-30 18:53:51 PDT
Size:
25.39 KB
patch
obsolete
>Subversion Revision: 245906 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 25f91879632da76946012c996e6c50681289fd6a..acaa0acde8e1822f5e3e94243b16546d9c60c9db 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,43 @@ >+2019-05-30 Simon Fraser <simon.fraser@apple.com> >+ >+ Use an OptionSet<> for GraphicsLayerPaintingPhase >+ https://bugs.webkit.org/show_bug.cgi?id=198404 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Replace GraphicsLayerPaintingPhase with OptionSet<GraphicsLayerPaintingPhase>. >+ >+ No behavior change. >+ >+ * page/PageOverlayController.cpp: >+ (WebCore::PageOverlayController::setPageOverlayNeedsDisplay): >+ (WebCore::PageOverlayController::paintContents): >+ (WebCore::PageOverlayController::notifyFlushRequired): >+ * page/PageOverlayController.h: >+ * page/mac/ServicesOverlayController.h: >+ * page/mac/ServicesOverlayController.mm: >+ (WebCore::ServicesOverlayController::Highlight::paintContents): >+ * platform/graphics/GraphicsLayer.cpp: >+ (WebCore::GraphicsLayer::dumpProperties const): >+ * platform/graphics/GraphicsLayer.h: >+ (WebCore::GraphicsLayer::paintingPhase const): >+ (WebCore::GraphicsLayer::setPaintingPhase): >+ * platform/graphics/GraphicsLayerClient.h: >+ (WebCore::GraphicsLayerClient::paintContents): >+ * rendering/RenderLayerBacking.cpp: >+ (WebCore::RenderLayerBacking::updateForegroundLayer): >+ (WebCore::RenderLayerBacking::updateBackgroundLayer): >+ (WebCore::RenderLayerBacking::updateMaskingLayer): >+ (WebCore::RenderLayerBacking::updateChildClippingStrategy): >+ (WebCore::RenderLayerBacking::updateScrollingLayers): >+ (WebCore::RenderLayerBacking::paintingPhaseForPrimaryLayer const): >+ (WebCore::RenderLayerBacking::paintIntoLayer): >+ (WebCore::RenderLayerBacking::paintContents): >+ * rendering/RenderLayerBacking.h: >+ * rendering/RenderLayerCompositor.cpp: >+ (WebCore::RenderLayerCompositor::paintContents): >+ * rendering/RenderLayerCompositor.h: >+ > 2019-05-30 Justin Fan <justin_fan@apple.com> > > [Web GPU] Vertex Buffers/Input State API updates >diff --git a/Source/WebCore/page/PageOverlayController.cpp b/Source/WebCore/page/PageOverlayController.cpp >index c5bdb823fa75fa1bca61ed7491185894d2c5ad2b..0c03315a8dea987b653c03caf57c4881ec8d0666 100644 >--- a/Source/WebCore/page/PageOverlayController.cpp >+++ b/Source/WebCore/page/PageOverlayController.cpp >@@ -250,7 +250,7 @@ void PageOverlayController::updateForceSynchronousScrollLayerPositionUpdates() > #endif > } > >-void PageOverlayController::setPageOverlayNeedsDisplay(PageOverlay& overlay, const WebCore::IntRect& dirtyRect) >+void PageOverlayController::setPageOverlayNeedsDisplay(PageOverlay& overlay, const IntRect& dirtyRect) > { > ASSERT(m_pageOverlays.contains(&overlay)); > auto* graphicsLayer = m_overlayGraphicsLayers.get(&overlay); >@@ -391,7 +391,7 @@ Vector<String> PageOverlayController::copyAccessibilityAttributesNames(bool para > return { }; > } > >-void PageOverlayController::paintContents(const WebCore::GraphicsLayer* graphicsLayer, WebCore::GraphicsContext& graphicsContext, WebCore::GraphicsLayerPaintingPhase, const WebCore::FloatRect& clipRect, GraphicsLayerPaintBehavior) >+void PageOverlayController::paintContents(const GraphicsLayer* graphicsLayer, GraphicsContext& graphicsContext, OptionSet<GraphicsLayerPaintingPhase>, const FloatRect& clipRect, GraphicsLayerPaintBehavior) > { > for (auto& overlayAndGraphicsLayer : m_overlayGraphicsLayers) { > if (overlayAndGraphicsLayer.value.ptr() != graphicsLayer) >@@ -410,7 +410,7 @@ float PageOverlayController::deviceScaleFactor() const > return m_page.deviceScaleFactor(); > } > >-void PageOverlayController::notifyFlushRequired(const WebCore::GraphicsLayer*) >+void PageOverlayController::notifyFlushRequired(const GraphicsLayer*) > { > m_page.renderingUpdateScheduler().scheduleRenderingUpdate(); > } >diff --git a/Source/WebCore/page/PageOverlayController.h b/Source/WebCore/page/PageOverlayController.h >index 827b7a1043228fc560b53f29fb281735f36fd667..64e90e2c471cb3e8eba664a27433b4e390fa1fb7 100644 >--- a/Source/WebCore/page/PageOverlayController.h >+++ b/Source/WebCore/page/PageOverlayController.h >@@ -93,7 +93,7 @@ private: > > // GraphicsLayerClient > void notifyFlushRequired(const GraphicsLayer*) override; >- void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const FloatRect& clipRect, GraphicsLayerPaintBehavior) override; >+ void paintContents(const GraphicsLayer*, GraphicsContext&, OptionSet<GraphicsLayerPaintingPhase>, const FloatRect& clipRect, GraphicsLayerPaintBehavior) override; > float deviceScaleFactor() const override; > bool shouldSkipLayerInDump(const GraphicsLayer*, LayerTreeAsTextBehavior) const override; > void tiledBackingUsageChanged(const GraphicsLayer*, bool) override; >diff --git a/Source/WebCore/page/mac/ServicesOverlayController.h b/Source/WebCore/page/mac/ServicesOverlayController.h >index 8f8a5fb443eb23e4a3c7f9a8abe7a2a0f45f1893..2c01698d9df05bc74ecbd4d358e8d4a1001ab773 100644 >--- a/Source/WebCore/page/mac/ServicesOverlayController.h >+++ b/Source/WebCore/page/mac/ServicesOverlayController.h >@@ -82,7 +82,7 @@ private: > > // GraphicsLayerClient > void notifyFlushRequired(const GraphicsLayer*) override; >- void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const FloatRect& inClip, GraphicsLayerPaintBehavior) override; >+ void paintContents(const GraphicsLayer*, GraphicsContext&, OptionSet<GraphicsLayerPaintingPhase>, const FloatRect& inClip, GraphicsLayerPaintBehavior) override; > float deviceScaleFactor() const override; > > void didFinishFadeOutAnimation(); >diff --git a/Source/WebCore/page/mac/ServicesOverlayController.mm b/Source/WebCore/page/mac/ServicesOverlayController.mm >index 93b24171b8539ff785f01dc7694935c2e3c566e1..22b65d9acfb9ed7ab3bf5a42545ce05a5b7981ae 100644 >--- a/Source/WebCore/page/mac/ServicesOverlayController.mm >+++ b/Source/WebCore/page/mac/ServicesOverlayController.mm >@@ -124,7 +124,7 @@ void ServicesOverlayController::Highlight::notifyFlushRequired(const GraphicsLay > m_controller->page().renderingUpdateScheduler().scheduleRenderingUpdate(); > } > >-void ServicesOverlayController::Highlight::paintContents(const GraphicsLayer*, GraphicsContext& graphicsContext, GraphicsLayerPaintingPhase, const FloatRect&, GraphicsLayerPaintBehavior) >+void ServicesOverlayController::Highlight::paintContents(const GraphicsLayer*, GraphicsContext& graphicsContext, OptionSet<GraphicsLayerPaintingPhase>, const FloatRect&, GraphicsLayerPaintBehavior) > { > if (!DataDetectorsLibrary()) > return; >diff --git a/Source/WebCore/platform/graphics/GraphicsLayer.cpp b/Source/WebCore/platform/graphics/GraphicsLayer.cpp >index 7342e44b4f2523d99664574d6cd5aeea9c2d1295..5568f4a86e334731a98f05a36ceb043dd8baa01a 100644 >--- a/Source/WebCore/platform/graphics/GraphicsLayer.cpp >+++ b/Source/WebCore/platform/graphics/GraphicsLayer.cpp >@@ -935,22 +935,22 @@ void GraphicsLayer::dumpProperties(TextStream& ts, LayerTreeAsTextBehavior behav > if (behavior & LayerTreeAsTextIncludePaintingPhases && paintingPhase()) { > ts << indent << "(paintingPhases\n"; > TextStream::IndentScope indentScope(ts); >- if (paintingPhase() & GraphicsLayerPaintBackground) >+ if (paintingPhase().contains(GraphicsLayerPaintingPhase::Background)) > ts << indent << "GraphicsLayerPaintBackground\n"; > >- if (paintingPhase() & GraphicsLayerPaintForeground) >+ if (paintingPhase().contains(GraphicsLayerPaintingPhase::Foreground)) > ts << indent << "GraphicsLayerPaintForeground\n"; > >- if (paintingPhase() & GraphicsLayerPaintMask) >+ if (paintingPhase().contains(GraphicsLayerPaintingPhase::Mask)) > ts << indent << "GraphicsLayerPaintMask\n"; > >- if (paintingPhase() & GraphicsLayerPaintChildClippingMask) >+ if (paintingPhase().contains(GraphicsLayerPaintingPhase::ChildClippingMask)) > ts << indent << "GraphicsLayerPaintChildClippingMask\n"; > >- if (paintingPhase() & GraphicsLayerPaintOverflowContents) >+ if (paintingPhase().contains(GraphicsLayerPaintingPhase::OverflowContents)) > ts << indent << "GraphicsLayerPaintOverflowContents\n"; > >- if (paintingPhase() & GraphicsLayerPaintCompositedScroll) >+ if (paintingPhase().contains(GraphicsLayerPaintingPhase::CompositedScroll)) > ts << indent << "GraphicsLayerPaintCompositedScroll\n"; > > ts << indent << ")\n"; >diff --git a/Source/WebCore/platform/graphics/GraphicsLayer.h b/Source/WebCore/platform/graphics/GraphicsLayer.h >index 7e16d9e51fd2c9122c69283e333c9fac26f26b31..e48434ed4c49801231e6cbdf3e8dd42816a1b36b 100644 >--- a/Source/WebCore/platform/graphics/GraphicsLayer.h >+++ b/Source/WebCore/platform/graphics/GraphicsLayer.h >@@ -414,8 +414,8 @@ public: > #endif > > // Some GraphicsLayers paint only the foreground or the background content >- GraphicsLayerPaintingPhase paintingPhase() const { return m_paintingPhase; } >- void setPaintingPhase(GraphicsLayerPaintingPhase phase) { m_paintingPhase = phase; } >+ OptionSet<GraphicsLayerPaintingPhase> paintingPhase() const { return m_paintingPhase; } >+ void setPaintingPhase(OptionSet<GraphicsLayerPaintingPhase> phase) { m_paintingPhase = phase; } > > enum ShouldClipToLayer { > DoNotClipToLayer, >@@ -691,7 +691,7 @@ protected: > > const Type m_type; > CustomAppearance m_customAppearance { CustomAppearance::None }; >- GraphicsLayerPaintingPhase m_paintingPhase { GraphicsLayerPaintAllWithOverflowClip }; >+ OptionSet<GraphicsLayerPaintingPhase> m_paintingPhase { GraphicsLayerPaintingPhase::Foreground, GraphicsLayerPaintingPhase::Background }; > CompositingCoordinatesOrientation m_contentsOrientation { CompositingCoordinatesOrientation::TopDown }; // affects orientation of layer contents > > bool m_beingDestroyed : 1; >diff --git a/Source/WebCore/platform/graphics/GraphicsLayerClient.h b/Source/WebCore/platform/graphics/GraphicsLayerClient.h >index 8672d0f4ab22dade0c909c4c53ac6ffd2ed74fd5..53fcb282df040ebcdc15e6174e5e0cd337645f90 100644 >--- a/Source/WebCore/platform/graphics/GraphicsLayerClient.h >+++ b/Source/WebCore/platform/graphics/GraphicsLayerClient.h >@@ -38,17 +38,15 @@ class IntPoint; > class IntRect; > class TransformationMatrix; > >-enum GraphicsLayerPaintingPhaseFlags { >- GraphicsLayerPaintBackground = 1 << 0, >- GraphicsLayerPaintForeground = 1 << 1, >- GraphicsLayerPaintMask = 1 << 2, >- GraphicsLayerPaintClipPath = 1 << 3, >- GraphicsLayerPaintOverflowContents = 1 << 4, >- GraphicsLayerPaintCompositedScroll = 1 << 5, >- GraphicsLayerPaintChildClippingMask = 1 << 6, >- GraphicsLayerPaintAllWithOverflowClip = GraphicsLayerPaintBackground | GraphicsLayerPaintForeground >+enum class GraphicsLayerPaintingPhase { >+ Background = 1 << 0, >+ Foreground = 1 << 1, >+ Mask = 1 << 2, >+ ClipPath = 1 << 3, >+ OverflowContents = 1 << 4, >+ CompositedScroll = 1 << 5, >+ ChildClippingMask = 1 << 6, > }; >-typedef uint8_t GraphicsLayerPaintingPhase; > > enum AnimatedPropertyID { > AnimatedPropertyInvalid, >@@ -102,7 +100,7 @@ public: > // Notification that this layer requires a flush before the next display refresh. > virtual void notifyFlushBeforeDisplayRefresh(const GraphicsLayer*) { } > >- virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const FloatRect& /* inClip */, GraphicsLayerPaintBehavior) { } >+ virtual void paintContents(const GraphicsLayer*, GraphicsContext&, OptionSet<GraphicsLayerPaintingPhase>, const FloatRect& /* inClip */, GraphicsLayerPaintBehavior) { } > virtual void didChangePlatformLayerForLayer(const GraphicsLayer*) { } > > // Provides current transform (taking transform-origin and animations into account). Input matrix has been >diff --git a/Source/WebCore/rendering/RenderLayerBacking.cpp b/Source/WebCore/rendering/RenderLayerBacking.cpp >index 048bee19cbb91af19dcee78384456e668b60f370..fcaf9c7c3ca746ab09f3233c18bd8a40e7ec0083 100644 >--- a/Source/WebCore/rendering/RenderLayerBacking.cpp >+++ b/Source/WebCore/rendering/RenderLayerBacking.cpp >@@ -1709,7 +1709,7 @@ bool RenderLayerBacking::updateForegroundLayer(bool needsForegroundLayer) > String layerName = m_owningLayer.name() + " (foreground)"; > m_foregroundLayer = createGraphicsLayer(layerName); > m_foregroundLayer->setDrawsContent(true); >- m_foregroundLayer->setPaintingPhase(GraphicsLayerPaintForeground); >+ m_foregroundLayer->setPaintingPhase({ GraphicsLayerPaintingPhase::Foreground }); > layerChanged = true; > } > } else if (m_foregroundLayer) { >@@ -1735,7 +1735,7 @@ bool RenderLayerBacking::updateBackgroundLayer(bool needsBackgroundLayer) > m_backgroundLayer = createGraphicsLayer(layerName); > m_backgroundLayer->setDrawsContent(true); > m_backgroundLayer->setAnchorPoint(FloatPoint3D()); >- m_backgroundLayer->setPaintingPhase(GraphicsLayerPaintBackground); >+ m_backgroundLayer->setPaintingPhase({ GraphicsLayerPaintingPhase::Background }); > layerChanged = true; > } > >@@ -1771,17 +1771,17 @@ void RenderLayerBacking::updateMaskingLayer(bool hasMask, bool hasClipPath) > { > bool layerChanged = false; > if (hasMask || hasClipPath) { >- GraphicsLayerPaintingPhase maskPhases = 0; >+ OptionSet<GraphicsLayerPaintingPhase> maskPhases; > if (hasMask) >- maskPhases = GraphicsLayerPaintMask; >+ maskPhases = GraphicsLayerPaintingPhase::Mask; > > if (hasClipPath) { > // If we have a mask, we need to paint the combined clip-path and mask into the mask layer. > if (hasMask || renderer().style().clipPath()->type() == ClipPathOperation::Reference || !GraphicsLayer::supportsLayerType(GraphicsLayer::Type::Shape)) >- maskPhases |= GraphicsLayerPaintClipPath; >+ maskPhases.add(GraphicsLayerPaintingPhase::ClipPath); > } > >- bool paintsContent = maskPhases; >+ bool paintsContent = !maskPhases.isEmpty(); > GraphicsLayer::Type requiredLayerType = paintsContent ? GraphicsLayer::Type::Normal : GraphicsLayer::Type::Shape; > if (m_maskLayer && m_maskLayer->type() != requiredLayerType) { > m_graphicsLayer->setMaskLayer(nullptr); >@@ -1825,7 +1825,7 @@ void RenderLayerBacking::updateChildClippingStrategy(bool needsDescendantsClippi > if (!m_childClippingMaskLayer) { > m_childClippingMaskLayer = createGraphicsLayer("child clipping mask"); > m_childClippingMaskLayer->setDrawsContent(true); >- m_childClippingMaskLayer->setPaintingPhase(GraphicsLayerPaintChildClippingMask); >+ m_childClippingMaskLayer->setPaintingPhase({ GraphicsLayerPaintingPhase::ChildClippingMask }); > clippingLayer()->setMaskLayer(m_childClippingMaskLayer.copyRef()); > } > } >@@ -1856,10 +1856,10 @@ bool RenderLayerBacking::updateScrollingLayers(bool needsScrollingLayers) > m_scrolledContentsLayer->setDrawsContent(true); > m_scrolledContentsLayer->setAnchorPoint({ }); > >- GraphicsLayerPaintingPhase paintPhase = GraphicsLayerPaintOverflowContents | GraphicsLayerPaintCompositedScroll; >+ OptionSet<GraphicsLayerPaintingPhase> paintPhases = { GraphicsLayerPaintingPhase::OverflowContents, GraphicsLayerPaintingPhase::CompositedScroll }; > if (!m_foregroundLayer) >- paintPhase |= GraphicsLayerPaintForeground; >- m_scrolledContentsLayer->setPaintingPhase(paintPhase); >+ paintPhases.add(GraphicsLayerPaintingPhase::Foreground); >+ m_scrolledContentsLayer->setPaintingPhase(paintPhases); > m_scrollContainerLayer->addChild(*m_scrolledContentsLayer); > } else { > compositor().willRemoveScrollingLayerWithBacking(m_owningLayer, *this); >@@ -1939,20 +1939,20 @@ void RenderLayerBacking::setIsScrollCoordinatedWithViewportConstrainedRole(bool > m_graphicsLayer->setIsViewportConstrained(viewportCoordinated); > } > >-GraphicsLayerPaintingPhase RenderLayerBacking::paintingPhaseForPrimaryLayer() const >+OptionSet<GraphicsLayerPaintingPhase> RenderLayerBacking::paintingPhaseForPrimaryLayer() const > { >- unsigned phase = 0; >+ OptionSet<GraphicsLayerPaintingPhase> phases; > if (!m_backgroundLayer) >- phase |= GraphicsLayerPaintBackground; >+ phases.add(GraphicsLayerPaintingPhase::Background); > if (!m_foregroundLayer) >- phase |= GraphicsLayerPaintForeground; >+ phases.add(GraphicsLayerPaintingPhase::Foreground); > > if (m_scrolledContentsLayer) { >- phase &= ~GraphicsLayerPaintForeground; >- phase |= GraphicsLayerPaintCompositedScroll; >+ phases.remove(GraphicsLayerPaintingPhase::Foreground); >+ phases.add(GraphicsLayerPaintingPhase::CompositedScroll); > } > >- return static_cast<GraphicsLayerPaintingPhase>(phase); >+ return phases; > } > > float RenderLayerBacking::compositingOpacity(float rendererOpacity) const >@@ -2646,9 +2646,9 @@ void RenderLayerBacking::setContentsNeedDisplayInRect(const LayoutRect& r, Graph > > void RenderLayerBacking::paintIntoLayer(const GraphicsLayer* graphicsLayer, GraphicsContext& context, > const IntRect& paintDirtyRect, // In the coords of rootLayer. >- OptionSet<PaintBehavior> paintBehavior, GraphicsLayerPaintingPhase paintingPhase) >+ OptionSet<PaintBehavior> paintBehavior, OptionSet<GraphicsLayerPaintingPhase> paintingPhase) > { >- if ((paintsIntoWindow() || paintsIntoCompositedAncestor()) && paintingPhase != GraphicsLayerPaintChildClippingMask) { >+ if ((paintsIntoWindow() || paintsIntoCompositedAncestor()) && paintingPhase != OptionSet<GraphicsLayerPaintingPhase>(GraphicsLayerPaintingPhase::ChildClippingMask)) { > #if !PLATFORM(IOS_FAMILY) && !OS(WINDOWS) > // FIXME: Looks like the CALayer tree is out of sync with the GraphicsLayer heirarchy > // when pages are restored from the PageCache. >@@ -2659,19 +2659,19 @@ void RenderLayerBacking::paintIntoLayer(const GraphicsLayer* graphicsLayer, Grap > } > > OptionSet<RenderLayer::PaintLayerFlag> paintFlags; >- if (paintingPhase & GraphicsLayerPaintBackground) >+ if (paintingPhase.contains(GraphicsLayerPaintingPhase::Background)) > paintFlags.add(RenderLayer::PaintLayerPaintingCompositingBackgroundPhase); >- if (paintingPhase & GraphicsLayerPaintForeground) >+ if (paintingPhase.contains(GraphicsLayerPaintingPhase::Foreground)) > paintFlags.add(RenderLayer::PaintLayerPaintingCompositingForegroundPhase); >- if (paintingPhase & GraphicsLayerPaintMask) >+ if (paintingPhase.contains(GraphicsLayerPaintingPhase::Mask)) > paintFlags.add(RenderLayer::PaintLayerPaintingCompositingMaskPhase); >- if (paintingPhase & GraphicsLayerPaintClipPath) >+ if (paintingPhase.contains(GraphicsLayerPaintingPhase::ClipPath)) > paintFlags.add(RenderLayer::PaintLayerPaintingCompositingClipPathPhase); >- if (paintingPhase & GraphicsLayerPaintChildClippingMask) >+ if (paintingPhase.contains(GraphicsLayerPaintingPhase::ChildClippingMask)) > paintFlags.add(RenderLayer::PaintLayerPaintingChildClippingMaskPhase); >- if (paintingPhase & GraphicsLayerPaintOverflowContents) >+ if (paintingPhase.contains(GraphicsLayerPaintingPhase::OverflowContents)) > paintFlags.add(RenderLayer::PaintLayerPaintingOverflowContents); >- if (paintingPhase & GraphicsLayerPaintCompositedScroll) >+ if (paintingPhase.contains(GraphicsLayerPaintingPhase::CompositedScroll)) > paintFlags.add(RenderLayer::PaintLayerPaintingCompositingScrollingPhase); > > if (graphicsLayer == m_backgroundLayer.get() && m_backgroundLayerPaintsFixedRootBackground) >@@ -2718,7 +2718,7 @@ void RenderLayerBacking::paintIntoLayer(const GraphicsLayer* graphicsLayer, Grap > RenderLayer::PaintLayerPaintingCompositingBackgroundPhase, > RenderLayer::PaintLayerPaintingCompositingForegroundPhase }; > >- if (paintingPhase & GraphicsLayerPaintOverflowContents) >+ if (paintingPhase.contains(GraphicsLayerPaintingPhase::OverflowContents)) > sharingLayerPaintFlags.add(RenderLayer::PaintLayerPaintingOverflowContents); > > for (auto& layerWeakPtr : m_backingSharingLayers) >@@ -2729,7 +2729,7 @@ void RenderLayerBacking::paintIntoLayer(const GraphicsLayer* graphicsLayer, Grap > } > > // Up-call from compositing layer drawing callback. >-void RenderLayerBacking::paintContents(const GraphicsLayer* graphicsLayer, GraphicsContext& context, GraphicsLayerPaintingPhase paintingPhase, const FloatRect& clip, GraphicsLayerPaintBehavior layerPaintBehavior) >+void RenderLayerBacking::paintContents(const GraphicsLayer* graphicsLayer, GraphicsContext& context, OptionSet<GraphicsLayerPaintingPhase> paintingPhase, const FloatRect& clip, GraphicsLayerPaintBehavior layerPaintBehavior) > { > #ifndef NDEBUG > renderer().page().setIsPainting(true); >@@ -2754,7 +2754,7 @@ void RenderLayerBacking::paintContents(const GraphicsLayer* graphicsLayer, Graph > || graphicsLayer == m_childClippingMaskLayer.get() > || graphicsLayer == m_scrolledContentsLayer.get()) { > >- if (!(paintingPhase & GraphicsLayerPaintOverflowContents)) >+ if (!paintingPhase.contains(GraphicsLayerPaintingPhase::OverflowContents)) > dirtyRect.intersect(enclosingIntRect(compositedBoundsIncludingMargin())); > > // We have to use the same root as for hit testing, because both methods can compute and cache clipRects. >diff --git a/Source/WebCore/rendering/RenderLayerBacking.h b/Source/WebCore/rendering/RenderLayerBacking.h >index 132e5a3e606cff5be2154129b3c5e3938a0b7832..5175f19c4a056e1877de6bc58d41ecae112ad939 100644 >--- a/Source/WebCore/rendering/RenderLayerBacking.h >+++ b/Source/WebCore/rendering/RenderLayerBacking.h >@@ -235,7 +235,7 @@ public: > void notifyFlushRequired(const GraphicsLayer*) override; > void notifyFlushBeforeDisplayRefresh(const GraphicsLayer*) override; > >- void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const FloatRect& clip, GraphicsLayerPaintBehavior) override; >+ void paintContents(const GraphicsLayer*, GraphicsContext&, OptionSet<GraphicsLayerPaintingPhase>, const FloatRect& clip, GraphicsLayerPaintBehavior) override; > > float deviceScaleFactor() const override; > float contentsScaleMultiplierForNewTiles(const GraphicsLayer*) const override; >@@ -333,7 +333,7 @@ private: > > void setBackgroundLayerPaintsFixedRootBackground(bool); > >- GraphicsLayerPaintingPhase paintingPhaseForPrimaryLayer() const; >+ OptionSet<GraphicsLayerPaintingPhase> paintingPhaseForPrimaryLayer() const; > > LayoutSize contentOffsetInCompositingLayer() const; > // Result is transform origin in device pixels. >@@ -385,7 +385,7 @@ private: > bool hasTiledBackingFlatteningLayer() const { return (m_childContainmentLayer && m_isFrameLayerWithTiledBacking); } > GraphicsLayer* tileCacheFlatteningLayer() const { return m_isFrameLayerWithTiledBacking ? m_childContainmentLayer.get() : nullptr; } > >- void paintIntoLayer(const GraphicsLayer*, GraphicsContext&, const IntRect& paintDirtyRect, OptionSet<PaintBehavior>, GraphicsLayerPaintingPhase); >+ void paintIntoLayer(const GraphicsLayer*, GraphicsContext&, const IntRect& paintDirtyRect, OptionSet<PaintBehavior>, OptionSet<GraphicsLayerPaintingPhase>); > > static CSSPropertyID graphicsLayerToCSSProperty(AnimatedPropertyID); > static AnimatedPropertyID cssToGraphicsLayerProperty(CSSPropertyID); >diff --git a/Source/WebCore/rendering/RenderLayerCompositor.cpp b/Source/WebCore/rendering/RenderLayerCompositor.cpp >index c95e318140b2d25dc725e0677cf1d95d5d03d720..78cc1857ae7ba3a616013af874045d9f45a5d00e 100644 >--- a/Source/WebCore/rendering/RenderLayerCompositor.cpp >+++ b/Source/WebCore/rendering/RenderLayerCompositor.cpp >@@ -3274,7 +3274,7 @@ void paintScrollbar(Scrollbar* scrollbar, GraphicsContext& context, const IntRec > context.restore(); > } > >-void RenderLayerCompositor::paintContents(const GraphicsLayer* graphicsLayer, GraphicsContext& context, GraphicsLayerPaintingPhase, const FloatRect& clip, GraphicsLayerPaintBehavior) >+void RenderLayerCompositor::paintContents(const GraphicsLayer* graphicsLayer, GraphicsContext& context, OptionSet<GraphicsLayerPaintingPhase>, const FloatRect& clip, GraphicsLayerPaintBehavior) > { > #if PLATFORM(MAC) > LocalDefaultSystemAppearance localAppearance(m_renderView.useDarkAppearance()); >diff --git a/Source/WebCore/rendering/RenderLayerCompositor.h b/Source/WebCore/rendering/RenderLayerCompositor.h >index 568ab4d3777f1fcd49b6e987599af1edacd190f2..9134779bf094a39aeb8583ddd03e2bc5a83d28d4 100644 >--- a/Source/WebCore/rendering/RenderLayerCompositor.h >+++ b/Source/WebCore/rendering/RenderLayerCompositor.h >@@ -377,7 +377,7 @@ private: > > // GraphicsLayerClient implementation > void notifyFlushRequired(const GraphicsLayer*) override; >- void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const FloatRect&, GraphicsLayerPaintBehavior) override; >+ void paintContents(const GraphicsLayer*, GraphicsContext&, OptionSet<GraphicsLayerPaintingPhase>, const FloatRect&, GraphicsLayerPaintBehavior) override; > void customPositionForVisibleRectComputation(const GraphicsLayer*, FloatPoint&) const override; > bool isTrackingRepaints() const override { return m_isTrackingRepaints; } >
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
Flags:
thorton
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198404
: 371014 |
371028