| 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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 // geometry effects, after skia optimizes filter's mapRect operation. | 468 // geometry effects, after skia optimizes filter's mapRect operation. |
| 469 // TODO(crbug.com/648274): This is a workaround for multi-column contents. | 469 // TODO(crbug.com/648274): This is a workaround for multi-column contents. |
| 470 if (object.HasFilterInducingProperty() || object.IsLayoutFlowThread()) { | 470 if (object.HasFilterInducingProperty() || object.IsLayoutFlowThread()) { |
| 471 context.forced_subtree_invalidation_flags |= | 471 context.forced_subtree_invalidation_flags |= |
| 472 PaintInvalidatorContext::kForcedSubtreeSlowPathRect; | 472 PaintInvalidatorContext::kForcedSubtreeSlowPathRect; |
| 473 } | 473 } |
| 474 | 474 |
| 475 UpdatePaintInvalidationContainer(object, context); | 475 UpdatePaintInvalidationContainer(object, context); |
| 476 UpdateVisualRectIfNeeded(object, tree_builder_context, context); | 476 UpdateVisualRectIfNeeded(object, tree_builder_context, context); |
| 477 | 477 |
| 478 if (object.IsSVGHiddenContainer()) { |
| 479 context.forced_subtree_invalidation_flags |= |
| 480 PaintInvalidatorContext::kForcedSubtreeNoRasterInvalidation; |
| 481 } |
| 482 |
| 478 if (!object.ShouldCheckForPaintInvalidation() && | 483 if (!object.ShouldCheckForPaintInvalidation() && |
| 479 !(context.forced_subtree_invalidation_flags & | 484 !(context.forced_subtree_invalidation_flags & |
| 480 ~PaintInvalidatorContext::kForcedSubtreeVisualRectUpdate)) { | 485 ~PaintInvalidatorContext::kForcedSubtreeVisualRectUpdate)) { |
| 481 // We are done updating anything needed. No other paint invalidation work to | 486 // We are done updating anything needed. No other paint invalidation work to |
| 482 // do for this object. | 487 // do for this object. |
| 483 return; | 488 return; |
| 484 } | 489 } |
| 485 | 490 |
| 486 if (object.IsSVGHiddenContainer()) { | |
| 487 context.forced_subtree_invalidation_flags |= | |
| 488 PaintInvalidatorContext::kForcedSubtreeNoRasterInvalidation; | |
| 489 } | |
| 490 | |
| 491 PaintInvalidationReason reason = object.InvalidatePaint(context); | 491 PaintInvalidationReason reason = object.InvalidatePaint(context); |
| 492 switch (reason) { | 492 switch (reason) { |
| 493 case PaintInvalidationReason::kDelayedFull: | 493 case PaintInvalidationReason::kDelayedFull: |
| 494 pending_delayed_paint_invalidations_.push_back(&object); | 494 pending_delayed_paint_invalidations_.push_back(&object); |
| 495 break; | 495 break; |
| 496 case PaintInvalidationReason::kSubtree: | 496 case PaintInvalidationReason::kSubtree: |
| 497 context.forced_subtree_invalidation_flags |= | 497 context.forced_subtree_invalidation_flags |= |
| 498 (PaintInvalidatorContext::kForcedSubtreeFullInvalidation | | 498 (PaintInvalidatorContext::kForcedSubtreeFullInvalidation | |
| 499 PaintInvalidatorContext:: | 499 PaintInvalidatorContext:: |
| 500 kForcedSubtreeFullInvalidationForStackedContents); | 500 kForcedSubtreeFullInvalidationForStackedContents); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 529 | 529 |
| 530 void PaintInvalidator::ProcessPendingDelayedPaintInvalidations() { | 530 void PaintInvalidator::ProcessPendingDelayedPaintInvalidations() { |
| 531 for (auto target : pending_delayed_paint_invalidations_) { | 531 for (auto target : pending_delayed_paint_invalidations_) { |
| 532 target->GetMutableForPainting() | 532 target->GetMutableForPainting() |
| 533 .SetShouldDoFullPaintInvalidationWithoutGeometryChange( | 533 .SetShouldDoFullPaintInvalidationWithoutGeometryChange( |
| 534 PaintInvalidationReason::kDelayedFull); | 534 PaintInvalidationReason::kDelayedFull); |
| 535 } | 535 } |
| 536 } | 536 } |
| 537 | 537 |
| 538 } // namespace blink | 538 } // namespace blink |
| OLD | NEW |