Commit c1d57848 authored by abarth@chromium.org's avatar abarth@chromium.org

Delete CompositedLayerMapping::updateAfterLayout

This function doesn't do much anymore and can be inlined into its one caller.
This CL also removes some unnecessary bits in the UpdateLayerPositionsFlags
bitfield.

Review URL: https://codereview.chromium.org/220593008

git-svn-id: svn://svn.chromium.org/blink/trunk@170632 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 1d8a3a37
...@@ -93,14 +93,11 @@ static const double resourcePriorityUpdateDelayAfterScroll = 0.250; ...@@ -93,14 +93,11 @@ static const double resourcePriorityUpdateDelayAfterScroll = 0.250;
static RenderLayer::UpdateLayerPositionsFlags updateLayerPositionFlags(RenderLayer* layer, bool isRelayoutingSubtree, bool didFullRepaint) static RenderLayer::UpdateLayerPositionsFlags updateLayerPositionFlags(RenderLayer* layer, bool isRelayoutingSubtree, bool didFullRepaint)
{ {
RenderLayer::UpdateLayerPositionsFlags flags = RenderLayer::defaultFlags; RenderLayer::UpdateLayerPositionsFlags flags = didFullRepaint ? RenderLayer::NeedsFullRepaintInBacking : RenderLayer::CheckForRepaint;
if (didFullRepaint) {
flags &= ~RenderLayer::CheckForRepaint;
flags |= RenderLayer::NeedsFullRepaintInBacking;
}
if (isRelayoutingSubtree && layer->isPaginated()) if (isRelayoutingSubtree && layer->isPaginated())
flags |= RenderLayer::UpdatePagination; flags |= RenderLayer::UpdatePagination;
return flags; return flags;
} }
......
...@@ -313,11 +313,6 @@ void RenderLayer::updateLayerPositions(RenderGeometryMap* geometryMap, UpdateLay ...@@ -313,11 +313,6 @@ void RenderLayer::updateLayerPositions(RenderGeometryMap* geometryMap, UpdateLay
if (m_reflectionInfo) if (m_reflectionInfo)
m_reflectionInfo->reflection()->layout(); m_reflectionInfo->reflection()->layout();
// Clear the IsCompositingUpdateRoot flag once we've found the first compositing layer in this update.
bool isUpdateRoot = (flags & IsCompositingUpdateRoot);
if (hasCompositedLayerMapping())
flags &= ~IsCompositingUpdateRoot;
if (useRegionBasedColumns() && renderer()->isInFlowRenderFlowThread()) { if (useRegionBasedColumns() && renderer()->isInFlowRenderFlowThread()) {
updatePagination(); updatePagination();
flags |= UpdatePagination; flags |= UpdatePagination;
...@@ -329,8 +324,8 @@ void RenderLayer::updateLayerPositions(RenderGeometryMap* geometryMap, UpdateLay ...@@ -329,8 +324,8 @@ void RenderLayer::updateLayerPositions(RenderGeometryMap* geometryMap, UpdateLay
for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) for (RenderLayer* child = firstChild(); child; child = child->nextSibling())
child->updateLayerPositions(geometryMap, flags); child->updateLayerPositions(geometryMap, flags);
if ((flags & UpdateCompositingLayers) && hasCompositedLayerMapping()) if ((flags & NeedsFullRepaintInBacking) && hasCompositedLayerMapping() && !compositedLayerMapping()->paintsIntoCompositedAncestor())
compositedLayerMapping()->updateAfterLayout(flags & NeedsFullRepaintInBacking, isUpdateRoot); compositedLayerMapping()->setContentsNeedDisplay();
if (geometryMap) if (geometryMap)
geometryMap->popMappingsToAncestor(parent()); geometryMap->popMappingsToAncestor(parent());
......
...@@ -169,18 +169,17 @@ public: ...@@ -169,18 +169,17 @@ public:
enum UpdateLayerPositionsFlag { enum UpdateLayerPositionsFlag {
CheckForRepaint = 1 << 0, CheckForRepaint = 1 << 0,
NeedsFullRepaintInBacking = 1 << 1, NeedsFullRepaintInBacking = 1 << 1,
IsCompositingUpdateRoot = 1 << 2, UpdatePagination = 1 << 2,
UpdateCompositingLayers = 1 << 3,
UpdatePagination = 1 << 4
}; };
typedef unsigned UpdateLayerPositionsFlags; typedef unsigned UpdateLayerPositionsFlags;
static const UpdateLayerPositionsFlags defaultFlags = CheckForRepaint | IsCompositingUpdateRoot | UpdateCompositingLayers;
void updateLayerPositionsAfterLayout(const RenderLayer* rootLayer, UpdateLayerPositionsFlags); void updateLayerPositionsAfterLayout(const RenderLayer* rootLayer, UpdateLayerPositionsFlags);
void updateLayerPositionsAfterOverflowScroll(); void updateLayerPositionsAfterOverflowScroll();
void updateLayerPositionsAfterDocumentScroll(); void updateLayerPositionsAfterDocumentScroll();
// FIXME: Should updateLayerPositions be private?
void updateLayerPositions(RenderGeometryMap*, UpdateLayerPositionsFlags = CheckForRepaint);
bool isPaginated() const { return m_isPaginated; } bool isPaginated() const { return m_isPaginated; }
RenderLayer* enclosingPaginationLayer() const { return m_enclosingPaginationLayer; } RenderLayer* enclosingPaginationLayer() const { return m_enclosingPaginationLayer; }
...@@ -509,8 +508,6 @@ public: ...@@ -509,8 +508,6 @@ public:
void updateOrRemoveFilterEffectRenderer(); void updateOrRemoveFilterEffectRenderer();
void updateLayerPositions(RenderGeometryMap* = 0, UpdateLayerPositionsFlags = defaultFlags);
void updateSelfPaintingLayer(); void updateSelfPaintingLayer();
void paintLayerContents(GraphicsContext*, const LayerPaintingInfo&, PaintLayerFlags); void paintLayerContents(GraphicsContext*, const LayerPaintingInfo&, PaintLayerFlags);
......
...@@ -428,12 +428,6 @@ void CompositedLayerMapping::updateCompositingReasons() ...@@ -428,12 +428,6 @@ void CompositedLayerMapping::updateCompositingReasons()
m_graphicsLayer->setCompositingReasons(m_owningLayer.compositingReasons()); m_graphicsLayer->setCompositingReasons(m_owningLayer.compositingReasons());
} }
void CompositedLayerMapping::updateAfterLayout(bool needsFullRepaint, bool isUpdateRoot)
{
if (needsFullRepaint && !paintsIntoCompositedAncestor())
setContentsNeedDisplay();
}
bool CompositedLayerMapping::updateGraphicsLayerConfiguration(GraphicsLayerUpdater::UpdateType updateType) bool CompositedLayerMapping::updateGraphicsLayerConfiguration(GraphicsLayerUpdater::UpdateType updateType)
{ {
if (!shouldUpdateGraphicsLayer(updateType)) if (!shouldUpdateGraphicsLayer(updateType))
......
...@@ -85,8 +85,6 @@ public: ...@@ -85,8 +85,6 @@ public:
RenderLayer& owningLayer() const { return m_owningLayer; } RenderLayer& owningLayer() const { return m_owningLayer; }
void updateAfterLayout(bool needsFullRepaint, bool isUpdateRoot);
// Returns true if layer configuration changed. // Returns true if layer configuration changed.
bool updateGraphicsLayerConfiguration(GraphicsLayerUpdater::UpdateType); bool updateGraphicsLayerConfiguration(GraphicsLayerUpdater::UpdateType);
// Update graphics layer position and bounds. // Update graphics layer position and bounds.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment