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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp

Issue 2294313002: Let only the root layer paint root background (Closed)
Patch Set: Rebase Created 4 years, 4 months 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
index a66c0ccec4ff1fad21e8dc8b551bfe393b943cfd..aae71e637ac5b4c8b0362ab5349f2952b4a915fe 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
@@ -203,7 +203,7 @@ PaintLayerPainter::PaintResult PaintLayerPainter::paintLayerContents(GraphicsCon
PaintResult result = FullyPainted;
- if (paintFlags & PaintLayerPaintingRootBackgroundOnly && !m_paintLayer.layoutObject()->isLayoutView() && !m_paintLayer.layoutObject()->isDocumentElement())
+ if (paintFlags & PaintLayerPaintingRootBackgroundOnly && !m_paintLayer.layoutObject()->isLayoutView())
return result;
if (m_paintLayer.layoutObject()->view()->frame() && m_paintLayer.layoutObject()->view()->frame()->shouldThrottleRendering())
@@ -564,20 +564,13 @@ PaintLayerPainter::PaintResult PaintLayerPainter::paintChildren(unsigned childre
return result;
}
-// FIXME: inline this.
-static bool paintForFixedRootBackground(const PaintLayer* layer, PaintLayerFlags paintFlags)
-{
- return layer->layoutObject()->isDocumentElement() && (paintFlags & PaintLayerPaintingRootBackgroundOnly);
-}
-
bool PaintLayerPainter::shouldPaintLayerInSoftwareMode(const GlobalPaintFlags globalPaintFlags, PaintLayerFlags paintFlags)
{
DisableCompositingQueryAsserts disabler;
return m_paintLayer.compositingState() == NotComposited
|| (globalPaintFlags & GlobalPaintFlattenCompositingLayers)
- || ((paintFlags & PaintLayerPaintingReflection) && !m_paintLayer.has3DTransform())
- || paintForFixedRootBackground(&m_paintLayer, paintFlags);
+ || ((paintFlags & PaintLayerPaintingReflection) && !m_paintLayer.has3DTransform());
}
void PaintLayerPainter::paintOverflowControlsForFragments(const PaintLayerFragments& layerFragments, GraphicsContext& context, const PaintLayerPaintingInfo& localPaintingInfo, PaintLayerFlags paintFlags)
@@ -677,6 +670,8 @@ void PaintLayerPainter::paintForegroundForFragments(const PaintLayerFragments& l
GraphicsContext& context, const LayoutRect& transparencyPaintDirtyRect,
const PaintLayerPaintingInfo& localPaintingInfo, bool selectionOnly, PaintLayerFlags paintFlags)
{
+ DCHECK(!(paintFlags & PaintLayerPaintingRootBackgroundOnly));
+
// Optimize clipping for the single fragment case.
bool shouldClip = localPaintingInfo.clipToDirtyRect && layerFragments.size() == 1 && !layerFragments[0].foregroundRect.isEmpty();
ClipState clipState = HasNotClipped;
« no previous file with comments | « third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698