| 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/ObjectPaintInvalidator.h" | 5 #include "core/paint/ObjectPaintInvalidator.h" |
| 6 | 6 |
| 7 #include "core/frame/FrameView.h" | 7 #include "core/frame/FrameView.h" |
| 8 #include "core/frame/LocalFrame.h" | 8 #include "core/frame/LocalFrame.h" |
| 9 #include "core/layout/LayoutView.h" | 9 #include "core/layout/LayoutView.h" |
| 10 #include "core/layout/api/LayoutPartItem.h" | 10 #include "core/layout/api/LayoutPartItem.h" |
| (...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 630 (m_context.forcedSubtreeInvalidationFlags & | 630 (m_context.forcedSubtreeInvalidationFlags & |
| 631 PaintInvalidatorContext::ForcedSubtreeSVGResourceChange)) { | 631 PaintInvalidatorContext::ForcedSubtreeSVGResourceChange)) { |
| 632 reason = PaintInvalidationSVGResourceChange; | 632 reason = PaintInvalidationSVGResourceChange; |
| 633 break; | 633 break; |
| 634 } | 634 } |
| 635 return PaintInvalidationNone; | 635 return PaintInvalidationNone; |
| 636 case PaintInvalidationDelayedFull: | 636 case PaintInvalidationDelayedFull: |
| 637 return PaintInvalidationDelayedFull; | 637 return PaintInvalidationDelayedFull; |
| 638 default: | 638 default: |
| 639 DCHECK(isImmediateFullPaintInvalidationReason(reason)); | 639 DCHECK(isImmediateFullPaintInvalidationReason(reason)); |
| 640 // This allows descendants to know the computed reason if it's different |
| 641 // from the original reason before paint invalidation. |
| 642 m_object.getMutableForPainting().setShouldDoFullPaintInvalidation(reason); |
| 640 fullyInvalidatePaint(reason, m_context.oldVisualRect, | 643 fullyInvalidatePaint(reason, m_context.oldVisualRect, |
| 641 m_object.visualRect()); | 644 m_object.visualRect()); |
| 642 } | 645 } |
| 643 | 646 |
| 644 m_context.paintingLayer->setNeedsRepaint(); | 647 m_context.paintingLayer->setNeedsRepaint(); |
| 645 m_object.invalidateDisplayItemClients(reason); | 648 m_object.invalidateDisplayItemClients(reason); |
| 646 return reason; | 649 return reason; |
| 647 } | 650 } |
| 648 | 651 |
| 649 DisablePaintInvalidationStateAsserts::DisablePaintInvalidationStateAsserts() | 652 DisablePaintInvalidationStateAsserts::DisablePaintInvalidationStateAsserts() |
| 650 : m_disabler(&gDisablePaintInvalidationStateAsserts, true) {} | 653 : m_disabler(&gDisablePaintInvalidationStateAsserts, true) {} |
| 651 | 654 |
| 652 } // namespace blink | 655 } // namespace blink |
| OLD | NEW |