| 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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 } | 328 } |
| 329 | 329 |
| 330 DCHECK(context.paintInvalidationContainer == | 330 DCHECK(context.paintInvalidationContainer == |
| 331 object.containerForPaintInvalidation()); | 331 object.containerForPaintInvalidation()); |
| 332 DCHECK(context.paintingLayer == object.paintingLayer()); | 332 DCHECK(context.paintingLayer == object.paintingLayer()); |
| 333 | 333 |
| 334 if (object.mayNeedPaintInvalidationSubtree()) | 334 if (object.mayNeedPaintInvalidationSubtree()) |
| 335 context.forcedSubtreeInvalidationFlags |= | 335 context.forcedSubtreeInvalidationFlags |= |
| 336 PaintInvalidatorContext::ForcedSubtreeInvalidationChecking; | 336 PaintInvalidatorContext::ForcedSubtreeInvalidationChecking; |
| 337 | 337 |
| 338 // TODO(crbug.com/637313): This is temporary before we support filters in | 338 // TODO(crbug.com/637313): Use GeometryMapper which now supports filter |
| 339 // GeometryMapper. | 339 // geometry effects, after skia optimizes filter's mapRect operation. |
| 340 // TODO(crbug.com/648274): This is a workaround for multi-column contents. | 340 // TODO(crbug.com/648274): This is a workaround for multi-column contents. |
| 341 if (object.hasFilterInducingProperty() || object.isLayoutFlowThread()) { | 341 if (object.hasFilterInducingProperty() || object.isLayoutFlowThread()) { |
| 342 context.forcedSubtreeInvalidationFlags |= | 342 context.forcedSubtreeInvalidationFlags |= |
| 343 PaintInvalidatorContext::ForcedSubtreeSlowPathRect; | 343 PaintInvalidatorContext::ForcedSubtreeSlowPathRect; |
| 344 } | 344 } |
| 345 | 345 |
| 346 ObjectPaintInvalidator objectPaintInvalidator(object); | 346 ObjectPaintInvalidator objectPaintInvalidator(object); |
| 347 context.oldVisualRect = object.previousVisualRect(); | 347 context.oldVisualRect = object.previousVisualRect(); |
| 348 context.oldLocation = objectPaintInvalidator.previousLocationInBacking(); | 348 context.oldLocation = objectPaintInvalidator.previousLocationInBacking(); |
| 349 context.newVisualRect = computeVisualRectInBacking(object, context); | 349 context.newVisualRect = computeVisualRectInBacking(object, context); |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 PaintInvalidatorContext::ForcedSubtreeInvalidationRectUpdate; | 446 PaintInvalidatorContext::ForcedSubtreeInvalidationRectUpdate; |
| 447 } | 447 } |
| 448 | 448 |
| 449 void PaintInvalidator::processPendingDelayedPaintInvalidations() { | 449 void PaintInvalidator::processPendingDelayedPaintInvalidations() { |
| 450 for (auto target : m_pendingDelayedPaintInvalidations) | 450 for (auto target : m_pendingDelayedPaintInvalidations) |
| 451 target->getMutableForPainting().setShouldDoFullPaintInvalidation( | 451 target->getMutableForPainting().setShouldDoFullPaintInvalidation( |
| 452 PaintInvalidationDelayedFull); | 452 PaintInvalidationDelayedFull); |
| 453 } | 453 } |
| 454 | 454 |
| 455 } // namespace blink | 455 } // namespace blink |
| OLD | NEW |