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

Side by Side Diff: Source/core/layout/LayoutObject.cpp

Issue 1164713010: Invalidate non-composited subtree on needsPaintInvalidationLayer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update expectations Created 5 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/LayoutObject.h ('k') | Source/core/paint/DeprecatedPaintLayer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 1782 matching lines...) Expand 10 before | Expand all | Expand 10 after
1793 else if (updatedDiff.needsPositionedMovementLayout()) 1793 else if (updatedDiff.needsPositionedMovementLayout())
1794 setNeedsPositionedMovementLayout(); 1794 setNeedsPositionedMovementLayout();
1795 } 1795 }
1796 1796
1797 if (diff.transformChanged() && !needsLayout()) { 1797 if (diff.transformChanged() && !needsLayout()) {
1798 if (LayoutBlock* container = containingBlock()) 1798 if (LayoutBlock* container = containingBlock())
1799 container->setNeedsOverflowRecalcAfterStyleChange(); 1799 container->setNeedsOverflowRecalcAfterStyleChange();
1800 } 1800 }
1801 1801
1802 if (updatedDiff.needsPaintInvalidationLayer()) 1802 if (updatedDiff.needsPaintInvalidationLayer())
1803 toLayoutBoxModelObject(this)->layer()->setShouldDoFullPaintInvalidationI ncludingNonCompositingDescendants(); 1803 setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants();
1804 else if (diff.needsPaintInvalidationObject() || updatedDiff.needsPaintInvali dationObject()) 1804 else if (diff.needsPaintInvalidationObject() || updatedDiff.needsPaintInvali dationObject())
1805 setShouldDoFullPaintInvalidation(); 1805 setShouldDoFullPaintInvalidation();
1806 } 1806 }
1807 1807
1808 static inline bool layoutObjectHasBackground(const LayoutObject* layoutObject) 1808 static inline bool layoutObjectHasBackground(const LayoutObject* layoutObject)
1809 { 1809 {
1810 return layoutObject && layoutObject->hasBackground(); 1810 return layoutObject && layoutObject->hasBackground();
1811 } 1811 }
1812 1812
1813 void LayoutObject::styleWillChange(StyleDifference diff, const ComputedStyle& ne wStyle) 1813 void LayoutObject::styleWillChange(StyleDifference diff, const ComputedStyle& ne wStyle)
(...skipping 1438 matching lines...) Expand 10 before | Expand all | Expand 10 after
3252 invalidatePaintUsingContainer(paintInvalidationContainer, previousPaintInval idationRect(), PaintInvalidationLayer); 3252 invalidatePaintUsingContainer(paintInvalidationContainer, previousPaintInval idationRect(), PaintInvalidationLayer);
3253 if (RuntimeEnabledFeatures::slimmingPaintEnabled()) 3253 if (RuntimeEnabledFeatures::slimmingPaintEnabled())
3254 invalidateDisplayItemClients(paintInvalidationContainer); 3254 invalidateDisplayItemClients(paintInvalidationContainer);
3255 3255
3256 for (LayoutObject* child = slowFirstChild(); child; child = child->nextSibli ng()) { 3256 for (LayoutObject* child = slowFirstChild(); child; child = child->nextSibli ng()) {
3257 if (!child->isPaintInvalidationContainer()) 3257 if (!child->isPaintInvalidationContainer())
3258 child->invalidatePaintIncludingNonCompositingDescendantsInternal(pai ntInvalidationContainer); 3258 child->invalidatePaintIncludingNonCompositingDescendantsInternal(pai ntInvalidationContainer);
3259 } 3259 }
3260 } 3260 }
3261 3261
3262 static void setShouldDoFullPaintInvalidationIncludingNonCompositingDescendantsIn ternal(LayoutObject* object)
3263 {
3264 object->setShouldDoFullPaintInvalidation();
3265 for (LayoutObject* child = object->slowFirstChild(); child; child = child->n extSibling()) {
3266 if (!child->isPaintInvalidationContainer())
3267 setShouldDoFullPaintInvalidationIncludingNonCompositingDescendantsIn ternal(child);
3268 }
3269 }
3270
3271 // FIXME: If we had a flag to force invalidations in a whole subtree, we could g et rid of this function (crbug.com/410097).
3272 void LayoutObject::setShouldDoFullPaintInvalidationIncludingNonCompositingDescen dants()
3273 {
3274 // Need to access the current compositing status.
3275 DisableCompositingQueryAsserts disabler;
3276 setShouldDoFullPaintInvalidationIncludingNonCompositingDescendantsInternal(t his);
3277 }
3262 3278
3263 } // namespace blink 3279 } // namespace blink
3264 3280
3265 #ifndef NDEBUG 3281 #ifndef NDEBUG
3266 3282
3267 void showTree(const blink::LayoutObject* object) 3283 void showTree(const blink::LayoutObject* object)
3268 { 3284 {
3269 if (object) 3285 if (object)
3270 object->showTreeForThis(); 3286 object->showTreeForThis();
3271 else 3287 else
(...skipping 19 matching lines...) Expand all
3291 const blink::LayoutObject* root = object1; 3307 const blink::LayoutObject* root = object1;
3292 while (root->parent()) 3308 while (root->parent())
3293 root = root->parent(); 3309 root = root->parent();
3294 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3310 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3295 } else { 3311 } else {
3296 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); 3312 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n");
3297 } 3313 }
3298 } 3314 }
3299 3315
3300 #endif 3316 #endif
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutObject.h ('k') | Source/core/paint/DeprecatedPaintLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698