| 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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 | 371 |
| 372 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { | 372 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { |
| 373 ScopedUndoFrameViewContentClipAndScroll undo(frameView, context); | 373 ScopedUndoFrameViewContentClipAndScroll undo(frameView, context); |
| 374 frameView.invalidatePaintOfScrollControlsIfNeeded(context); | 374 frameView.invalidatePaintOfScrollControlsIfNeeded(context); |
| 375 } | 375 } |
| 376 } | 376 } |
| 377 | 377 |
| 378 void PaintInvalidator::invalidatePaintIfNeeded( | 378 void PaintInvalidator::invalidatePaintIfNeeded( |
| 379 const LayoutObject& object, | 379 const LayoutObject& object, |
| 380 PaintInvalidatorContext& context) { | 380 PaintInvalidatorContext& context) { |
| 381 if (object.isText()) |
| 382 return; |
| 381 object.getMutableForPainting().ensureIsReadyForPaintInvalidation(); | 383 object.getMutableForPainting().ensureIsReadyForPaintInvalidation(); |
| 382 | 384 |
| 383 // The paint offset should already be updated through | 385 // The paint offset should already be updated through |
| 384 // PaintPropertyTreeBuilder::updatePropertiesForSelf. | 386 // PaintPropertyTreeBuilder::updatePropertiesForSelf. |
| 385 DCHECK(context.treeBuilderContext.current.paintOffset == | 387 DCHECK(context.treeBuilderContext.current.paintOffset == |
| 386 object.paintOffset()); | 388 object.paintOffset()); |
| 387 | 389 |
| 388 if (!context.forcedSubtreeInvalidationFlags && | 390 if (!context.forcedSubtreeInvalidationFlags && |
| 389 !object | 391 !object |
| 390 .shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState()) | 392 .shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState()) |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 PaintInvalidatorContext::ForcedSubtreeInvalidationRectUpdate; | 449 PaintInvalidatorContext::ForcedSubtreeInvalidationRectUpdate; |
| 448 } | 450 } |
| 449 | 451 |
| 450 void PaintInvalidator::processPendingDelayedPaintInvalidations() { | 452 void PaintInvalidator::processPendingDelayedPaintInvalidations() { |
| 451 for (auto target : m_pendingDelayedPaintInvalidations) | 453 for (auto target : m_pendingDelayedPaintInvalidations) |
| 452 target->getMutableForPainting().setShouldDoFullPaintInvalidation( | 454 target->getMutableForPainting().setShouldDoFullPaintInvalidation( |
| 453 PaintInvalidationDelayedFull); | 455 PaintInvalidationDelayedFull); |
| 454 } | 456 } |
| 455 | 457 |
| 456 } // namespace blink | 458 } // namespace blink |
| OLD | NEW |