OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
187 void updateDescendantDependentFlagsForEntireSubtree(DeprecatedPaintLayer& layer) | 187 void updateDescendantDependentFlagsForEntireSubtree(DeprecatedPaintLayer& layer) |
188 { | 188 { |
189 layer.updateDescendantDependentFlags(); | 189 layer.updateDescendantDependentFlags(); |
190 | 190 |
191 for (DeprecatedPaintLayer* child = layer.firstChild(); child; child = child- >nextSibling()) | 191 for (DeprecatedPaintLayer* child = layer.firstChild(); child; child = child- >nextSibling()) |
192 updateDescendantDependentFlagsForEntireSubtree(*child); | 192 updateDescendantDependentFlagsForEntireSubtree(*child); |
193 } | 193 } |
194 | 194 |
195 void DeprecatedPaintLayerCompositor::updateIfNeededRecursive() | 195 void DeprecatedPaintLayerCompositor::updateIfNeededRecursive() |
196 { | 196 { |
197 FrameView* view = m_layoutView.frameView(); | |
198 if (view->shouldThrottleStyleLayoutAndCompositingUpdates()) | |
199 return; | |
200 | |
197 for (Frame* child = m_layoutView.frameView()->frame().tree().firstChild(); c hild; child = child->tree().nextSibling()) { | 201 for (Frame* child = m_layoutView.frameView()->frame().tree().firstChild(); c hild; child = child->tree().nextSibling()) { |
198 if (!child->isLocalFrame()) | 202 if (!child->isLocalFrame()) |
199 continue; | 203 continue; |
200 LocalFrame* localFrame = toLocalFrame(child); | 204 LocalFrame* localFrame = toLocalFrame(child); |
201 // It's possible for trusted Pepper plugins to force hit testing in situ ations where | 205 // It's possible for trusted Pepper plugins to force hit testing in situ ations where |
202 // the frame tree is in an inconsistent state, such as in the middle of frame detach. | 206 // the frame tree is in an inconsistent state, such as in the middle of frame detach. |
203 // TODO(bbudge) Remove this check when trusted Pepper plugins are gone. | 207 // TODO(bbudge) Remove this check when trusted Pepper plugins are gone. |
204 if (localFrame->document()->isActive()) | 208 if (localFrame->document()->isActive()) |
205 localFrame->contentLayoutObject()->compositor()->updateIfNeededRecur sive(); | 209 localFrame->contentLayoutObject()->compositor()->updateIfNeededRecur sive(); |
206 } | 210 } |
(...skipping 24 matching lines...) Expand all Loading... | |
231 m_layoutView.frameView()->scrollableArea()->updateCompositorScrollAnimations (); | 235 m_layoutView.frameView()->scrollableArea()->updateCompositorScrollAnimations (); |
232 if (const FrameView::ScrollableAreaSet* animatingScrollableAreas = m_layoutV iew.frameView()->animatingScrollableAreas()) { | 236 if (const FrameView::ScrollableAreaSet* animatingScrollableAreas = m_layoutV iew.frameView()->animatingScrollableAreas()) { |
233 for (ScrollableArea* scrollableArea : *animatingScrollableAreas) | 237 for (ScrollableArea* scrollableArea : *animatingScrollableAreas) |
234 scrollableArea->updateCompositorScrollAnimations(); | 238 scrollableArea->updateCompositorScrollAnimations(); |
235 } | 239 } |
236 | 240 |
237 #if ENABLE(ASSERT) | 241 #if ENABLE(ASSERT) |
238 ASSERT(lifecycle().state() == DocumentLifecycle::CompositingClean); | 242 ASSERT(lifecycle().state() == DocumentLifecycle::CompositingClean); |
239 assertNoUnresolvedDirtyBits(); | 243 assertNoUnresolvedDirtyBits(); |
240 for (Frame* child = m_layoutView.frameView()->frame().tree().firstChild(); c hild; child = child->tree().nextSibling()) { | 244 for (Frame* child = m_layoutView.frameView()->frame().tree().firstChild(); c hild; child = child->tree().nextSibling()) { |
241 if (child->isLocalFrame()) | 245 if (!child->isLocalFrame()) |
242 toLocalFrame(child)->contentLayoutObject()->compositor()->assertNoUn resolvedDirtyBits(); | 246 continue; |
247 LocalFrame* localFrame = toLocalFrame(child); | |
248 if (FrameView* childView = localFrame->view()) { | |
ojan
2015/09/01 19:56:48
Nit: Looks like you're going from Frame-->FrameVie
Sami
2015/09/02 10:46:02
Good idea, done. (I assume you meant LocalFrame in
| |
249 if (childView->shouldThrottleStyleLayoutAndCompositingUpdates()) | |
250 continue; | |
251 } | |
252 localFrame->contentLayoutObject()->compositor()->assertNoUnresolvedDirty Bits(); | |
243 } | 253 } |
244 #endif | 254 #endif |
245 } | 255 } |
246 | 256 |
247 void DeprecatedPaintLayerCompositor::setNeedsCompositingUpdate(CompositingUpdate Type updateType) | 257 void DeprecatedPaintLayerCompositor::setNeedsCompositingUpdate(CompositingUpdate Type updateType) |
248 { | 258 { |
249 ASSERT(updateType != CompositingUpdateNone); | 259 ASSERT(updateType != CompositingUpdateNone); |
250 m_pendingUpdateType = std::max(m_pendingUpdateType, updateType); | 260 m_pendingUpdateType = std::max(m_pendingUpdateType, updateType); |
251 page()->animator().scheduleVisualUpdate(m_layoutView.frame()); | 261 page()->animator().scheduleVisualUpdate(m_layoutView.frame()); |
252 lifecycle().ensureStateAtMost(DocumentLifecycle::LayoutClean); | 262 lifecycle().ensureStateAtMost(DocumentLifecycle::LayoutClean); |
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1208 } else if (graphicsLayer == m_scrollLayer.get()) { | 1218 } else if (graphicsLayer == m_scrollLayer.get()) { |
1209 name = "LocalFrame Scrolling Layer"; | 1219 name = "LocalFrame Scrolling Layer"; |
1210 } else { | 1220 } else { |
1211 ASSERT_NOT_REACHED(); | 1221 ASSERT_NOT_REACHED(); |
1212 } | 1222 } |
1213 | 1223 |
1214 return name; | 1224 return name; |
1215 } | 1225 } |
1216 | 1226 |
1217 } // namespace blink | 1227 } // namespace blink |
OLD | NEW |