| 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/PaintLayerPainter.h" | 6 #include "core/paint/PaintLayerPainter.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 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 Optional<ScopeRecorder> scopeRecorder; | 560 Optional<ScopeRecorder> scopeRecorder; |
| 561 if (needsScope) | 561 if (needsScope) |
| 562 scopeRecorder.emplace(*context); | 562 scopeRecorder.emplace(*context); |
| 563 | 563 |
| 564 Optional<LayerClipRecorder> clipRecorder; | 564 Optional<LayerClipRecorder> clipRecorder; |
| 565 | 565 |
| 566 if (needsToClip(localPaintingInfo, fragment.backgroundRect)) | 566 if (needsToClip(localPaintingInfo, fragment.backgroundRect)) |
| 567 clipRecorder.emplace(*context, *m_paintLayer.layoutObject(), Display
Item::ClipLayerOverflowControls, fragment.backgroundRect, &localPaintingInfo, fr
agment.paginationOffset, paintFlags); | 567 clipRecorder.emplace(*context, *m_paintLayer.layoutObject(), Display
Item::ClipLayerOverflowControls, fragment.backgroundRect, &localPaintingInfo, fr
agment.paginationOffset, paintFlags); |
| 568 if (PaintLayerScrollableArea* scrollableArea = m_paintLayer.scrollableAr
ea()) { | 568 if (PaintLayerScrollableArea* scrollableArea = m_paintLayer.scrollableAr
ea()) { |
| 569 CullRect cullRect(pixelSnappedIntRect(fragment.backgroundRect.rect()
)); | 569 CullRect cullRect(pixelSnappedIntRect(fragment.backgroundRect.rect()
)); |
| 570 ScrollableAreaPainter(*scrollableArea).paintOverflowControls(context
, roundedIntPoint(toPoint(fragment.layerBounds.location() - m_paintLayer.layoutB
oxLocation())), cullRect, true); | 570 ScrollableAreaPainter(*scrollableArea).paintOverflowControls(*contex
t, roundedIntPoint(toPoint(fragment.layerBounds.location() - m_paintLayer.layout
BoxLocation())), cullRect, true); |
| 571 } | 571 } |
| 572 } | 572 } |
| 573 } | 573 } |
| 574 | 574 |
| 575 void PaintLayerPainter::paintFragmentWithPhase(PaintPhase phase, const PaintLaye
rFragment& fragment, GraphicsContext* context, const ClipRect& clipRect, const P
aintLayerPaintingInfo& paintingInfo, LayoutObject* paintingRootForLayoutObject,
PaintLayerFlags paintFlags, ClipState clipState) | 575 void PaintLayerPainter::paintFragmentWithPhase(PaintPhase phase, const PaintLaye
rFragment& fragment, GraphicsContext* context, const ClipRect& clipRect, const P
aintLayerPaintingInfo& paintingInfo, LayoutObject* paintingRootForLayoutObject,
PaintLayerFlags paintFlags, ClipState clipState) |
| 576 { | 576 { |
| 577 ASSERT(m_paintLayer.isSelfPaintingLayer()); | 577 ASSERT(m_paintLayer.isSelfPaintingLayer()); |
| 578 | 578 |
| 579 Optional<LayerClipRecorder> clipRecorder; | 579 Optional<LayerClipRecorder> clipRecorder; |
| 580 if (clipState != HasClipped && paintingInfo.clipToDirtyRect && needsToClip(p
aintingInfo, clipRect)) { | 580 if (clipState != HasClipped && paintingInfo.clipToDirtyRect && needsToClip(p
aintingInfo, clipRect)) { |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 if (!m_paintLayer.containsDirtyOverlayScrollbars()) | 708 if (!m_paintLayer.containsDirtyOverlayScrollbars()) |
| 709 return; | 709 return; |
| 710 | 710 |
| 711 PaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(enclosingIntRe
ct(damageRect)), paintFlags, LayoutSize(), paintingRoot); | 711 PaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(enclosingIntRe
ct(damageRect)), paintFlags, LayoutSize(), paintingRoot); |
| 712 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); | 712 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); |
| 713 | 713 |
| 714 m_paintLayer.setContainsDirtyOverlayScrollbars(false); | 714 m_paintLayer.setContainsDirtyOverlayScrollbars(false); |
| 715 } | 715 } |
| 716 | 716 |
| 717 } // namespace blink | 717 } // namespace blink |
| OLD | NEW |