| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 #include "core/paint/DeprecatedPaintLayerPainter.h" | 6 #include "core/paint/DeprecatedPaintLayerPainter.h" |
| 7 | 7 |
| 8 #include "core/frame/Settings.h" | 8 #include "core/frame/Settings.h" |
| 9 #include "core/layout/ClipPathOperation.h" | 9 #include "core/layout/ClipPathOperation.h" |
| 10 #include "core/layout/LayoutBlock.h" | 10 #include "core/layout/LayoutBlock.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 bool needsRepaint = m_paintLayer.needsRepaint(); | 77 bool needsRepaint = m_paintLayer.needsRepaint(); |
| 78 m_paintLayer.clearNeedsRepaint(); | 78 m_paintLayer.clearNeedsRepaint(); |
| 79 | 79 |
| 80 if (shouldSuppressPaintingLayer(&m_paintLayer)) | 80 if (shouldSuppressPaintingLayer(&m_paintLayer)) |
| 81 return; | 81 return; |
| 82 | 82 |
| 83 // If this layer is totally invisible then there is nothing to paint. | 83 // If this layer is totally invisible then there is nothing to paint. |
| 84 if (!m_paintLayer.layoutObject()->opacity() && !m_paintLayer.layoutObject()-
>hasBackdropFilter()) | 84 if (!m_paintLayer.layoutObject()->opacity() && !m_paintLayer.layoutObject()-
>hasBackdropFilter()) |
| 85 return; | 85 return; |
| 86 | 86 |
| 87 if (!needsRepaint && SubsequenceRecorder::useCachedSubsequenceIfPossible(*co
ntext, *m_paintLayer.layoutObject())) | 87 if (!needsRepaint && SubsequenceRecorder::useCachedSubsequenceIfPossible(*co
ntext, m_paintLayer)) |
| 88 return; | 88 return; |
| 89 SubsequenceRecorder subsequenceRecorder(*context, *m_paintLayer.layoutObject
()); | 89 SubsequenceRecorder subsequenceRecorder(*context, m_paintLayer); |
| 90 | 90 |
| 91 if (m_paintLayer.paintsWithTransparency(paintingInfo.globalPaintFlags())) | 91 if (m_paintLayer.paintsWithTransparency(paintingInfo.globalPaintFlags())) |
| 92 paintFlags |= PaintLayerHaveTransparency; | 92 paintFlags |= PaintLayerHaveTransparency; |
| 93 | 93 |
| 94 LayerFixedPositionRecorder fixedPositionRecorder(*context, *m_paintLayer.lay
outObject()); | 94 LayerFixedPositionRecorder fixedPositionRecorder(*context, *m_paintLayer.lay
outObject()); |
| 95 | 95 |
| 96 // PaintLayerAppliedTransform is used in LayoutReplica, to avoid applying th
e transform twice. | 96 // PaintLayerAppliedTransform is used in LayoutReplica, to avoid applying th
e transform twice. |
| 97 if (m_paintLayer.paintsWithTransform(paintingInfo.globalPaintFlags()) && !(p
aintFlags & PaintLayerAppliedTransform)) { | 97 if (m_paintLayer.paintsWithTransform(paintingInfo.globalPaintFlags()) && !(p
aintFlags & PaintLayerAppliedTransform)) { |
| 98 paintLayerWithTransform(context, paintingInfo, paintFlags); | 98 paintLayerWithTransform(context, paintingInfo, paintFlags); |
| 99 return; | 99 return; |
| (...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 if (!m_paintLayer.containsDirtyOverlayScrollbars()) | 610 if (!m_paintLayer.containsDirtyOverlayScrollbars()) |
| 611 return; | 611 return; |
| 612 | 612 |
| 613 DeprecatedPaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(encl
osingIntRect(damageRect)), paintFlags, LayoutSize(), paintingRoot); | 613 DeprecatedPaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(encl
osingIntRect(damageRect)), paintFlags, LayoutSize(), paintingRoot); |
| 614 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); | 614 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); |
| 615 | 615 |
| 616 m_paintLayer.setContainsDirtyOverlayScrollbars(false); | 616 m_paintLayer.setContainsDirtyOverlayScrollbars(false); |
| 617 } | 617 } |
| 618 | 618 |
| 619 } // namespace blink | 619 } // namespace blink |
| OLD | NEW |