| 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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 updateVisualRect(object, context); | 454 updateVisualRect(object, context); |
| 455 | 455 |
| 456 if (!objectShouldCheckForPaintInvalidation && | 456 if (!objectShouldCheckForPaintInvalidation && |
| 457 context.forcedSubtreeInvalidationFlags == | 457 context.forcedSubtreeInvalidationFlags == |
| 458 PaintInvalidatorContext::ForcedSubtreeInvalidationRectUpdate) { | 458 PaintInvalidatorContext::ForcedSubtreeInvalidationRectUpdate) { |
| 459 // We are done updating the visual rect. No other paint invalidation work to | 459 // We are done updating the visual rect. No other paint invalidation work to |
| 460 // do for this object. | 460 // do for this object. |
| 461 return; | 461 return; |
| 462 } | 462 } |
| 463 | 463 |
| 464 if (object.isSVGHiddenContainer()) { |
| 465 context.forcedSubtreeInvalidationFlags |= |
| 466 PaintInvalidatorContext::ForcedSubtreeNoRasterInvalidation; |
| 467 } |
| 468 |
| 464 PaintInvalidationReason reason = object.invalidatePaintIfNeeded(context); | 469 PaintInvalidationReason reason = object.invalidatePaintIfNeeded(context); |
| 465 switch (reason) { | 470 switch (reason) { |
| 466 case PaintInvalidationDelayedFull: | 471 case PaintInvalidationDelayedFull: |
| 467 m_pendingDelayedPaintInvalidations.push_back(&object); | 472 m_pendingDelayedPaintInvalidations.push_back(&object); |
| 468 break; | 473 break; |
| 469 case PaintInvalidationSubtree: | 474 case PaintInvalidationSubtree: |
| 470 context.forcedSubtreeInvalidationFlags |= | 475 context.forcedSubtreeInvalidationFlags |= |
| 471 (PaintInvalidatorContext::ForcedSubtreeFullInvalidation | | 476 (PaintInvalidatorContext::ForcedSubtreeFullInvalidation | |
| 472 PaintInvalidatorContext:: | 477 PaintInvalidatorContext:: |
| 473 ForcedSubtreeFullInvalidationForStackedContents); | 478 ForcedSubtreeFullInvalidationForStackedContents); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 491 } | 496 } |
| 492 } | 497 } |
| 493 | 498 |
| 494 void PaintInvalidator::processPendingDelayedPaintInvalidations() { | 499 void PaintInvalidator::processPendingDelayedPaintInvalidations() { |
| 495 for (auto target : m_pendingDelayedPaintInvalidations) | 500 for (auto target : m_pendingDelayedPaintInvalidations) |
| 496 target->getMutableForPainting().setShouldDoFullPaintInvalidation( | 501 target->getMutableForPainting().setShouldDoFullPaintInvalidation( |
| 497 PaintInvalidationDelayedFull); | 502 PaintInvalidationDelayedFull); |
| 498 } | 503 } |
| 499 | 504 |
| 500 } // namespace blink | 505 } // namespace blink |
| OLD | NEW |