Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1138)

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintInvalidator.cpp

Issue 2810503002: Only store previous clip rects for PaintLayers that support subsequences. (Closed)
Patch Set: none Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 PaintInvalidatorContext::kForcedSubtreeInvalidationChecking; 495 PaintInvalidatorContext::kForcedSubtreeInvalidationChecking;
496 } 496 }
497 497
498 if (context.forced_subtree_invalidation_flags && 498 if (context.forced_subtree_invalidation_flags &&
499 context.NeedsVisualRectUpdate(object)) { 499 context.NeedsVisualRectUpdate(object)) {
500 // If any subtree flag is set, we also need to pass needsVisualRectUpdate 500 // If any subtree flag is set, we also need to pass needsVisualRectUpdate
501 // requirement to the subtree. 501 // requirement to the subtree.
502 context.forced_subtree_invalidation_flags |= 502 context.forced_subtree_invalidation_flags |=
503 PaintInvalidatorContext::kForcedSubtreeVisualRectUpdate; 503 PaintInvalidatorContext::kForcedSubtreeVisualRectUpdate;
504 } 504 }
505
506 bool usesCompositedScrolling = false;
507 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() &&
pdr. 2017/04/13 16:21:45 Why do we need !RuntimeEnabledFeatures::slimmingPa
chrishtr 2017/04/13 17:15:38 Because if SPv2 is on, we don't map visual rects t
508 object.IsBoxModelObject() &&
509 ToLayoutBoxModelObject(object).UsesCompositedScrolling())
510 usesCompositedScrolling = true;
511 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() &&
512 context.old_visual_rect != object.VisualRect() &&
513 !usesCompositedScrolling
514 // Note that isLayoutView() below becomes unnecessary after the launch of
515 // root layer scrolling.
516 && (object.HasOverflowClip() || object.IsLayoutView())) {
517 // Changes to clipping may affect any descendant.
518 context.forced_subtree_invalidation_flags |=
519 PaintInvalidatorContext::kForcedSubtreeVisualRectUpdate;
520 }
505 } 521 }
506 522
507 void PaintInvalidator::ProcessPendingDelayedPaintInvalidations() { 523 void PaintInvalidator::ProcessPendingDelayedPaintInvalidations() {
508 for (auto target : pending_delayed_paint_invalidations_) { 524 for (auto target : pending_delayed_paint_invalidations_) {
509 target->GetMutableForPainting().SetShouldDoFullPaintInvalidation( 525 target->GetMutableForPainting().SetShouldDoFullPaintInvalidation(
510 kPaintInvalidationDelayedFull); 526 kPaintInvalidationDelayedFull);
511 } 527 }
512 } 528 }
513 529
514 } // namespace blink 530 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintLayer.h » ('j') | third_party/WebKit/Source/core/paint/PaintLayer.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698