Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3726)

Unified Diff: Source/core/rendering/RenderLayerRepainter.cpp

Issue 58543002: Use a boolean hasCompositedLayerMapping() accessor instead of the pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update comment for hasCompositedLayerMapping Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/rendering/RenderLayerRepainter.cpp
diff --git a/Source/core/rendering/RenderLayerRepainter.cpp b/Source/core/rendering/RenderLayerRepainter.cpp
index 595431fa03737e99e3ad08967d41ad64011efeba..eb65cb6db4750e68ca047ed71d729f1db3b805c7 100644
--- a/Source/core/rendering/RenderLayerRepainter.cpp
+++ b/Source/core/rendering/RenderLayerRepainter.cpp
@@ -135,7 +135,7 @@ void RenderLayerRepainter::repaintIncludingNonCompositingDescendants(RenderLayer
m_renderer->repaintUsingContainer(repaintContainer, pixelSnappedIntRect(m_renderer->clippedOverflowRectForRepaint(repaintContainer)));
for (RenderLayer* curr = m_renderer->layer()->firstChild(); curr; curr = curr->nextSibling()) {
- if (!curr->compositedLayerMapping())
+ if (!curr->hasCompositedLayerMapping())
curr->repainter().repaintIncludingNonCompositingDescendants(repaintContainer);
}
}
@@ -145,7 +145,7 @@ LayoutRect RenderLayerRepainter::repaintRectIncludingNonCompositingDescendants()
LayoutRect repaintRect = m_repaintRect;
for (RenderLayer* child = m_renderer->layer()->firstChild(); child; child = child->nextSibling()) {
// Don't include repaint rects for composited child layers; they will paint themselves and have a different origin.
- if (child->compositedLayerMapping())
+ if (child->hasCompositedLayerMapping())
continue;
repaintRect.unite(child->repainter().repaintRectIncludingNonCompositingDescendants());
@@ -155,7 +155,7 @@ LayoutRect RenderLayerRepainter::repaintRectIncludingNonCompositingDescendants()
void RenderLayerRepainter::setBackingNeedsRepaint()
{
- ASSERT(m_renderer->compositedLayerMapping());
+ ASSERT(m_renderer->hasCompositedLayerMapping());
m_renderer->compositedLayerMapping()->setContentsNeedDisplay();
}
@@ -163,8 +163,8 @@ void RenderLayerRepainter::setBackingNeedsRepaintInRect(const LayoutRect& r)
{
// https://bugs.webkit.org/show_bug.cgi?id=61159 describes an unreproducible crash here,
// so assert but check that the layer is composited.
- ASSERT(m_renderer->compositedLayerMapping());
- if (!m_renderer->compositedLayerMapping()) {
+ ASSERT(m_renderer->hasCompositedLayerMapping());
+ if (!m_renderer->hasCompositedLayerMapping()) {
// If we're trying to repaint the placeholder document layer, propagate the
// repaint to the native view system.
LayoutRect absRect(r);
@@ -212,7 +212,7 @@ void RenderLayerRepainter::setFilterBackendNeedsRepaintingInRect(const LayoutRec
FloatQuad repaintQuad(rectForRepaint);
LayoutRect parentLayerRect = m_renderer->localToContainerQuad(repaintQuad, parentLayer->renderer()).enclosingBoundingBox();
- if (parentLayer->compositedLayerMapping()) {
+ if (parentLayer->hasCompositedLayerMapping()) {
parentLayer->repainter().setBackingNeedsRepaintInRect(parentLayerRect);
return;
}
« no previous file with comments | « Source/core/rendering/RenderLayerModelObject.cpp ('k') | Source/core/rendering/RenderLayerScrollableArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698