| 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 "core/paint/PaintLayerPainter.h" | 5 #include "core/paint/PaintLayerPainter.h" |
| 6 | 6 |
| 7 #include "core/frame/FrameView.h" | 7 #include "core/frame/FrameView.h" |
| 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 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 666 } | 666 } |
| 667 | 667 |
| 668 // We have to loop through every fragment multiple times, since we have to i
ssue paint invalidations in each specific phase in order for | 668 // We have to loop through every fragment multiple times, since we have to i
ssue paint invalidations in each specific phase in order for |
| 669 // interleaving of the fragments to work properly. | 669 // interleaving of the fragments to work properly. |
| 670 paintForegroundForFragmentsWithPhase(selectionOnly ? PaintPhaseSelection : P
aintPhaseDescendantBlockBackgroundsOnly, | 670 paintForegroundForFragmentsWithPhase(selectionOnly ? PaintPhaseSelection : P
aintPhaseDescendantBlockBackgroundsOnly, |
| 671 layerFragments, context, localPaintingInfo, paintFlags, clipState); | 671 layerFragments, context, localPaintingInfo, paintFlags, clipState); |
| 672 | 672 |
| 673 if (!selectionOnly) { | 673 if (!selectionOnly) { |
| 674 paintForegroundForFragmentsWithPhase(PaintPhaseFloat, layerFragments, co
ntext, localPaintingInfo, paintFlags, clipState); | 674 paintForegroundForFragmentsWithPhase(PaintPhaseFloat, layerFragments, co
ntext, localPaintingInfo, paintFlags, clipState); |
| 675 paintForegroundForFragmentsWithPhase(PaintPhaseForeground, layerFragment
s, context, localPaintingInfo, paintFlags, clipState); | 675 paintForegroundForFragmentsWithPhase(PaintPhaseForeground, layerFragment
s, context, localPaintingInfo, paintFlags, clipState); |
| 676 paintForegroundForFragmentsWithPhase(PaintPhaseDescendantOutlinesOnly, l
ayerFragments, context, localPaintingInfo, paintFlags, clipState); | 676 if (m_paintLayer.needsPaintPhaseDescendantOutlines()) |
| 677 paintForegroundForFragmentsWithPhase(PaintPhaseDescendantOutlinesOnl
y, layerFragments, context, localPaintingInfo, paintFlags, clipState); |
| 677 } | 678 } |
| 678 } | 679 } |
| 679 | 680 |
| 680 void PaintLayerPainter::paintForegroundForFragmentsWithPhase(PaintPhase phase, | 681 void PaintLayerPainter::paintForegroundForFragmentsWithPhase(PaintPhase phase, |
| 681 const PaintLayerFragments& layerFragments, GraphicsContext& context, | 682 const PaintLayerFragments& layerFragments, GraphicsContext& context, |
| 682 const PaintLayerPaintingInfo& localPaintingInfo, PaintLayerFlags paintFlags,
ClipState clipState) | 683 const PaintLayerPaintingInfo& localPaintingInfo, PaintLayerFlags paintFlags,
ClipState clipState) |
| 683 { | 684 { |
| 684 bool needsScope = layerFragments.size() > 1; | 685 bool needsScope = layerFragments.size() > 1; |
| 685 for (auto& fragment : layerFragments) { | 686 for (auto& fragment : layerFragments) { |
| 686 if (!fragment.foregroundRect.isEmpty()) { | 687 if (!fragment.foregroundRect.isEmpty()) { |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 735 if (!m_paintLayer.containsDirtyOverlayScrollbars()) | 736 if (!m_paintLayer.containsDirtyOverlayScrollbars()) |
| 736 return; | 737 return; |
| 737 | 738 |
| 738 PaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(enclosingIntRe
ct(damageRect)), paintFlags, LayoutSize()); | 739 PaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(enclosingIntRe
ct(damageRect)), paintFlags, LayoutSize()); |
| 739 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); | 740 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); |
| 740 | 741 |
| 741 m_paintLayer.setContainsDirtyOverlayScrollbars(false); | 742 m_paintLayer.setContainsDirtyOverlayScrollbars(false); |
| 742 } | 743 } |
| 743 | 744 |
| 744 } // namespace blink | 745 } // namespace blink |
| OLD | NEW |