| 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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 object.GetMutableForPainting().EnsureIsReadyForPaintInvalidation(); | 436 object.GetMutableForPainting().EnsureIsReadyForPaintInvalidation(); |
| 437 | 437 |
| 438 UpdatePaintingLayer(object, context); | 438 UpdatePaintingLayer(object, context); |
| 439 | 439 |
| 440 if (object.GetDocument().Printing() && | 440 if (object.GetDocument().Printing() && |
| 441 !RuntimeEnabledFeatures::printBrowserEnabled()) | 441 !RuntimeEnabledFeatures::printBrowserEnabled()) |
| 442 return; // Don't invalidate paints if we're printing. | 442 return; // Don't invalidate paints if we're printing. |
| 443 | 443 |
| 444 // TODO(crbug.com/637313): Use GeometryMapper which now supports filter | 444 // TODO(crbug.com/637313): Use GeometryMapper which now supports filter |
| 445 // geometry effects, after skia optimizes filter's mapRect operation. | 445 // geometry effects, after skia optimizes filter's mapRect operation. |
| 446 // TODO(crbug.com/648274): This is a workaround for multi-column contents. | 446 // Multi-column requires the slow path. See crbug.com/648274). |
| 447 if (object.HasFilterInducingProperty() || object.IsLayoutFlowThread()) { | 447 if (object.HasFilterInducingProperty() || object.IsLayoutFlowThread()) { |
| 448 context.forced_subtree_invalidation_flags |= | 448 context.forced_subtree_invalidation_flags |= |
| 449 PaintInvalidatorContext::kForcedSubtreeSlowPathRect; | 449 PaintInvalidatorContext::kForcedSubtreeSlowPathRect; |
| 450 } | 450 } |
| 451 | 451 |
| 452 UpdatePaintInvalidationContainer(object, context); | 452 UpdatePaintInvalidationContainer(object, context); |
| 453 UpdateVisualRectIfNeeded(object, context); | 453 UpdateVisualRectIfNeeded(object, context); |
| 454 | 454 |
| 455 if (!object.ShouldCheckForPaintInvalidation() && | 455 if (!object.ShouldCheckForPaintInvalidation() && |
| 456 !(context.forced_subtree_invalidation_flags & | 456 !(context.forced_subtree_invalidation_flags & |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 } | 505 } |
| 506 | 506 |
| 507 void PaintInvalidator::ProcessPendingDelayedPaintInvalidations() { | 507 void PaintInvalidator::ProcessPendingDelayedPaintInvalidations() { |
| 508 for (auto target : pending_delayed_paint_invalidations_) { | 508 for (auto target : pending_delayed_paint_invalidations_) { |
| 509 target->GetMutableForPainting().SetShouldDoFullPaintInvalidation( | 509 target->GetMutableForPainting().SetShouldDoFullPaintInvalidation( |
| 510 kPaintInvalidationDelayedFull); | 510 kPaintInvalidationDelayedFull); |
| 511 } | 511 } |
| 512 } | 512 } |
| 513 | 513 |
| 514 } // namespace blink | 514 } // namespace blink |
| OLD | NEW |