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

Side by Side Diff: Source/core/rendering/compositing/GraphicsLayerUpdater.cpp

Issue 714933002: Set relayoutChildren to 'true' only if size change happens in Table (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: wrong patch Created 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2014 Google Inc. All rights reserved. 3 * Copyright (C) 2014 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 83
84 void GraphicsLayerUpdater::update(RenderLayer& layer, Vector<RenderLayer*>& laye rsNeedingPaintInvalidation) 84 void GraphicsLayerUpdater::update(RenderLayer& layer, Vector<RenderLayer*>& laye rsNeedingPaintInvalidation)
85 { 85 {
86 TRACE_EVENT0("blink", "GraphicsLayerUpdater::update"); 86 TRACE_EVENT0("blink", "GraphicsLayerUpdater::update");
87 updateRecursive(layer, DoNotForceUpdate, UpdateContext(), layersNeedingPaint Invalidation); 87 updateRecursive(layer, DoNotForceUpdate, UpdateContext(), layersNeedingPaint Invalidation);
88 layer.compositor()->updateRootLayerPosition(); 88 layer.compositor()->updateRootLayerPosition();
89 } 89 }
90 90
91 void GraphicsLayerUpdater::updateRecursive(RenderLayer& layer, UpdateType update Type, const UpdateContext& context, Vector<RenderLayer*>& layersNeedingPaintInva lidation) 91 void GraphicsLayerUpdater::updateRecursive(RenderLayer& layer, UpdateType update Type, const UpdateContext& context, Vector<RenderLayer*>& layersNeedingPaintInva lidation)
92 { 92 {
93 if (layer.hasCompositedLayerMapping()) { 93 if (CompositedLayerMapping* compositedLayerMapping = layer.compositedLayerMa pping()) {
94 CompositedLayerMapping* mapping = layer.compositedLayerMapping(); 94 if (updateType == ForceUpdate || compositedLayerMapping->needsGraphicsLa yerUpdate()) {
95
96 if (updateType == ForceUpdate || mapping->needsGraphicsLayerUpdate()) {
97 const RenderLayer* compositingContainer = context.compositingContain er(layer); 95 const RenderLayer* compositingContainer = context.compositingContain er(layer);
98 ASSERT(compositingContainer == layer.enclosingLayerWithCompositedLay erMapping(ExcludeSelf)); 96 ASSERT(compositingContainer == layer.enclosingLayerWithCompositedLay erMapping(ExcludeSelf));
99 97
100 if (mapping->updateGraphicsLayerConfiguration()) 98 if (compositedLayerMapping->updateGraphicsLayerConfiguration())
101 m_needsRebuildTree = true; 99 m_needsRebuildTree = true;
102 100
103 mapping->updateGraphicsLayerGeometry(compositingContainer, context.c ompositingStackingContext(), layersNeedingPaintInvalidation); 101 compositedLayerMapping->updateGraphicsLayerGeometry(compositingConta iner, context.compositingStackingContext(), layersNeedingPaintInvalidation);
104 102
105 if (mapping->hasUnpositionedOverflowControlsLayers()) 103 if (compositedLayerMapping->hasUnpositionedOverflowControlsLayers())
106 layer.scrollableArea()->positionOverflowControls(IntSize()); 104 layer.scrollableArea()->positionOverflowControls(IntSize());
107 105
108 updateType = mapping->updateTypeForChildren(updateType); 106 updateType = compositedLayerMapping->updateTypeForChildren(updateTyp e);
109 mapping->clearNeedsGraphicsLayerUpdate(); 107 compositedLayerMapping->clearNeedsGraphicsLayerUpdate();
110 } 108 }
111 } 109 }
112 110
113 UpdateContext childContext(context, layer); 111 UpdateContext childContext(context, layer);
114 for (RenderLayer* child = layer.firstChild(); child; child = child->nextSibl ing()) 112 for (RenderLayer* child = layer.firstChild(); child; child = child->nextSibl ing())
115 updateRecursive(*child, updateType, childContext, layersNeedingPaintInva lidation); 113 updateRecursive(*child, updateType, childContext, layersNeedingPaintInva lidation);
116 } 114 }
117 115
118 #if ENABLE(ASSERT) 116 #if ENABLE(ASSERT)
119 117
120 void GraphicsLayerUpdater::assertNeedsToUpdateGraphicsLayerBitsCleared(RenderLay er& layer) 118 void GraphicsLayerUpdater::assertNeedsToUpdateGraphicsLayerBitsCleared(RenderLay er& layer)
121 { 119 {
122 if (layer.hasCompositedLayerMapping()) 120 if (CompositedLayerMapping* compositedLayerMapping = layer.compositedLayerMa pping())
123 layer.compositedLayerMapping()->assertNeedsToUpdateGraphicsLayerBitsClea red(); 121 compositedLayerMapping->assertNeedsToUpdateGraphicsLayerBitsCleared();
124 122
125 for (RenderLayer* child = layer.firstChild(); child; child = child->nextSibl ing()) 123 for (RenderLayer* child = layer.firstChild(); child; child = child->nextSibl ing())
126 assertNeedsToUpdateGraphicsLayerBitsCleared(*child); 124 assertNeedsToUpdateGraphicsLayerBitsCleared(*child);
127 } 125 }
128 126
129 #endif 127 #endif
130 128
131 } // namespace blink 129 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698