| 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 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 context.forcedSubtreeInvalidationFlags == | 413 context.forcedSubtreeInvalidationFlags == |
| 414 PaintInvalidatorContext::ForcedSubtreeInvalidationRectUpdate) { | 414 PaintInvalidatorContext::ForcedSubtreeInvalidationRectUpdate) { |
| 415 // We are done updating the visual rect. No other paint invalidation work to | 415 // We are done updating the visual rect. No other paint invalidation work to |
| 416 // do for this object. | 416 // do for this object. |
| 417 return; | 417 return; |
| 418 } | 418 } |
| 419 | 419 |
| 420 PaintInvalidationReason reason = object.invalidatePaintIfNeeded(context); | 420 PaintInvalidationReason reason = object.invalidatePaintIfNeeded(context); |
| 421 switch (reason) { | 421 switch (reason) { |
| 422 case PaintInvalidationDelayedFull: | 422 case PaintInvalidationDelayedFull: |
| 423 m_pendingDelayedPaintInvalidations.append(&object); | 423 m_pendingDelayedPaintInvalidations.push_back(&object); |
| 424 break; | 424 break; |
| 425 case PaintInvalidationSubtree: | 425 case PaintInvalidationSubtree: |
| 426 context.forcedSubtreeInvalidationFlags |= | 426 context.forcedSubtreeInvalidationFlags |= |
| 427 (PaintInvalidatorContext::ForcedSubtreeFullInvalidation | | 427 (PaintInvalidatorContext::ForcedSubtreeFullInvalidation | |
| 428 PaintInvalidatorContext:: | 428 PaintInvalidatorContext:: |
| 429 ForcedSubtreeFullInvalidationForStackedContents); | 429 ForcedSubtreeFullInvalidationForStackedContents); |
| 430 break; | 430 break; |
| 431 case PaintInvalidationSVGResourceChange: | 431 case PaintInvalidationSVGResourceChange: |
| 432 context.forcedSubtreeInvalidationFlags |= | 432 context.forcedSubtreeInvalidationFlags |= |
| 433 PaintInvalidatorContext::ForcedSubtreeSVGResourceChange; | 433 PaintInvalidatorContext::ForcedSubtreeSVGResourceChange; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 453 PaintInvalidatorContext::ForcedSubtreeInvalidationRectUpdate; | 453 PaintInvalidatorContext::ForcedSubtreeInvalidationRectUpdate; |
| 454 } | 454 } |
| 455 | 455 |
| 456 void PaintInvalidator::processPendingDelayedPaintInvalidations() { | 456 void PaintInvalidator::processPendingDelayedPaintInvalidations() { |
| 457 for (auto target : m_pendingDelayedPaintInvalidations) | 457 for (auto target : m_pendingDelayedPaintInvalidations) |
| 458 target->getMutableForPainting().setShouldDoFullPaintInvalidation( | 458 target->getMutableForPainting().setShouldDoFullPaintInvalidation( |
| 459 PaintInvalidationDelayedFull); | 459 PaintInvalidationDelayedFull); |
| 460 } | 460 } |
| 461 | 461 |
| 462 } // namespace blink | 462 } // namespace blink |
| OLD | NEW |