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

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

Issue 2297873002: Remove unnecessary checks in PaintLayer::backgroundIsKnownToBeOpaqueInRect (Closed)
Patch Set: 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 | « no previous file | 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/PaintLayer.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
index 37a94ac80e0939e43eb374798ff3684fdb5e86ef..454528f98a933b67f543818b5dad9c09d1735297 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -2397,9 +2397,6 @@ bool PaintLayer::paintsWithTransform(GlobalPaintFlags globalPaintFlags) const
bool PaintLayer::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) const
{
- if (!isSelfPaintingLayer() && !hasSelfPaintingLayerDescendant())
chrishtr 2016/08/30 20:49:01 childBackgroundIsKnownToBeOpaqueInRect calls backg
Stephen Chennney 2016/08/30 20:58:51 Right, in fact we only want the ones that are not
chrishtr 2016/08/30 21:15:39 No. self-painting is not the same thing as indepen
- return false;
-
if (paintsWithTransparency(GlobalPaintNormalPhase))
return false;
@@ -2415,14 +2412,12 @@ bool PaintLayer::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect)
if (paintsWithTransform(GlobalPaintNormalPhase))
return false;
- // FIXME: Remove this check.
// This function should not be called when layer-lists are dirty.
- // It is somehow getting triggered during style update.
- if (m_stackingNode->zOrderListsDirty())
- return false;
+ DCHECK(!m_stackingNode->zOrderListsDirty());
// FIXME: We currently only check the immediate layoutObject,
- // which will miss many cases.
+ // which will miss many cases where additional layout objects paint
+ // into this layer.
if (layoutObject()->backgroundIsKnownToBeOpaqueInRect(localRect))
return true;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698