| 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 } else if (object == context.paintInvalidationContainer) { | 83 } else if (object == context.paintInvalidationContainer) { |
| 84 result = LayoutRect(rect); | 84 result = LayoutRect(rect); |
| 85 } else { | 85 } else { |
| 86 rect.moveBy(FloatPoint(context.treeBuilderContext.current.paintOffset)); | 86 rect.moveBy(FloatPoint(context.treeBuilderContext.current.paintOffset)); |
| 87 | 87 |
| 88 PropertyTreeState currentTreeState( | 88 PropertyTreeState currentTreeState( |
| 89 context.treeBuilderContext.current.transform, | 89 context.treeBuilderContext.current.transform, |
| 90 context.treeBuilderContext.current.clip, | 90 context.treeBuilderContext.current.clip, |
| 91 context.treeBuilderContext.currentEffect, | 91 context.treeBuilderContext.currentEffect, |
| 92 context.treeBuilderContext.current.scroll); | 92 context.treeBuilderContext.current.scroll); |
| 93 const ObjectPaintProperties* containerPaintProperties = | 93 const auto* containerPaintProperties = |
| 94 context.paintInvalidationContainer->objectPaintProperties(); | 94 context.paintInvalidationContainer->paintProperties(); |
| 95 auto containerContentsProperties = | 95 auto containerContentsProperties = |
| 96 containerPaintProperties->contentsProperties(); | 96 containerPaintProperties->contentsProperties(); |
| 97 | 97 |
| 98 bool success = false; | 98 bool success = false; |
| 99 result = LayoutRect(geometryMapper.mapToVisualRectInDestinationSpace( | 99 result = LayoutRect(geometryMapper.mapToVisualRectInDestinationSpace( |
| 100 rect, currentTreeState, containerContentsProperties.propertyTreeState, | 100 rect, currentTreeState, containerContentsProperties.propertyTreeState, |
| 101 success)); | 101 success)); |
| 102 DCHECK(success); | 102 DCHECK(success); |
| 103 | 103 |
| 104 // Convert the result to the container's contents space. | 104 // Convert the result to the container's contents space. |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 const PaintInvalidatorContext& context) { | 144 const PaintInvalidatorContext& context) { |
| 145 FloatPoint point; | 145 FloatPoint point; |
| 146 if (object != context.paintInvalidationContainer) { | 146 if (object != context.paintInvalidationContainer) { |
| 147 point.moveBy(FloatPoint(context.treeBuilderContext.current.paintOffset)); | 147 point.moveBy(FloatPoint(context.treeBuilderContext.current.paintOffset)); |
| 148 | 148 |
| 149 PropertyTreeState currentTreeState( | 149 PropertyTreeState currentTreeState( |
| 150 context.treeBuilderContext.current.transform, | 150 context.treeBuilderContext.current.transform, |
| 151 context.treeBuilderContext.current.clip, | 151 context.treeBuilderContext.current.clip, |
| 152 context.treeBuilderContext.currentEffect, | 152 context.treeBuilderContext.currentEffect, |
| 153 context.treeBuilderContext.current.scroll); | 153 context.treeBuilderContext.current.scroll); |
| 154 const ObjectPaintProperties* containerPaintProperties = | 154 const auto* containerPaintProperties = |
| 155 context.paintInvalidationContainer->objectPaintProperties(); | 155 context.paintInvalidationContainer->paintProperties(); |
| 156 auto containerContentsProperties = | 156 auto containerContentsProperties = |
| 157 containerPaintProperties->contentsProperties(); | 157 containerPaintProperties->contentsProperties(); |
| 158 | 158 |
| 159 bool success = false; | 159 bool success = false; |
| 160 point = m_geometryMapper | 160 point = m_geometryMapper |
| 161 .mapRectToDestinationSpace( | 161 .mapRectToDestinationSpace( |
| 162 FloatRect(point, FloatSize()), currentTreeState, | 162 FloatRect(point, FloatSize()), currentTreeState, |
| 163 containerContentsProperties.propertyTreeState, success) | 163 containerContentsProperties.propertyTreeState, success) |
| 164 .location(); | 164 .location(); |
| 165 DCHECK(success); | 165 DCHECK(success); |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 object.getMutableForPainting().clearPaintInvalidationFlags(); | 440 object.getMutableForPainting().clearPaintInvalidationFlags(); |
| 441 } | 441 } |
| 442 | 442 |
| 443 void PaintInvalidator::processPendingDelayedPaintInvalidations() { | 443 void PaintInvalidator::processPendingDelayedPaintInvalidations() { |
| 444 for (auto target : m_pendingDelayedPaintInvalidations) | 444 for (auto target : m_pendingDelayedPaintInvalidations) |
| 445 target->getMutableForPainting().setShouldDoFullPaintInvalidation( | 445 target->getMutableForPainting().setShouldDoFullPaintInvalidation( |
| 446 PaintInvalidationDelayedFull); | 446 PaintInvalidationDelayedFull); |
| 447 } | 447 } |
| 448 | 448 |
| 449 } // namespace blink | 449 } // namespace blink |
| OLD | NEW |