Skip to content
Permalink
Browse files
RenderLayerCompositor: Move implementation of simple methods into the…
… header file.

https://bugs.webkit.org/show_bug.cgi?id=178514

Patch by Frederic Wang <fwang@igalia.com> on 2017-10-20
Reviewed by Darin Adler.

No new tests, behavior unchanged.

Canonical link: https://commits.webkit.org/194761@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223749 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
fred-wang authored and webkit-commit-queue committed Oct 20, 2017
1 parent ca3275b commit 60325a8a39f13127f3dc87dc7bffeaaf3cab269c
Showing with 23 additions and 68 deletions.
  1. +9 −0 Source/WebCore/ChangeLog
  2. +0 −57 Source/WebCore/rendering/RenderLayerCompositor.cpp
  3. +14 −11 Source/WebCore/rendering/RenderLayerCompositor.h
@@ -1,3 +1,12 @@
2017-10-20 Frederic Wang <fwang@igalia.com>

RenderLayerCompositor: Move implementation of simple methods into the header file.
https://bugs.webkit.org/show_bug.cgi?id=178514

Reviewed by Darin Adler.

No new tests, behavior unchanged.

2017-10-19 Antti Koivisto <antti@apple.com>

Support ::before/::after pseudo elements on elements with display:contents
@@ -1929,33 +1929,6 @@ GraphicsLayer* RenderLayerCompositor::rootGraphicsLayer() const
return m_rootContentLayer.get();
}

GraphicsLayer* RenderLayerCompositor::scrollLayer() const
{
return m_scrollLayer.get();
}

GraphicsLayer* RenderLayerCompositor::clipLayer() const
{
return m_clipLayer.get();
}

GraphicsLayer* RenderLayerCompositor::rootContentLayer() const
{
return m_rootContentLayer.get();
}

#if ENABLE(RUBBER_BANDING)
GraphicsLayer* RenderLayerCompositor::headerLayer() const
{
return m_layerForHeader.get();
}

GraphicsLayer* RenderLayerCompositor::footerLayer() const
{
return m_layerForFooter.get();
}
#endif

void RenderLayerCompositor::setIsInWindow(bool isInWindow)
{
LOG(Compositing, "RenderLayerCompositor %p setIsInWindow %d", this, isInWindow);
@@ -2831,16 +2804,6 @@ void RenderLayerCompositor::resetTrackedRepaintRects()
}
}

void RenderLayerCompositor::setTracksRepaints(bool tracksRepaints)
{
m_isTrackingRepaints = tracksRepaints;
}

bool RenderLayerCompositor::isTrackingRepaints() const
{
return m_isTrackingRepaints;
}

float RenderLayerCompositor::deviceScaleFactor() const
{
return m_renderView.document().deviceScaleFactor();
@@ -4062,26 +4025,6 @@ RefPtr<DisplayRefreshMonitor> RenderLayerCompositor::createDisplayRefreshMonitor
}
#endif

void RenderLayerCompositor::startTrackingLayerFlushes()
{
m_layerFlushCount = 0;
}

unsigned RenderLayerCompositor::layerFlushCount() const
{
return m_layerFlushCount;
}

void RenderLayerCompositor::startTrackingCompositingUpdates()
{
m_compositingUpdateCount = 0;
}

unsigned RenderLayerCompositor::compositingUpdateCount() const
{
return m_compositingUpdateCount;
}

#if ENABLE(CSS_SCROLL_SNAP)
void RenderLayerCompositor::updateScrollSnapPropertiesWithFrameView(const FrameView& frameView)
{
@@ -194,13 +194,15 @@ class RenderLayerCompositor final : public GraphicsLayerClient, public GraphicsL

WEBCORE_EXPORT RenderLayer& rootRenderLayer() const;
GraphicsLayer* rootGraphicsLayer() const;
WEBCORE_EXPORT GraphicsLayer* scrollLayer() const;
GraphicsLayer* clipLayer() const;
GraphicsLayer* rootContentLayer() const;

GraphicsLayer* scrollLayer() const { return m_scrollLayer.get(); }
GraphicsLayer* clipLayer() const { return m_clipLayer.get(); }
GraphicsLayer* rootContentLayer() const { return m_rootContentLayer.get(); }


#if ENABLE(RUBBER_BANDING)
GraphicsLayer* headerLayer() const;
GraphicsLayer* footerLayer() const;
GraphicsLayer* headerLayer() const { return m_layerForHeader.get(); }
GraphicsLayer* footerLayer() const { return m_layerForFooter.get(); }
#endif

enum RootLayerAttachment {
@@ -298,7 +300,8 @@ class RenderLayerCompositor final : public GraphicsLayerClient, public GraphicsL
#endif

void resetTrackedRepaintRects();
void setTracksRepaints(bool);
void setTracksRepaints(bool tracksRepaints) { m_isTrackingRepaints = tracksRepaints; }


void setShouldReevaluateCompositingAfterLayout() { m_reevaluateCompositingAfterLayout = true; }

@@ -323,11 +326,11 @@ class RenderLayerCompositor final : public GraphicsLayerClient, public GraphicsL
#endif

// For testing.
WEBCORE_EXPORT void startTrackingLayerFlushes();
WEBCORE_EXPORT unsigned layerFlushCount() const;
void startTrackingLayerFlushes() { m_layerFlushCount = 0; }
unsigned layerFlushCount() const { return m_layerFlushCount; }

WEBCORE_EXPORT void startTrackingCompositingUpdates();
WEBCORE_EXPORT unsigned compositingUpdateCount() const;
void startTrackingCompositingUpdates() { m_compositingUpdateCount = 0; }
unsigned compositingUpdateCount() const { return m_compositingUpdateCount; }

private:
class OverlapMap;
@@ -338,7 +341,7 @@ class RenderLayerCompositor final : public GraphicsLayerClient, public GraphicsL
void notifyFlushRequired(const GraphicsLayer*) override;
void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const FloatRect&, GraphicsLayerPaintBehavior) override;
void customPositionForVisibleRectComputation(const GraphicsLayer*, FloatPoint&) const override;
bool isTrackingRepaints() const override;
bool isTrackingRepaints() const override { return m_isTrackingRepaints; }

// GraphicsLayerUpdaterClient implementation
void flushLayersSoon(GraphicsLayerUpdater&) override;

0 comments on commit 60325a8

Please sign in to comment.