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

Side by Side Diff: Source/core/rendering/RenderLayer.cpp

Issue 68833004: Fix chicken and egg problem in composited bounds computation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 7 years, 1 month 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/rendering/CompositedLayerMapping.cpp ('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 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 3582 matching lines...) Expand 10 before | Expand all | Expand 10 after
3593 3593
3594 #if !ASSERT_DISABLED 3594 #if !ASSERT_DISABLED
3595 LayerListMutationDetector mutationChecker(const_cast<RenderLayer*>(this)->st ackingNode()); 3595 LayerListMutationDetector mutationChecker(const_cast<RenderLayer*>(this)->st ackingNode());
3596 #endif 3596 #endif
3597 3597
3598 // FIXME: Descendants that are composited should not necessarily be skipped, if they don't paint into their own 3598 // FIXME: Descendants that are composited should not necessarily be skipped, if they don't paint into their own
3599 // separate backing. Instead, they ought to contribute to the bounds of the layer we're trying to compute. 3599 // separate backing. Instead, they ought to contribute to the bounds of the layer we're trying to compute.
3600 // This applies to all z-order lists below. 3600 // This applies to all z-order lists below.
3601 RenderLayerStackingNodeIterator iterator(*m_stackingNode.get(), AllChildren) ; 3601 RenderLayerStackingNodeIterator iterator(*m_stackingNode.get(), AllChildren) ;
3602 while (RenderLayerStackingNode* node = iterator.next()) { 3602 while (RenderLayerStackingNode* node = iterator.next()) {
3603 // Node's compositing ancestor may have changed its draw content status
3604 // prior to updating its bounds. The requires-own-backing-store-for-ance stor-reasons
3605 // could be stale. Refresh them now.
3606 if (node->layer()->hasCompositedLayerMapping()) {
3607 RenderLayer* enclosingCompositingLayer = node->layer()->enclosingCom positingLayer(false);
3608 node->layer()->compositedLayerMapping()->updateRequiresOwnBackingSto reForAncestorReasons(enclosingCompositingLayer);
3609 }
3610
3603 if (flags & IncludeCompositedDescendants || !node->layer()->hasComposite dLayerMapping()) { 3611 if (flags & IncludeCompositedDescendants || !node->layer()->hasComposite dLayerMapping()) {
3604 IntRect childUnionBounds = node->layer()->calculateLayerBounds(this, 0, descendantFlags); 3612 IntRect childUnionBounds = node->layer()->calculateLayerBounds(this, 0, descendantFlags);
3605 unionBounds.unite(childUnionBounds); 3613 unionBounds.unite(childUnionBounds);
3606 } 3614 }
3607 } 3615 }
3608 3616
3609 // FIXME: We can optimize the size of the composited layers, by not enlargin g 3617 // FIXME: We can optimize the size of the composited layers, by not enlargin g
3610 // filtered areas with the outsets if we know that the filter is going to re nder in hardware. 3618 // filtered areas with the outsets if we know that the filter is going to re nder in hardware.
3611 // https://bugs.webkit.org/show_bug.cgi?id=81239 3619 // https://bugs.webkit.org/show_bug.cgi?id=81239
3612 if (flags & IncludeLayerFilterOutsets) 3620 if (flags & IncludeLayerFilterOutsets)
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
4157 } 4165 }
4158 } 4166 }
4159 4167
4160 void showLayerTree(const WebCore::RenderObject* renderer) 4168 void showLayerTree(const WebCore::RenderObject* renderer)
4161 { 4169 {
4162 if (!renderer) 4170 if (!renderer)
4163 return; 4171 return;
4164 showLayerTree(renderer->enclosingLayer()); 4172 showLayerTree(renderer->enclosingLayer());
4165 } 4173 }
4166 #endif 4174 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/CompositedLayerMapping.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698