| 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 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 615 if (!full_invalidation) { | 615 if (!full_invalidation) { |
| 616 FullyInvalidatePaint(kPaintInvalidationSelection, old_selection_rect, | 616 FullyInvalidatePaint(kPaintInvalidationSelection, old_selection_rect, |
| 617 new_selection_rect); | 617 new_selection_rect); |
| 618 context_.painting_layer->SetNeedsRepaint(); | 618 context_.painting_layer->SetNeedsRepaint(); |
| 619 object_.InvalidateDisplayItemClients(kPaintInvalidationSelection); | 619 object_.InvalidateDisplayItemClients(kPaintInvalidationSelection); |
| 620 } | 620 } |
| 621 } | 621 } |
| 622 | 622 |
| 623 DISABLE_CFI_PERF | 623 DISABLE_CFI_PERF |
| 624 PaintInvalidationReason | 624 PaintInvalidationReason |
| 625 ObjectPaintInvalidatorWithContext::InvalidatePaintIfNeededWithComputedReason( | 625 ObjectPaintInvalidatorWithContext::InvalidatePaintWithComputedReason( |
| 626 PaintInvalidationReason reason) { | 626 PaintInvalidationReason reason) { |
| 627 // We need to invalidate the selection before checking for whether we are | 627 // We need to invalidate the selection before checking for whether we are |
| 628 // doing a full invalidation. This is because we need to update the previous | 628 // doing a full invalidation. This is because we need to update the previous |
| 629 // selection rect regardless. | 629 // selection rect regardless. |
| 630 InvalidateSelectionIfNeeded(reason); | 630 InvalidateSelectionIfNeeded(reason); |
| 631 | 631 |
| 632 switch (reason) { | 632 switch (reason) { |
| 633 case kPaintInvalidationNone: | 633 case kPaintInvalidationNone: |
| 634 // There are corner cases that the display items need to be invalidated | 634 // There are corner cases that the display items need to be invalidated |
| 635 // for paint offset mutation, but incurs no pixel difference (i.e. bounds | 635 // for paint offset mutation, but incurs no pixel difference (i.e. bounds |
| (...skipping 30 matching lines...) Expand all Loading... |
| 666 | 666 |
| 667 context_.painting_layer->SetNeedsRepaint(); | 667 context_.painting_layer->SetNeedsRepaint(); |
| 668 object_.InvalidateDisplayItemClients(reason); | 668 object_.InvalidateDisplayItemClients(reason); |
| 669 return reason; | 669 return reason; |
| 670 } | 670 } |
| 671 | 671 |
| 672 DisablePaintInvalidationStateAsserts::DisablePaintInvalidationStateAsserts() | 672 DisablePaintInvalidationStateAsserts::DisablePaintInvalidationStateAsserts() |
| 673 : disabler_(&g_disable_paint_invalidation_state_asserts, true) {} | 673 : disabler_(&g_disable_paint_invalidation_state_asserts, true) {} |
| 674 | 674 |
| 675 } // namespace blink | 675 } // namespace blink |
| OLD | NEW |