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 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
623 paintFragmentWithPhase(phase, fragment, context, fragment.foreground
Rect, localPaintingInfo, paintingRootForLayoutObject, paintFlags, clipState); | 623 paintFragmentWithPhase(phase, fragment, context, fragment.foreground
Rect, localPaintingInfo, paintingRootForLayoutObject, paintFlags, clipState); |
624 } | 624 } |
625 } | 625 } |
626 } | 626 } |
627 | 627 |
628 void DeprecatedPaintLayerPainter::paintOutlineForFragments(const DeprecatedPaint
LayerFragments& layerFragments, GraphicsContext* context, const DeprecatedPaintL
ayerPaintingInfo& localPaintingInfo, | 628 void DeprecatedPaintLayerPainter::paintOutlineForFragments(const DeprecatedPaint
LayerFragments& layerFragments, GraphicsContext* context, const DeprecatedPaintL
ayerPaintingInfo& localPaintingInfo, |
629 LayoutObject* paintingRootForLayoutObject, PaintLayerFlags paintFlags) | 629 LayoutObject* paintingRootForLayoutObject, PaintLayerFlags paintFlags) |
630 { | 630 { |
631 bool needsScope = layerFragments.size() > 1; | 631 bool needsScope = layerFragments.size() > 1; |
632 for (auto& fragment : layerFragments) { | 632 for (auto& fragment : layerFragments) { |
633 if (!fragment.outlineRect.isEmpty()) { | 633 if (!fragment.backgroundRect.isEmpty()) { |
634 Optional<ScopeRecorder> scopeRecorder; | 634 Optional<ScopeRecorder> scopeRecorder; |
635 if (needsScope) | 635 if (needsScope) |
636 scopeRecorder.emplace(*context); | 636 scopeRecorder.emplace(*context); |
637 paintFragmentWithPhase(PaintPhaseSelfOutline, fragment, context, fra
gment.outlineRect, localPaintingInfo, paintingRootForLayoutObject, paintFlags, H
asNotClipped); | 637 paintFragmentWithPhase(PaintPhaseSelfOutline, fragment, context, fra
gment.backgroundRect, localPaintingInfo, paintingRootForLayoutObject, paintFlags
, HasNotClipped); |
638 } | 638 } |
639 } | 639 } |
640 } | 640 } |
641 | 641 |
642 void DeprecatedPaintLayerPainter::paintMaskForFragments(const DeprecatedPaintLay
erFragments& layerFragments, GraphicsContext* context, const DeprecatedPaintLaye
rPaintingInfo& localPaintingInfo, | 642 void DeprecatedPaintLayerPainter::paintMaskForFragments(const DeprecatedPaintLay
erFragments& layerFragments, GraphicsContext* context, const DeprecatedPaintLaye
rPaintingInfo& localPaintingInfo, |
643 LayoutObject* paintingRootForLayoutObject, PaintLayerFlags paintFlags) | 643 LayoutObject* paintingRootForLayoutObject, PaintLayerFlags paintFlags) |
644 { | 644 { |
645 bool needsScope = layerFragments.size() > 1; | 645 bool needsScope = layerFragments.size() > 1; |
646 for (auto& fragment : layerFragments) { | 646 for (auto& fragment : layerFragments) { |
647 Optional<ScopeRecorder> scopeRecorder; | 647 Optional<ScopeRecorder> scopeRecorder; |
(...skipping 20 matching lines...) Expand all Loading... |
668 if (!m_paintLayer.containsDirtyOverlayScrollbars()) | 668 if (!m_paintLayer.containsDirtyOverlayScrollbars()) |
669 return; | 669 return; |
670 | 670 |
671 DeprecatedPaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(encl
osingIntRect(damageRect)), paintFlags, LayoutSize(), paintingRoot); | 671 DeprecatedPaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(encl
osingIntRect(damageRect)), paintFlags, LayoutSize(), paintingRoot); |
672 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); | 672 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); |
673 | 673 |
674 m_paintLayer.setContainsDirtyOverlayScrollbars(false); | 674 m_paintLayer.setContainsDirtyOverlayScrollbars(false); |
675 } | 675 } |
676 | 676 |
677 } // namespace blink | 677 } // namespace blink |
OLD | NEW |