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 2d0b917413a35611db9079fff8995dca642b36f9..f1973e3f2da2bde979896f66abc627cf289269be 100644 |
| --- a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp |
| +++ b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp |
| @@ -64,43 +64,6 @@ static ShouldRespectOverflowClipType ShouldRespectOverflowClip( |
| : kRespectOverflowClip; |
| } |
| -bool PaintLayerPainter::PaintedOutputInvisible( |
|
chrishtr
2017/04/26 19:58:21
I think we still need this for SPv1.
wkorman
2017/04/27 00:02:32
Restored SPv1 behavior.
|
| - const PaintLayerPaintingInfo& painting_info) { |
| - const LayoutObject& layout_object = paint_layer_.GetLayoutObject(); |
| - if (layout_object.HasBackdropFilter()) |
| - return false; |
| - |
| - // Always paint when 'will-change: opacity' is present. Reduces jank for |
| - // common animation implementation approaches, for example, an element that |
| - // starts with opacity zero and later begins to animate. |
| - if (layout_object.StyleRef().HasWillChangeOpacityHint()) |
| - return false; |
| - |
| - if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
| - if (layout_object.StyleRef().Opacity()) |
| - return false; |
| - |
| - const EffectPaintPropertyNode* effect = |
| - layout_object.PaintProperties()->Effect(); |
| - if (effect && effect->RequiresCompositingForAnimation()) { |
| - 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 |
| - // less leads to a color output of less than 0.5 in all channels, hence |
| - // not visible. |
| - static const float kMinimumVisibleOpacity = 0.0004f; |
| - if (paint_layer_.PaintsWithTransparency( |
| - painting_info.GetGlobalPaintFlags())) { |
| - if (layout_object.StyleRef().Opacity() < kMinimumVisibleOpacity) { |
| - return true; |
| - } |
| - } |
| - return false; |
| -} |
| - |
| PaintResult PaintLayerPainter::Paint( |
| GraphicsContext& context, |
| const PaintLayerPaintingInfo& painting_info, |
| @@ -135,10 +98,6 @@ PaintResult PaintLayerPainter::Paint( |
| ->ShouldThrottleRendering()) |
| return kFullyPainted; |
| - // If this layer is totally invisible then there is nothing to paint. |
| - if (PaintedOutputInvisible(painting_info)) |
| - return kFullyPainted; |
| - |
| if (paint_layer_.PaintsWithTransparency(painting_info.GetGlobalPaintFlags())) |
| paint_flags |= kPaintLayerHaveTransparency; |