Diff
Modified: trunk/Source/WebCore/ChangeLog (245949 => 245950)
--- trunk/Source/WebCore/ChangeLog 2019-05-31 05:37:37 UTC (rev 245949)
+++ trunk/Source/WebCore/ChangeLog 2019-05-31 05:50:50 UTC (rev 245950)
@@ -1,3 +1,44 @@
+2019-05-30 Simon Fraser <[email protected]>
+
+ Use an OptionSet<> for GraphicsLayerPaintingPhase
+ https://bugs.webkit.org/show_bug.cgi?id=198404
+
+ Reviewed by Tim Horton.
+
+ Replace GraphicsLayerPaintingPhase with OptionSet<GraphicsLayerPaintingPhase>.
+
+ No behavior change.
+
+ * page/PageOverlayController.cpp:
+ (WebCore::PageOverlayController::setPageOverlayNeedsDisplay):
+ (WebCore::PageOverlayController::paintContents):
+ (WebCore::PageOverlayController::notifyFlushRequired):
+ * page/PageOverlayController.h:
+ * page/linux/ResourceUsageOverlayLinux.cpp:
+ * 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 Youenn Fablet <[email protected]>
Fix AVVideoCaptureSource::setFrameRateWithPreset logging
Modified: trunk/Source/WebCore/page/PageOverlayController.cpp (245949 => 245950)
--- trunk/Source/WebCore/page/PageOverlayController.cpp 2019-05-31 05:37:37 UTC (rev 245949)
+++ trunk/Source/WebCore/page/PageOverlayController.cpp 2019-05-31 05:50:50 UTC (rev 245950)
@@ -250,7 +250,7 @@
#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 @@
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 @@
return m_page.deviceScaleFactor();
}
-void PageOverlayController::notifyFlushRequired(const WebCore::GraphicsLayer*)
+void PageOverlayController::notifyFlushRequired(const GraphicsLayer*)
{
m_page.renderingUpdateScheduler().scheduleRenderingUpdate();
}
Modified: trunk/Source/WebCore/page/PageOverlayController.h (245949 => 245950)
--- trunk/Source/WebCore/page/PageOverlayController.h 2019-05-31 05:37:37 UTC (rev 245949)
+++ trunk/Source/WebCore/page/PageOverlayController.h 2019-05-31 05:50:50 UTC (rev 245950)
@@ -93,7 +93,7 @@
// 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;
Modified: trunk/Source/WebCore/page/linux/ResourceUsageOverlayLinux.cpp (245949 => 245950)
--- trunk/Source/WebCore/page/linux/ResourceUsageOverlayLinux.cpp 2019-05-31 05:37:37 UTC (rev 245949)
+++ trunk/Source/WebCore/page/linux/ResourceUsageOverlayLinux.cpp 2019-05-31 05:50:50 UTC (rev 245950)
@@ -84,7 +84,7 @@
~ResourceUsageOverlayPainter() = default;
private:
- void paintContents(const GraphicsLayer*, GraphicsContext& context, GraphicsLayerPaintingPhase, const FloatRect& clip, GraphicsLayerPaintBehavior) override
+ void paintContents(const GraphicsLayer*, GraphicsContext& context, OptionSet<GraphicsLayerPaintingPhase>, const FloatRect& clip, GraphicsLayerPaintBehavior) override
{
GraphicsContextStateSaver stateSaver(context);
context.fillRect(clip, Color(0.0f, 0.0f, 0.0f, 0.8f));
Modified: trunk/Source/WebCore/page/mac/ServicesOverlayController.h (245949 => 245950)
--- trunk/Source/WebCore/page/mac/ServicesOverlayController.h 2019-05-31 05:37:37 UTC (rev 245949)
+++ trunk/Source/WebCore/page/mac/ServicesOverlayController.h 2019-05-31 05:50:50 UTC (rev 245950)
@@ -82,7 +82,7 @@
// 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();
Modified: trunk/Source/WebCore/page/mac/ServicesOverlayController.mm (245949 => 245950)
--- trunk/Source/WebCore/page/mac/ServicesOverlayController.mm 2019-05-31 05:37:37 UTC (rev 245949)
+++ trunk/Source/WebCore/page/mac/ServicesOverlayController.mm 2019-05-31 05:50:50 UTC (rev 245950)
@@ -124,7 +124,7 @@
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;
Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp (245949 => 245950)
--- trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp 2019-05-31 05:37:37 UTC (rev 245949)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp 2019-05-31 05:50:50 UTC (rev 245950)
@@ -935,22 +935,22 @@
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";
Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayer.h (245949 => 245950)
--- trunk/Source/WebCore/platform/graphics/GraphicsLayer.h 2019-05-31 05:37:37 UTC (rev 245949)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayer.h 2019-05-31 05:50:50 UTC (rev 245950)
@@ -414,8 +414,8 @@
#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 @@
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;
Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayerClient.h (245949 => 245950)
--- trunk/Source/WebCore/platform/graphics/GraphicsLayerClient.h 2019-05-31 05:37:37 UTC (rev 245949)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayerClient.h 2019-05-31 05:50:50 UTC (rev 245950)
@@ -38,17 +38,15 @@
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 @@
// 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
Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (245949 => 245950)
--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2019-05-31 05:37:37 UTC (rev 245949)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2019-05-31 05:50:50 UTC (rev 245950)
@@ -1709,7 +1709,7 @@
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 @@
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 @@
{
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 @@
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 @@
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 @@
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::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 @@
}
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 @@
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 @@
}
// 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 @@
|| 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.
Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.h (245949 => 245950)
--- trunk/Source/WebCore/rendering/RenderLayerBacking.h 2019-05-31 05:37:37 UTC (rev 245949)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.h 2019-05-31 05:50:50 UTC (rev 245950)
@@ -235,7 +235,7 @@
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 @@
void setBackgroundLayerPaintsFixedRootBackground(bool);
- GraphicsLayerPaintingPhase paintingPhaseForPrimaryLayer() const;
+ OptionSet<GraphicsLayerPaintingPhase> paintingPhaseForPrimaryLayer() const;
LayoutSize contentOffsetInCompositingLayer() const;
// Result is transform origin in device pixels.
@@ -385,7 +385,7 @@
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);
Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (245949 => 245950)
--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2019-05-31 05:37:37 UTC (rev 245949)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2019-05-31 05:50:50 UTC (rev 245950)
@@ -3274,7 +3274,7 @@
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());
Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.h (245949 => 245950)
--- trunk/Source/WebCore/rendering/RenderLayerCompositor.h 2019-05-31 05:37:37 UTC (rev 245949)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.h 2019-05-31 05:50:50 UTC (rev 245950)
@@ -377,7 +377,7 @@
// 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; }
Modified: trunk/Source/WebKitLegacy/win/ChangeLog (245949 => 245950)
--- trunk/Source/WebKitLegacy/win/ChangeLog 2019-05-31 05:37:37 UTC (rev 245949)
+++ trunk/Source/WebKitLegacy/win/ChangeLog 2019-05-31 05:50:50 UTC (rev 245950)
@@ -1,3 +1,21 @@
+2019-05-30 Simon Fraser <[email protected]>
+
+ Use an OptionSet<> for GraphicsLayerPaintingPhase
+ https://bugs.webkit.org/show_bug.cgi?id=198404
+
+ Reviewed by Tim Horton.
+
+ Replace GraphicsLayerPaintingPhase with OptionSet<GraphicsLayerPaintingPhase>.
+
+ No behavior change.
+
+ * WebCoreSupport/AcceleratedCompositingContext.cpp:
+ (AcceleratedCompositingContext::paintContents):
+ * WebCoreSupport/AcceleratedCompositingContext.h:
+ * WebView.cpp:
+ (WebView::paintContents):
+ * WebView.h:
+
2019-05-26 Wenson Hsieh <[email protected]>
[iOS] Dropped text, attachments, and images should animate into place
Modified: trunk/Source/WebKitLegacy/win/WebCoreSupport/AcceleratedCompositingContext.cpp (245949 => 245950)
--- trunk/Source/WebKitLegacy/win/WebCoreSupport/AcceleratedCompositingContext.cpp 2019-05-31 05:37:37 UTC (rev 245949)
+++ trunk/Source/WebKitLegacy/win/WebCoreSupport/AcceleratedCompositingContext.cpp 2019-05-31 05:50:50 UTC (rev 245950)
@@ -400,7 +400,7 @@
scheduleLayerFlush();
}
-void AcceleratedCompositingContext::paintContents(const GraphicsLayer*, GraphicsContext& context, GraphicsLayerPaintingPhase, const FloatRect& rectToPaint, GraphicsLayerPaintBehavior)
+void AcceleratedCompositingContext::paintContents(const GraphicsLayer*, GraphicsContext& context, OptionSet<GraphicsLayerPaintingPhase>, const FloatRect& rectToPaint, GraphicsLayerPaintBehavior)
{
context.save();
context.clip(rectToPaint);
Modified: trunk/Source/WebKitLegacy/win/WebCoreSupport/AcceleratedCompositingContext.h (245949 => 245950)
--- trunk/Source/WebKitLegacy/win/WebCoreSupport/AcceleratedCompositingContext.h 2019-05-31 05:37:37 UTC (rev 245949)
+++ trunk/Source/WebKitLegacy/win/WebCoreSupport/AcceleratedCompositingContext.h 2019-05-31 05:50:50 UTC (rev 245950)
@@ -52,7 +52,7 @@
bool enabled();
// GraphicsLayerClient
- void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::FloatRect& rectToPaint, WebCore::GraphicsLayerPaintBehavior) override;
+ void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, OptionSet<WebCore::GraphicsLayerPaintingPhase>, const WebCore::FloatRect& rectToPaint, WebCore::GraphicsLayerPaintBehavior) override;
float deviceScaleFactor() const override;
void initialize();
Modified: trunk/Source/WebKitLegacy/win/WebView.cpp (245949 => 245950)
--- trunk/Source/WebKitLegacy/win/WebView.cpp 2019-05-31 05:37:37 UTC (rev 245949)
+++ trunk/Source/WebKitLegacy/win/WebView.cpp 2019-05-31 05:50:50 UTC (rev 245950)
@@ -7363,7 +7363,7 @@
flushPendingGraphicsLayerChangesSoon();
}
-void WebView::paintContents(const GraphicsLayer*, GraphicsContext& context, GraphicsLayerPaintingPhase, const FloatRect& inClipPixels, GraphicsLayerPaintBehavior)
+void WebView::paintContents(const GraphicsLayer*, GraphicsContext& context, OptionSet<GraphicsLayerPaintingPhase>, const FloatRect& inClipPixels, GraphicsLayerPaintBehavior)
{
Frame* frame = core(m_mainFrame);
if (!frame)
Modified: trunk/Source/WebKitLegacy/win/WebView.h (245949 => 245950)
--- trunk/Source/WebKitLegacy/win/WebView.h 2019-05-31 05:37:37 UTC (rev 245949)
+++ trunk/Source/WebKitLegacy/win/WebView.h 2019-05-31 05:50:50 UTC (rev 245950)
@@ -568,7 +568,7 @@
// GraphicsLayerClient
void notifyAnimationStarted(const WebCore::GraphicsLayer*, const String&, MonotonicTime) override;
void notifyFlushRequired(const WebCore::GraphicsLayer*) override;
- void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::FloatRect& inClip, WebCore::GraphicsLayerPaintBehavior) override;
+ void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, OptionSet<WebCore::GraphicsLayerPaintingPhase>, const WebCore::FloatRect& inClip, WebCore::GraphicsLayerPaintBehavior) override;
#if USE(CA)
// CACFLayerTreeHostClient