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

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

Issue 2872423002: Tweak PaintInvalidationReasons (Closed)
Patch Set: Rebaseline-cl Created 3 years, 7 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 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 return; 483 return;
484 } 484 }
485 485
486 if (object.IsSVGHiddenContainer()) { 486 if (object.IsSVGHiddenContainer()) {
487 context.forced_subtree_invalidation_flags |= 487 context.forced_subtree_invalidation_flags |=
488 PaintInvalidatorContext::kForcedSubtreeNoRasterInvalidation; 488 PaintInvalidatorContext::kForcedSubtreeNoRasterInvalidation;
489 } 489 }
490 490
491 PaintInvalidationReason reason = object.InvalidatePaint(context); 491 PaintInvalidationReason reason = object.InvalidatePaint(context);
492 switch (reason) { 492 switch (reason) {
493 case kPaintInvalidationDelayedFull: 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 kPaintInvalidationSubtree: 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);
501 break; 501 break;
502 case kPaintInvalidationSVGResourceChange: 502 case PaintInvalidationReason::kSVGResource:
503 context.forced_subtree_invalidation_flags |= 503 context.forced_subtree_invalidation_flags |=
504 PaintInvalidatorContext::kForcedSubtreeSVGResourceChange; 504 PaintInvalidatorContext::kForcedSubtreeSVGResourceChange;
505 break; 505 break;
506 default: 506 default:
507 break; 507 break;
508 } 508 }
509 509
510 if (object.MayNeedPaintInvalidationSubtree()) { 510 if (object.MayNeedPaintInvalidationSubtree()) {
511 context.forced_subtree_invalidation_flags |= 511 context.forced_subtree_invalidation_flags |=
512 PaintInvalidatorContext::kForcedSubtreeInvalidationChecking; 512 PaintInvalidatorContext::kForcedSubtreeInvalidationChecking;
(...skipping 11 matching lines...) Expand all
524 // requirement to the subtree. 524 // requirement to the subtree.
525 context.forced_subtree_invalidation_flags |= 525 context.forced_subtree_invalidation_flags |=
526 PaintInvalidatorContext::kForcedSubtreeVisualRectUpdate; 526 PaintInvalidatorContext::kForcedSubtreeVisualRectUpdate;
527 } 527 }
528 } 528 }
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 kPaintInvalidationDelayedFull); 534 PaintInvalidationReason::kDelayedFull);
535 } 535 }
536 } 536 }
537 537
538 } // namespace blink 538 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintInvalidationTest.cpp ('k') | third_party/WebKit/Source/core/paint/PaintLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698