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 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
480 break; | 480 break; |
481 default: | 481 default: |
482 break; | 482 break; |
483 } | 483 } |
484 | 484 |
485 if (object.mayNeedPaintInvalidationSubtree()) { | 485 if (object.mayNeedPaintInvalidationSubtree()) { |
486 context.forcedSubtreeInvalidationFlags |= | 486 context.forcedSubtreeInvalidationFlags |= |
487 PaintInvalidatorContext::ForcedSubtreeInvalidationChecking; | 487 PaintInvalidatorContext::ForcedSubtreeInvalidationChecking; |
488 } | 488 } |
489 | 489 |
490 if (context.oldLocation != context.newLocation) { | 490 if (context.oldLocation != context.newLocation && |
491 !context.paintingLayer->subtreeIsInvisible()) { | |
chrishtr
2017/04/04 17:03:45
Could you add a test checking that making the tree
Xianzhu
2017/04/04 18:03:33
Done.
| |
491 context.forcedSubtreeInvalidationFlags |= | 492 context.forcedSubtreeInvalidationFlags |= |
492 PaintInvalidatorContext::ForcedSubtreeInvalidationChecking; | 493 PaintInvalidatorContext::ForcedSubtreeInvalidationChecking; |
493 } | 494 } |
494 } | 495 } |
495 | 496 |
496 void PaintInvalidator::processPendingDelayedPaintInvalidations() { | 497 void PaintInvalidator::processPendingDelayedPaintInvalidations() { |
497 for (auto target : m_pendingDelayedPaintInvalidations) | 498 for (auto target : m_pendingDelayedPaintInvalidations) |
498 target->getMutableForPainting().setShouldDoFullPaintInvalidation( | 499 target->getMutableForPainting().setShouldDoFullPaintInvalidation( |
499 PaintInvalidationDelayedFull); | 500 PaintInvalidationDelayedFull); |
500 } | 501 } |
501 | 502 |
502 } // namespace blink | 503 } // namespace blink |
OLD | NEW |