| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/PaintInvalidator.h" | 5 #include "core/paint/PaintInvalidator.h" |
| 6 | 6 |
| 7 #include "core/editing/FrameSelection.h" | 7 #include "core/editing/FrameSelection.h" |
| 8 #include "core/frame/FrameView.h" | 8 #include "core/frame/FrameView.h" |
| 9 #include "core/frame/LocalFrame.h" | 9 #include "core/frame/LocalFrame.h" |
| 10 #include "core/frame/Settings.h" | 10 #include "core/frame/Settings.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 132 |
| 133 PaintLayer::mapRectInPaintInvalidationContainerToBacking( | 133 PaintLayer::mapRectInPaintInvalidationContainerToBacking( |
| 134 *context.paintInvalidationContainer, result); | 134 *context.paintInvalidationContainer, result); |
| 135 | 135 |
| 136 return result; | 136 return result; |
| 137 } | 137 } |
| 138 | 138 |
| 139 void PaintInvalidatorContext::mapLocalRectToPaintInvalidationBacking( | 139 void PaintInvalidatorContext::mapLocalRectToPaintInvalidationBacking( |
| 140 const LayoutObject& object, | 140 const LayoutObject& object, |
| 141 LayoutRect& rect) const { | 141 LayoutRect& rect) const { |
| 142 GeometryMapper geometryMapper; | 142 std::unique_ptr<GeometryMapper> geometryMapper = GeometryMapper::create(); |
| 143 rect = blink::mapLocalRectToPaintInvalidationBacking<LayoutRect, LayoutPoint>( | 143 rect = blink::mapLocalRectToPaintInvalidationBacking<LayoutRect, LayoutPoint>( |
| 144 object, rect, *this, geometryMapper); | 144 object, rect, *this, *geometryMapper); |
| 145 } | 145 } |
| 146 | 146 |
| 147 LayoutRect PaintInvalidator::computeVisualRectInBacking( | 147 LayoutRect PaintInvalidator::computeVisualRectInBacking( |
| 148 const LayoutObject& object, | 148 const LayoutObject& object, |
| 149 const PaintInvalidatorContext& context) { | 149 const PaintInvalidatorContext& context) { |
| 150 if (object.isSVGChild()) { | 150 if (object.isSVGChild()) { |
| 151 FloatRect localRect = SVGLayoutSupport::localVisualRect(object); | 151 FloatRect localRect = SVGLayoutSupport::localVisualRect(object); |
| 152 return mapLocalRectToPaintInvalidationBacking<FloatRect, FloatPoint>( | 152 return mapLocalRectToPaintInvalidationBacking<FloatRect, FloatPoint>( |
| 153 object, localRect, context, m_geometryMapper); | 153 object, localRect, context, m_geometryMapper); |
| 154 } | 154 } |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 PaintInvalidatorContext::ForcedSubtreeInvalidationRectUpdate; | 447 PaintInvalidatorContext::ForcedSubtreeInvalidationRectUpdate; |
| 448 } | 448 } |
| 449 | 449 |
| 450 void PaintInvalidator::processPendingDelayedPaintInvalidations() { | 450 void PaintInvalidator::processPendingDelayedPaintInvalidations() { |
| 451 for (auto target : m_pendingDelayedPaintInvalidations) | 451 for (auto target : m_pendingDelayedPaintInvalidations) |
| 452 target->getMutableForPainting().setShouldDoFullPaintInvalidation( | 452 target->getMutableForPainting().setShouldDoFullPaintInvalidation( |
| 453 PaintInvalidationDelayedFull); | 453 PaintInvalidationDelayedFull); |
| 454 } | 454 } |
| 455 | 455 |
| 456 } // namespace blink | 456 } // namespace blink |
| OLD | NEW |