| 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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 object.getMutableForPainting().setVisualRect(context.newVisualRect); | 381 object.getMutableForPainting().setVisualRect(context.newVisualRect); |
| 382 objectPaintInvalidator.setLocationInBacking(context.newLocation); | 382 objectPaintInvalidator.setLocationInBacking(context.newLocation); |
| 383 } | 383 } |
| 384 | 384 |
| 385 void PaintInvalidator::invalidatePaintIfNeeded( | 385 void PaintInvalidator::invalidatePaintIfNeeded( |
| 386 FrameView& frameView, | 386 FrameView& frameView, |
| 387 PaintInvalidatorContext& context) { | 387 PaintInvalidatorContext& context) { |
| 388 LayoutView* layoutView = frameView.layoutView(); | 388 LayoutView* layoutView = frameView.layoutView(); |
| 389 CHECK(layoutView); | 389 CHECK(layoutView); |
| 390 | 390 |
| 391 frameView.updateCaretsForPaintInvalidation(); |
| 392 |
| 391 context.paintInvalidationContainer = | 393 context.paintInvalidationContainer = |
| 392 context.paintInvalidationContainerForStackedContents = | 394 context.paintInvalidationContainerForStackedContents = |
| 393 &layoutView->containerForPaintInvalidation(); | 395 &layoutView->containerForPaintInvalidation(); |
| 394 context.paintingLayer = layoutView->layer(); | 396 context.paintingLayer = layoutView->layer(); |
| 395 | 397 |
| 396 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { | 398 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { |
| 397 ScopedUndoFrameViewContentClipAndScroll undo(frameView, context); | 399 ScopedUndoFrameViewContentClipAndScroll undo(frameView, context); |
| 398 frameView.invalidatePaintOfScrollControlsIfNeeded(context); | 400 frameView.invalidatePaintOfScrollControlsIfNeeded(context); |
| 399 } | 401 } |
| 400 } | 402 } |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 } | 470 } |
| 469 } | 471 } |
| 470 | 472 |
| 471 void PaintInvalidator::processPendingDelayedPaintInvalidations() { | 473 void PaintInvalidator::processPendingDelayedPaintInvalidations() { |
| 472 for (auto target : m_pendingDelayedPaintInvalidations) | 474 for (auto target : m_pendingDelayedPaintInvalidations) |
| 473 target->getMutableForPainting().setShouldDoFullPaintInvalidation( | 475 target->getMutableForPainting().setShouldDoFullPaintInvalidation( |
| 474 PaintInvalidationDelayedFull); | 476 PaintInvalidationDelayedFull); |
| 475 } | 477 } |
| 476 | 478 |
| 477 } // namespace blink | 479 } // namespace blink |
| OLD | NEW |