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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
220 } | 220 } |
221 | 221 |
222 bool RenderLayerCompositor::acceleratedCompositingForOverflowScrollEnabled() con st | 222 bool RenderLayerCompositor::acceleratedCompositingForOverflowScrollEnabled() con st |
223 { | 223 { |
224 return m_compositingReasonFinder.hasOverflowScrollTrigger(); | 224 return m_compositingReasonFinder.hasOverflowScrollTrigger(); |
225 } | 225 } |
226 | 226 |
227 void RenderLayerCompositor::setCompositingLayersNeedRebuild() | 227 void RenderLayerCompositor::setCompositingLayersNeedRebuild() |
228 { | 228 { |
229 // FIXME: crbug.com/332248 ideally this could be merged with setNeedsComposi tingUpdate(). | 229 // FIXME: crbug.com/332248 ideally this could be merged with setNeedsComposi tingUpdate(). |
230 // FIXME: We can remove the staleInCompositingMode check once we get rid of the | 230 m_compositingLayersNeedRebuild = true; |
231 // forceCompositingMode setting. | |
232 if (staleInCompositingMode()) | |
ojan
2014/06/05 03:32:21
Honestly, I can't remember why this was blocked on
| |
233 m_compositingLayersNeedRebuild = true; | |
234 page()->animator().scheduleVisualUpdate(); | 231 page()->animator().scheduleVisualUpdate(); |
235 lifecycle().ensureStateAtMost(DocumentLifecycle::LayoutClean); | 232 lifecycle().ensureStateAtMost(DocumentLifecycle::LayoutClean); |
236 } | 233 } |
237 | 234 |
238 static RenderVideo* findFullscreenVideoRenderer(Document& document) | 235 static RenderVideo* findFullscreenVideoRenderer(Document& document) |
239 { | 236 { |
240 Element* fullscreenElement = FullscreenElementStack::fullscreenElementFrom(d ocument); | 237 Element* fullscreenElement = FullscreenElementStack::fullscreenElementFrom(d ocument); |
241 while (fullscreenElement && fullscreenElement->isFrameOwnerElement()) { | 238 while (fullscreenElement && fullscreenElement->isFrameOwnerElement()) { |
242 Document* contentDocument = toHTMLFrameOwnerElement(fullscreenElement)-> contentDocument(); | 239 Document* contentDocument = toHTMLFrameOwnerElement(fullscreenElement)-> contentDocument(); |
243 if (!contentDocument) | 240 if (!contentDocument) |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
464 { | 461 { |
465 bool compositedLayerMappingChanged = false; | 462 bool compositedLayerMappingChanged = false; |
466 bool nonCompositedReasonChanged = updateLayerIfViewportConstrained(layer); | 463 bool nonCompositedReasonChanged = updateLayerIfViewportConstrained(layer); |
467 | 464 |
468 // FIXME: It would be nice to directly use the layer's compositing reason, | 465 // FIXME: It would be nice to directly use the layer's compositing reason, |
469 // but allocateOrClearCompositedLayerMapping also gets called without having updated compositing | 466 // but allocateOrClearCompositedLayerMapping also gets called without having updated compositing |
470 // requirements fully. | 467 // requirements fully. |
471 switch (compositedLayerUpdate) { | 468 switch (compositedLayerUpdate) { |
472 case AllocateOwnCompositedLayerMapping: | 469 case AllocateOwnCompositedLayerMapping: |
473 ASSERT(!layer->hasCompositedLayerMapping()); | 470 ASSERT(!layer->hasCompositedLayerMapping()); |
474 { | 471 setCompositingModeEnabled(true); |
475 // FIXME: This can go away once we get rid of the forceCompositingMo de setting. | |
476 // It's needed because setCompositingModeEnabled call ensureRootLaye r, which | |
477 // eventually calls WebViewImpl::enterForceCompositingMode. | |
478 DeprecatedDirtyCompositingDuringCompositingUpdate marker(lifecycle() ); | |
479 setCompositingModeEnabled(true); | |
480 } | |
481 | 472 |
482 // If this layer was previously squashed, we need to remove its referenc e to a groupedMapping right away, so | 473 // If this layer was previously squashed, we need to remove its referenc e to a groupedMapping right away, so |
483 // that computing repaint rects will know the layer's correct compositin gState. | 474 // that computing repaint rects will know the layer's correct compositin gState. |
484 // FIXME: do we need to also remove the layer from it's location in the squashing list of its groupedMapping? | 475 // FIXME: do we need to also remove the layer from it's location in the squashing list of its groupedMapping? |
485 // Need to create a test where a squashed layer pops into compositing. A nd also to cover all other | 476 // Need to create a test where a squashed layer pops into compositing. A nd also to cover all other |
486 // sorts of compositingState transitions. | 477 // sorts of compositingState transitions. |
487 layer->setLostGroupedMapping(false); | 478 layer->setLostGroupedMapping(false); |
488 layer->setGroupedMapping(0); | 479 layer->setGroupedMapping(0); |
489 | 480 |
490 // If we need to repaint, do so before allocating the compositedLayerMap ping | 481 // If we need to repaint, do so before allocating the compositedLayerMap ping |
(...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1375 } else if (graphicsLayer == m_scrollLayer.get()) { | 1366 } else if (graphicsLayer == m_scrollLayer.get()) { |
1376 name = "LocalFrame Scrolling Layer"; | 1367 name = "LocalFrame Scrolling Layer"; |
1377 } else { | 1368 } else { |
1378 ASSERT_NOT_REACHED(); | 1369 ASSERT_NOT_REACHED(); |
1379 } | 1370 } |
1380 | 1371 |
1381 return name; | 1372 return name; |
1382 } | 1373 } |
1383 | 1374 |
1384 } // namespace WebCore | 1375 } // namespace WebCore |
OLD | NEW |