Chromium Code Reviews| 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 5063ae67f1e8ecc9aa18f669fb220b2f224ed429..1417a0ad45ece2d1c8019818031935fdabb2bd2e 100644 |
| --- a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp |
| +++ b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp |
| @@ -66,12 +66,25 @@ static ShouldRespectOverflowClipType shouldRespectOverflowClip( |
| bool PaintLayerPainter::paintedOutputInvisible( |
| const PaintLayerPaintingInfo& paintingInfo) { |
| - if (m_paintLayer.layoutObject()->hasBackdropFilter()) |
| + const LayoutObject& layoutObject = *m_paintLayer.layoutObject(); |
| + if (layoutObject.hasBackdropFilter()) |
| return false; |
| - if (RuntimeEnabledFeatures::slimmingPaintV2Enabled() && |
| - m_paintLayer.layoutObject()->styleRef().opacity()) |
| - return false; |
| + if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
| + if (layoutObject.styleRef().opacity()) |
|
pdr.
2017/01/26 22:50:38
Do you need to check opacity > kMinimumVisibleOpac
wkorman
2017/01/26 23:09:12
http://crrev.com/2523103003 added PaintLayerPainte
|
| + return false; |
| + |
| + const EffectPaintPropertyNode* effect = |
| + layoutObject.paintProperties()->effect(); |
| + const TransformPaintPropertyNode* transform = |
| + layoutObject.paintProperties()->transform(); |
| + if ((effect && |
| + (effect->compositingReasons() & CompositingReasonActiveAnimation)) || |
| + (transform && (transform->compositingReasons() & |
| + CompositingReasonActiveAnimation))) { |
| + return false; |
| + } |
| + } |
| // 0.0004f < 1/2048. With 10-bit color channels (only available on the |
| // newest Macs; otherwise it's 8-bit), we see that an alpha of 1/2048 or |
| @@ -79,8 +92,7 @@ bool PaintLayerPainter::paintedOutputInvisible( |
| // not visible. |
| static const float kMinimumVisibleOpacity = 0.0004f; |
| if (m_paintLayer.paintsWithTransparency(paintingInfo.getGlobalPaintFlags())) { |
| - if (m_paintLayer.layoutObject()->styleRef().opacity() < |
| - kMinimumVisibleOpacity) { |
| + if (layoutObject.styleRef().opacity() < kMinimumVisibleOpacity) { |
| return true; |
| } |
| } |