| 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 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 // container vs scrolling contents). | 485 // container vs scrolling contents). |
| 486 return !m_context.paintInvalidationContainer->usesCompositedScrolling(); | 486 return !m_context.paintInvalidationContainer->usesCompositedScrolling(); |
| 487 } | 487 } |
| 488 | 488 |
| 489 void ObjectPaintInvalidatorWithContext::invalidatePaintRectangleWithContext( | 489 void ObjectPaintInvalidatorWithContext::invalidatePaintRectangleWithContext( |
| 490 const LayoutRect& rect, | 490 const LayoutRect& rect, |
| 491 PaintInvalidationReason reason) { | 491 PaintInvalidationReason reason) { |
| 492 if (rect.isEmpty()) | 492 if (rect.isEmpty()) |
| 493 return; | 493 return; |
| 494 | 494 |
| 495 if (m_context.forcedSubtreeInvalidationFlags & |
| 496 PaintInvalidatorContext::ForcedSubtreeNoRasterInvalidation) |
| 497 return; |
| 498 |
| 495 // If the parent has fully invalidated and its visual rect covers this object | 499 // If the parent has fully invalidated and its visual rect covers this object |
| 496 // on the same backing, skip the invalidation. | 500 // on the same backing, skip the invalidation. |
| 497 if (parentFullyInvalidatedOnSameBacking() && | 501 if (parentFullyInvalidatedOnSameBacking() && |
| 498 (m_context.parentContext->oldVisualRect.contains(rect) || | 502 (m_context.parentContext->oldVisualRect.contains(rect) || |
| 499 m_object.parent()->visualRect().contains(rect))) | 503 m_object.parent()->visualRect().contains(rect))) |
| 500 return; | 504 return; |
| 501 | 505 |
| 502 invalidatePaintUsingContainer(*m_context.paintInvalidationContainer, rect, | 506 invalidatePaintUsingContainer(*m_context.paintInvalidationContainer, rect, |
| 503 reason); | 507 reason); |
| 504 } | 508 } |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 | 650 |
| 647 m_context.paintingLayer->setNeedsRepaint(); | 651 m_context.paintingLayer->setNeedsRepaint(); |
| 648 m_object.invalidateDisplayItemClients(reason); | 652 m_object.invalidateDisplayItemClients(reason); |
| 649 return reason; | 653 return reason; |
| 650 } | 654 } |
| 651 | 655 |
| 652 DisablePaintInvalidationStateAsserts::DisablePaintInvalidationStateAsserts() | 656 DisablePaintInvalidationStateAsserts::DisablePaintInvalidationStateAsserts() |
| 653 : m_disabler(&gDisablePaintInvalidationStateAsserts, true) {} | 657 : m_disabler(&gDisablePaintInvalidationStateAsserts, true) {} |
| 654 | 658 |
| 655 } // namespace blink | 659 } // namespace blink |
| OLD | NEW |