| 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 | 175 |
| 176 LayoutPoint point; | 176 LayoutPoint point; |
| 177 if (object != context.paintInvalidationContainer) { | 177 if (object != context.paintInvalidationContainer) { |
| 178 point.moveBy(object.paintOffset()); | 178 point.moveBy(object.paintOffset()); |
| 179 | 179 |
| 180 const auto* containerTransform = | 180 const auto* containerTransform = |
| 181 context.paintInvalidationContainer->paintProperties() | 181 context.paintInvalidationContainer->paintProperties() |
| 182 ->contentsProperties() | 182 ->contentsProperties() |
| 183 ->transform(); | 183 ->transform(); |
| 184 if (context.treeBuilderContext.current.transform != containerTransform) { | 184 if (context.treeBuilderContext.current.transform != containerTransform) { |
| 185 point = LayoutPoint(m_geometryMapper | 185 FloatRect rect = FloatRect(FloatPoint(point), FloatSize()); |
| 186 .sourceToDestinationRect( | 186 m_geometryMapper.sourceToDestinationRect( |
| 187 FloatRect(FloatPoint(point), FloatSize()), | 187 context.treeBuilderContext.current.transform, containerTransform, |
| 188 context.treeBuilderContext.current.transform, | 188 rect); |
| 189 containerTransform) | 189 point = LayoutPoint(rect.location()); |
| 190 .location()); | |
| 191 } | 190 } |
| 192 | 191 |
| 193 // Convert the result to the container's contents space. | 192 // Convert the result to the container's contents space. |
| 194 point.moveBy(-context.paintInvalidationContainer->paintOffset()); | 193 point.moveBy(-context.paintInvalidationContainer->paintOffset()); |
| 195 } | 194 } |
| 196 | 195 |
| 197 if (context.paintInvalidationContainer->layer()->groupedMapping()) { | 196 if (context.paintInvalidationContainer->layer()->groupedMapping()) { |
| 198 FloatPoint floatPoint(point); | 197 FloatPoint floatPoint(point); |
| 199 PaintLayer::mapPointInPaintInvalidationContainerToBacking( | 198 PaintLayer::mapPointInPaintInvalidationContainerToBacking( |
| 200 *context.paintInvalidationContainer, floatPoint); | 199 *context.paintInvalidationContainer, floatPoint); |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 } | 490 } |
| 492 } | 491 } |
| 493 | 492 |
| 494 void PaintInvalidator::processPendingDelayedPaintInvalidations() { | 493 void PaintInvalidator::processPendingDelayedPaintInvalidations() { |
| 495 for (auto target : m_pendingDelayedPaintInvalidations) | 494 for (auto target : m_pendingDelayedPaintInvalidations) |
| 496 target->getMutableForPainting().setShouldDoFullPaintInvalidation( | 495 target->getMutableForPainting().setShouldDoFullPaintInvalidation( |
| 497 PaintInvalidationDelayedFull); | 496 PaintInvalidationDelayedFull); |
| 498 } | 497 } |
| 499 | 498 |
| 500 } // namespace blink | 499 } // namespace blink |
| OLD | NEW |