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

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

Issue 2893443002: Ignore visual rect/paint offset change under LayoutSVGHiddenContainer (Closed)
Patch Set: 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
« no previous file with comments | « third_party/WebKit/Source/core/paint/FindPaintOffsetAndVisualRectNeedingUpdate.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/FindPaintOffsetAndVisualRectNeedingUpdate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698