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

Side by Side Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGText.cpp

Issue 1804963005: Avoid paintInvalidationContainer parameter of invalidatePaintIfNeeded() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 /* 1 /*
2 * Copyright (C) 2006 Apple Computer, Inc. 2 * Copyright (C) 2006 Apple Computer, Inc.
3 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> 3 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org>
4 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> 4 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz>
5 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 5 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
6 * Copyright (C) 2008 Rob Buis <buis@kde.org> 6 * Copyright (C) 2008 Rob Buis <buis@kde.org>
7 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 7 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
8 * Copyright (C) Research In Motion Limited 2010-2012. All rights reserved. 8 * Copyright (C) Research In Motion Limited 2010-2012. All rights reserved.
9 * Copyright (C) 2012 Google Inc. 9 * Copyright (C) 2012 Google Inc.
10 * 10 *
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 { 495 {
496 SVGResourcesCache::clientWillBeRemovedFromTree(child); 496 SVGResourcesCache::clientWillBeRemovedFromTree(child);
497 497
498 Vector<SVGTextLayoutAttributes*, 2> affectedAttributes; 498 Vector<SVGTextLayoutAttributes*, 2> affectedAttributes;
499 FontCachePurgePreventer fontCachePurgePreventer; 499 FontCachePurgePreventer fontCachePurgePreventer;
500 subtreeChildWillBeRemoved(child, affectedAttributes); 500 subtreeChildWillBeRemoved(child, affectedAttributes);
501 LayoutSVGBlock::removeChild(child); 501 LayoutSVGBlock::removeChild(child);
502 subtreeChildWasRemoved(affectedAttributes); 502 subtreeChildWasRemoved(affectedAttributes);
503 } 503 }
504 504
505 void LayoutSVGText::invalidateTreeIfNeeded(PaintInvalidationState& paintInvalida tionState) 505 void LayoutSVGText::invalidateTreeIfNeeded(const PaintInvalidationState& paintIn validationState)
506 { 506 {
507 ASSERT(!needsLayout()); 507 ASSERT(!needsLayout());
508 508
509 if (!shouldCheckForPaintInvalidation(paintInvalidationState)) 509 if (!shouldCheckForPaintInvalidation(paintInvalidationState))
510 return; 510 return;
511 511
512 PaintInvalidationReason reason = invalidatePaintIfNeeded(paintInvalidationSt ate, paintInvalidationState.paintInvalidationContainer()); 512 PaintInvalidationState newPaintInvalidationState(paintInvalidationState, *th is);
513 clearPaintInvalidationState(paintInvalidationState); 513 PaintInvalidationReason reason = invalidatePaintIfNeeded(newPaintInvalidatio nState);
514 clearPaintInvalidationFlags(newPaintInvalidationState);
514 515
515 if (reason == PaintInvalidationDelayedFull) 516 if (reason == PaintInvalidationDelayedFull)
516 paintInvalidationState.pushDelayedPaintInvalidationTarget(*this); 517 paintInvalidationState.pushDelayedPaintInvalidationTarget(*this);
517 518
518 ForceHorriblySlowRectMapping slowRectMapping(&paintInvalidationState); 519 ForceHorriblySlowRectMapping slowRectMapping(&newPaintInvalidationState);
519 PaintInvalidationState childTreeWalkState(paintInvalidationState, *this, pai ntInvalidationState.paintInvalidationContainer());
520 if (reason == PaintInvalidationSVGResourceChange) 520 if (reason == PaintInvalidationSVGResourceChange)
521 childTreeWalkState.setForceSubtreeInvalidationWithinContainer(); 521 newPaintInvalidationState.setForceSubtreeInvalidationWithinContainer();
522 invalidatePaintOfSubtreesIfNeeded(childTreeWalkState); 522
523 newPaintInvalidationState.updatePaintOffsetAndClipForChildren();
524 invalidatePaintOfSubtreesIfNeeded(newPaintInvalidationState);
523 } 525 }
524 526
525 } // namespace blink 527 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698