| 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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 startTime = currentTime(); | 447 startTime = currentTime(); |
| 448 } | 448 } |
| 449 #endif | 449 #endif |
| 450 | 450 |
| 451 if (checkForHierarchyUpdate) { | 451 if (checkForHierarchyUpdate) { |
| 452 // Go through the layers in presentation order, so that we can compute w
hich RenderLayers need compositing layers. | 452 // Go through the layers in presentation order, so that we can compute w
hich RenderLayers need compositing layers. |
| 453 // FIXME: we could maybe do this and the hierarchy udpate in one pass, b
ut the parenting logic would be more complex. | 453 // FIXME: we could maybe do this and the hierarchy udpate in one pass, b
ut the parenting logic would be more complex. |
| 454 CompositingState compState(updateRoot, m_compositingConsultsOverlap); | 454 CompositingState compState(updateRoot, m_compositingConsultsOverlap); |
| 455 bool layersChanged = false; | 455 bool layersChanged = false; |
| 456 bool saw3DTransform = false; | 456 bool saw3DTransform = false; |
| 457 m_fixedPositionLayerNotCompositedReasonMap.clear(); | |
| 458 if (m_compositingConsultsOverlap) { | 457 if (m_compositingConsultsOverlap) { |
| 459 OverlapMap overlapTestRequestMap; | 458 OverlapMap overlapTestRequestMap; |
| 460 computeCompositingRequirements(0, updateRoot, &overlapTestRequestMap
, compState, layersChanged, saw3DTransform); | 459 computeCompositingRequirements(0, updateRoot, &overlapTestRequestMap
, compState, layersChanged, saw3DTransform); |
| 461 } else | 460 } else |
| 462 computeCompositingRequirements(0, updateRoot, 0, compState, layersCh
anged, saw3DTransform); | 461 computeCompositingRequirements(0, updateRoot, 0, compState, layersCh
anged, saw3DTransform); |
| 463 | 462 |
| 464 needHierarchyUpdate |= layersChanged; | 463 needHierarchyUpdate |= layersChanged; |
| 465 } | 464 } |
| 466 | 465 |
| 467 #if !LOG_DISABLED | 466 #if !LOG_DISABLED |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 | 542 |
| 544 LOG(Compositing, "%*p %dx%d %.2fKB (%s) %s\n", 12 + depth * 2, layer, backin
g->compositedBounds().width(), backing->compositedBounds().height(), | 543 LOG(Compositing, "%*p %dx%d %.2fKB (%s) %s\n", 12 + depth * 2, layer, backin
g->compositedBounds().width(), backing->compositedBounds().height(), |
| 545 backing->backingStoreMemoryEstimate() / 1024, | 544 backing->backingStoreMemoryEstimate() / 1024, |
| 546 reasonForCompositing(layer), layer->backing()->nameForLayer().utf8().dat
a()); | 545 reasonForCompositing(layer), layer->backing()->nameForLayer().utf8().dat
a()); |
| 547 } | 546 } |
| 548 #endif | 547 #endif |
| 549 | 548 |
| 550 bool RenderLayerCompositor::updateBacking(RenderLayer* layer, CompositingChangeR
epaint shouldRepaint) | 549 bool RenderLayerCompositor::updateBacking(RenderLayer* layer, CompositingChangeR
epaint shouldRepaint) |
| 551 { | 550 { |
| 552 bool layerChanged = false; | 551 bool layerChanged = false; |
| 552 RenderLayer::ViewportConstrainedNotCompositedReason viewportConstrainedNotCo
mpositedReason = RenderLayer::NoNotCompositedReason; |
| 553 | 553 |
| 554 if (needsToBeComposited(layer)) { | 554 if (needsToBeComposited(layer, &viewportConstrainedNotCompositedReason)) { |
| 555 enableCompositingMode(); | 555 enableCompositingMode(); |
| 556 | 556 |
| 557 if (!layer->backing()) { | 557 if (!layer->backing()) { |
| 558 // If we need to repaint, do so before making backing | 558 // If we need to repaint, do so before making backing |
| 559 if (shouldRepaint == CompositingChangeRepaintNow) | 559 if (shouldRepaint == CompositingChangeRepaintNow) |
| 560 repaintOnCompositingChange(layer); | 560 repaintOnCompositingChange(layer); |
| 561 | 561 |
| 562 layer->ensureBacking(); | 562 layer->ensureBacking(); |
| 563 | 563 |
| 564 // At this time, the ScrollingCooridnator only supports the top-leve
l frame. | 564 // At this time, the ScrollingCooridnator only supports the top-leve
l frame. |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 | 616 |
| 617 if (layerChanged && layer->renderer()->isRenderPart()) { | 617 if (layerChanged && layer->renderer()->isRenderPart()) { |
| 618 RenderLayerCompositor* innerCompositor = frameContentsCompositor(toRende
rPart(layer->renderer())); | 618 RenderLayerCompositor* innerCompositor = frameContentsCompositor(toRende
rPart(layer->renderer())); |
| 619 if (innerCompositor && innerCompositor->inCompositingMode()) | 619 if (innerCompositor && innerCompositor->inCompositingMode()) |
| 620 innerCompositor->updateRootLayerAttachment(); | 620 innerCompositor->updateRootLayerAttachment(); |
| 621 } | 621 } |
| 622 | 622 |
| 623 if (layerChanged) | 623 if (layerChanged) |
| 624 layer->clearClipRectsIncludingDescendants(PaintingClipRects); | 624 layer->clearClipRectsIncludingDescendants(PaintingClipRects); |
| 625 | 625 |
| 626 // If a fixed position layer gained/lost a backing, the scrolling coordinato
r needs to recalculate whether it can do fast scrolling. | 626 // If a fixed position layer gained/lost a backing or the reason not composi
ting it changed, |
| 627 if (layerChanged && layer->renderer()->style()->position() == FixedPosition)
{ | 627 // the scrolling coordinator needs to recalculate whether it can do fast scr
olling. |
| 628 if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordina
tor()) | 628 if (layer->renderer()->style()->position() == FixedPosition) { |
| 629 scrollingCoordinator->frameViewFixedObjectsDidChange(m_renderView->f
rameView()); | 629 if (layer->viewportConstrainedNotCompositedReason() != viewportConstrain
edNotCompositedReason) { |
| 630 layer->setViewportConstrainedNotCompositedReason(viewportConstrained
NotCompositedReason); |
| 631 layerChanged = true; |
| 632 } |
| 633 if (layerChanged) { |
| 634 if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoor
dinator()) |
| 635 scrollingCoordinator->frameViewFixedObjectsDidChange(m_renderVie
w->frameView()); |
| 636 } |
| 630 } | 637 } |
| 631 | 638 |
| 632 if (layer->backing()) | 639 if (layer->backing()) |
| 633 layer->backing()->updateDebugIndicators(m_showDebugBorders, m_showRepain
tCounter); | 640 layer->backing()->updateDebugIndicators(m_showDebugBorders, m_showRepain
tCounter); |
| 634 | 641 |
| 635 return layerChanged; | 642 return layerChanged; |
| 636 } | 643 } |
| 637 | 644 |
| 638 bool RenderLayerCompositor::updateLayerCompositingState(RenderLayer* layer, Comp
ositingChangeRepaint shouldRepaint) | 645 bool RenderLayerCompositor::updateLayerCompositingState(RenderLayer* layer, Comp
ositingChangeRepaint shouldRepaint) |
| 639 { | 646 { |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 838 #endif | 845 #endif |
| 839 | 846 |
| 840 layer->setIndirectCompositingReason(compositingReason); | 847 layer->setIndirectCompositingReason(compositingReason); |
| 841 | 848 |
| 842 // The children of this layer don't need to composite, unless there is | 849 // The children of this layer don't need to composite, unless there is |
| 843 // a compositing layer among them, so start by inheriting the compositing | 850 // a compositing layer among them, so start by inheriting the compositing |
| 844 // ancestor with m_subtreeIsCompositing set to false. | 851 // ancestor with m_subtreeIsCompositing set to false. |
| 845 CompositingState childState(compositingState); | 852 CompositingState childState(compositingState); |
| 846 childState.m_subtreeIsCompositing = false; | 853 childState.m_subtreeIsCompositing = false; |
| 847 | 854 |
| 848 FixedPositionLayerNotCompositedReason fixedPositionLayerNotCompositedReason
= NoReason; | 855 bool willBeComposited = needsToBeComposited(layer); |
| 849 bool willBeComposited = needsToBeComposited(layer, &fixedPositionLayerNotCom
positedReason); | |
| 850 if (willBeComposited) { | 856 if (willBeComposited) { |
| 851 // Tell the parent it has compositing descendants. | 857 // Tell the parent it has compositing descendants. |
| 852 compositingState.m_subtreeIsCompositing = true; | 858 compositingState.m_subtreeIsCompositing = true; |
| 853 // This layer now acts as the ancestor for kids. | 859 // This layer now acts as the ancestor for kids. |
| 854 childState.m_compositingAncestor = layer; | 860 childState.m_compositingAncestor = layer; |
| 855 | 861 |
| 856 if (overlapMap) | 862 if (overlapMap) |
| 857 overlapMap->pushCompositingContainer(); | 863 overlapMap->pushCompositingContainer(); |
| 858 } else if (fixedPositionLayerNotCompositedReason != NoReason) | 864 } |
| 859 m_fixedPositionLayerNotCompositedReasonMap.set(layer, fixedPositionLayer
NotCompositedReason); | |
| 860 | 865 |
| 861 #if !ASSERT_DISABLED | 866 #if !ASSERT_DISABLED |
| 862 LayerListMutationDetector mutationChecker(layer); | 867 LayerListMutationDetector mutationChecker(layer); |
| 863 #endif | 868 #endif |
| 864 | 869 |
| 865 bool anyDescendantHas3DTransform = false; | 870 bool anyDescendantHas3DTransform = false; |
| 866 | 871 |
| 867 if (layer->isStackingContext()) { | 872 if (layer->isStackingContext()) { |
| 868 if (Vector<RenderLayer*>* negZOrderList = layer->negZOrderList()) { | 873 if (Vector<RenderLayer*>* negZOrderList = layer->negZOrderList()) { |
| 869 size_t listSize = negZOrderList->size(); | 874 size_t listSize = negZOrderList->size(); |
| (...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1557 if (frameRenderer->widget()) { | 1562 if (frameRenderer->widget()) { |
| 1558 ASSERT(frameRenderer->widget()->isFrameView()); | 1563 ASSERT(frameRenderer->widget()->isFrameView()); |
| 1559 FrameView* view = static_cast<FrameView*>(frameRenderer->widget()); | 1564 FrameView* view = static_cast<FrameView*>(frameRenderer->widget()); |
| 1560 if (view->isOverlappedIncludingAncestors() || view->hasCompositingAncest
or()) | 1565 if (view->isOverlappedIncludingAncestors() || view->hasCompositingAncest
or()) |
| 1561 return true; | 1566 return true; |
| 1562 } | 1567 } |
| 1563 | 1568 |
| 1564 return false; | 1569 return false; |
| 1565 } | 1570 } |
| 1566 | 1571 |
| 1567 bool RenderLayerCompositor::needsToBeComposited(const RenderLayer* layer, FixedP
ositionLayerNotCompositedReason* fixedPositionLayerNotCompositedReason) const | 1572 bool RenderLayerCompositor::needsToBeComposited(const RenderLayer* layer, Render
Layer::ViewportConstrainedNotCompositedReason* viewportConstrainedNotCompositedR
eason) const |
| 1568 { | 1573 { |
| 1569 if (!canBeComposited(layer)) | 1574 if (!canBeComposited(layer)) |
| 1570 return false; | 1575 return false; |
| 1571 | 1576 |
| 1572 return requiresCompositingLayer(layer, fixedPositionLayerNotCompositedReason
) || layer->mustCompositeForIndirectReasons() || (inCompositingMode() && layer->
isRootLayer()); | 1577 return requiresCompositingLayer(layer, viewportConstrainedNotCompositedReaso
n) || layer->mustCompositeForIndirectReasons() || (inCompositingMode() && layer-
>isRootLayer()); |
| 1573 } | 1578 } |
| 1574 | 1579 |
| 1575 // Note: this specifies whether the RL needs a compositing layer for intrinsic r
easons. | 1580 // Note: this specifies whether the RL needs a compositing layer for intrinsic r
easons. |
| 1576 // Use needsToBeComposited() to determine if a RL actually needs a compositing l
ayer. | 1581 // Use needsToBeComposited() to determine if a RL actually needs a compositing l
ayer. |
| 1577 // static | 1582 // static |
| 1578 bool RenderLayerCompositor::requiresCompositingLayer(const RenderLayer* layer, F
ixedPositionLayerNotCompositedReason* fixedPositionLayerNotCompositedReason) con
st | 1583 bool RenderLayerCompositor::requiresCompositingLayer(const RenderLayer* layer, R
enderLayer::ViewportConstrainedNotCompositedReason* viewportConstrainedNotCompos
itedReason) const |
| 1579 { | 1584 { |
| 1580 RenderObject* renderer = layer->renderer(); | 1585 RenderObject* renderer = layer->renderer(); |
| 1581 // The compositing state of a reflection should match that of its reflected
layer. | 1586 // The compositing state of a reflection should match that of its reflected
layer. |
| 1582 if (layer->isReflection()) { | 1587 if (layer->isReflection()) { |
| 1583 renderer = renderer->parent(); // The RenderReplica's parent is the obje
ct being reflected. | 1588 renderer = renderer->parent(); // The RenderReplica's parent is the obje
ct being reflected. |
| 1584 layer = toRenderLayerModelObject(renderer)->layer(); | 1589 layer = toRenderLayerModelObject(renderer)->layer(); |
| 1585 } | 1590 } |
| 1586 // The root layer always has a compositing layer, but it may not have backin
g. | 1591 // The root layer always has a compositing layer, but it may not have backin
g. |
| 1587 return requiresCompositingForTransform(renderer) | 1592 return requiresCompositingForTransform(renderer) |
| 1588 || requiresCompositingForVideo(renderer) | 1593 || requiresCompositingForVideo(renderer) |
| 1589 || requiresCompositingForCanvas(renderer) | 1594 || requiresCompositingForCanvas(renderer) |
| 1590 || requiresCompositingForPlugin(renderer) | 1595 || requiresCompositingForPlugin(renderer) |
| 1591 || requiresCompositingForFrame(renderer) | 1596 || requiresCompositingForFrame(renderer) |
| 1592 || (canRender3DTransforms() && renderer->style()->backfaceVisibility() =
= BackfaceVisibilityHidden) | 1597 || (canRender3DTransforms() && renderer->style()->backfaceVisibility() =
= BackfaceVisibilityHidden) |
| 1593 || clipsCompositingDescendants(layer) | 1598 || clipsCompositingDescendants(layer) |
| 1594 || requiresCompositingForAnimation(renderer) | 1599 || requiresCompositingForAnimation(renderer) |
| 1595 || requiresCompositingForFilters(renderer) | 1600 || requiresCompositingForFilters(renderer) |
| 1596 || requiresCompositingForPosition(renderer, layer, fixedPositionLayerNot
CompositedReason) | 1601 || requiresCompositingForPosition(renderer, layer, viewportConstrainedNo
tCompositedReason) |
| 1597 || requiresCompositingForOverflowScrolling(layer) | 1602 || requiresCompositingForOverflowScrolling(layer) |
| 1598 || requiresCompositingForBlending(renderer); | 1603 || requiresCompositingForBlending(renderer); |
| 1599 } | 1604 } |
| 1600 | 1605 |
| 1601 bool RenderLayerCompositor::canBeComposited(const RenderLayer* layer) const | 1606 bool RenderLayerCompositor::canBeComposited(const RenderLayer* layer) const |
| 1602 { | 1607 { |
| 1603 // FIXME: We disable accelerated compositing for elements in a RenderFlowThr
ead as it doesn't work properly. | 1608 // FIXME: We disable accelerated compositing for elements in a RenderFlowThr
ead as it doesn't work properly. |
| 1604 // See http://webkit.org/b/84900 to re-enable it. | 1609 // See http://webkit.org/b/84900 to re-enable it. |
| 1605 return m_hasAcceleratedCompositing && layer->isSelfPaintingLayer() && !layer
->renderer()->inRenderFlowThread(); | 1610 return m_hasAcceleratedCompositing && layer->isSelfPaintingLayer() && !layer
->renderer()->inRenderFlowThread(); |
| 1606 } | 1611 } |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1674 if (clipsCompositingDescendants(layer)) | 1679 if (clipsCompositingDescendants(layer)) |
| 1675 return "clips compositing descendants"; | 1680 return "clips compositing descendants"; |
| 1676 | 1681 |
| 1677 if (requiresCompositingForAnimation(renderer)) | 1682 if (requiresCompositingForAnimation(renderer)) |
| 1678 return "animation"; | 1683 return "animation"; |
| 1679 | 1684 |
| 1680 if (requiresCompositingForFilters(renderer)) | 1685 if (requiresCompositingForFilters(renderer)) |
| 1681 return "filters"; | 1686 return "filters"; |
| 1682 | 1687 |
| 1683 if (requiresCompositingForPosition(renderer, layer)) | 1688 if (requiresCompositingForPosition(renderer, layer)) |
| 1684 return "position: fixed"; | 1689 return renderer->style()->position() == FixedPosition ? "position: fixed
" : "position: sticky"; |
| 1685 | 1690 |
| 1686 if (requiresCompositingForOverflowScrolling(layer)) | 1691 if (requiresCompositingForOverflowScrolling(layer)) |
| 1687 return "-webkit-overflow-scrolling: touch"; | 1692 return "-webkit-overflow-scrolling: touch"; |
| 1688 | 1693 |
| 1689 if (layer->indirectCompositingReason() == RenderLayer::IndirectCompositingFo
rStacking) | 1694 if (layer->indirectCompositingReason() == RenderLayer::IndirectCompositingFo
rStacking) |
| 1690 return "stacking"; | 1695 return "stacking"; |
| 1691 | 1696 |
| 1692 if (layer->indirectCompositingReason() == RenderLayer::IndirectCompositingFo
rOverlap) | 1697 if (layer->indirectCompositingReason() == RenderLayer::IndirectCompositingFo
rOverlap) |
| 1693 return "overlap"; | 1698 return "overlap"; |
| 1694 | 1699 |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1964 bool RenderLayerCompositor::requiresCompositingForBlending(RenderObject* rendere
r) const | 1969 bool RenderLayerCompositor::requiresCompositingForBlending(RenderObject* rendere
r) const |
| 1965 { | 1970 { |
| 1966 #if ENABLE(CSS_COMPOSITING) | 1971 #if ENABLE(CSS_COMPOSITING) |
| 1967 return renderer->hasBlendMode(); | 1972 return renderer->hasBlendMode(); |
| 1968 #else | 1973 #else |
| 1969 UNUSED_PARAM(renderer); | 1974 UNUSED_PARAM(renderer); |
| 1970 return false; | 1975 return false; |
| 1971 #endif | 1976 #endif |
| 1972 } | 1977 } |
| 1973 | 1978 |
| 1974 bool RenderLayerCompositor::requiresCompositingForPosition(RenderObject* rendere
r, const RenderLayer* layer, FixedPositionLayerNotCompositedReason* fixedPositio
nLayerNotCompositedReason) const | 1979 bool RenderLayerCompositor::requiresCompositingForPosition(RenderObject* rendere
r, const RenderLayer* layer, RenderLayer::ViewportConstrainedNotCompositedReason
* viewportConstrainedNotCompositedReason) const |
| 1975 { | 1980 { |
| 1976 // position:fixed elements that create their own stacking context (e.g. have
an explicit z-index, | 1981 // position:fixed elements that create their own stacking context (e.g. have
an explicit z-index, |
| 1977 // opacity, transform) can get their own composited layer. A stacking contex
t is required otherwise | 1982 // opacity, transform) can get their own composited layer. A stacking contex
t is required otherwise |
| 1978 // z-index and clipping will be broken. | 1983 // z-index and clipping will be broken. |
| 1979 if (!(renderer->isOutOfFlowPositioned() && renderer->style()->position() ==
FixedPosition && layer->isStackingContext())) | 1984 if (!(renderer->isOutOfFlowPositioned() && renderer->style()->position() ==
FixedPosition && layer->isStackingContext())) |
| 1980 return false; | 1985 return false; |
| 1981 | 1986 |
| 1982 if (Settings* settings = m_renderView->document()->settings()) | 1987 if (Settings* settings = m_renderView->document()->settings()) |
| 1983 if (!settings->acceleratedCompositingForFixedPositionEnabled()) | 1988 if (!settings->acceleratedCompositingForFixedPositionEnabled()) |
| 1984 return false; | 1989 return false; |
| 1985 | 1990 |
| 1986 RenderObject* container = renderer->container(); | 1991 RenderObject* container = renderer->container(); |
| 1987 // If the renderer is not hooked up yet then we have to wait until it is. | 1992 // If the renderer is not hooked up yet then we have to wait until it is. |
| 1988 if (!container) { | 1993 if (!container) { |
| 1989 m_reevaluateCompositingAfterLayout = true; | 1994 m_reevaluateCompositingAfterLayout = true; |
| 1990 return false; | 1995 return false; |
| 1991 } | 1996 } |
| 1992 | 1997 |
| 1993 // Don't promote fixed position elements that are descendants of transformed
elements. | 1998 // Don't promote fixed position elements that are descendants of a non-view
container, e.g. transformed elements. |
| 1994 // They will stay fixed wrt the transformed element rather than the enclosin
g frame. | 1999 // They will stay fixed wrt the container rather than the enclosing frame. |
| 1995 if (container != m_renderView) { | 2000 if (container != m_renderView) { |
| 1996 if (fixedPositionLayerNotCompositedReason) | 2001 if (viewportConstrainedNotCompositedReason) |
| 1997 *fixedPositionLayerNotCompositedReason = DescendantOfTransformedElem
ent; | 2002 *viewportConstrainedNotCompositedReason = RenderLayer::NotComposited
ForNonViewContainer; |
| 1998 return false; | 2003 return false; |
| 1999 } | 2004 } |
| 2000 | 2005 |
| 2001 // Fixed position elements that are invisible in the current view don't get
their own layer. | 2006 // Fixed position elements that are invisible in the current view don't get
their own layer. |
| 2002 if (FrameView* frameView = m_renderView->frameView()) { | 2007 if (FrameView* frameView = m_renderView->frameView()) { |
| 2003 IntRect viewBounds = frameView->visibleContentRect(); | 2008 IntRect viewBounds = frameView->visibleContentRect(); |
| 2004 LayoutRect layerBounds = layer->calculateLayerBounds(rootRenderLayer(),
0, RenderLayer::DefaultCalculateLayerBoundsFlags | 2009 LayoutRect layerBounds = layer->calculateLayerBounds(rootRenderLayer(),
0, RenderLayer::DefaultCalculateLayerBoundsFlags |
| 2005 | RenderLayer::ExcludeHiddenDescendants | RenderLayer::DontConstrain
ForMask | RenderLayer::IncludeCompositedDescendants); | 2010 | RenderLayer::ExcludeHiddenDescendants | RenderLayer::DontConstrain
ForMask | RenderLayer::IncludeCompositedDescendants); |
| 2006 layerBounds.scale(frameView->frame()->frameScaleFactor()); | 2011 layerBounds.scale(frameView->frame()->frameScaleFactor()); |
| 2007 if (!viewBounds.intersects(enclosingIntRect(layerBounds))) { | 2012 if (!viewBounds.intersects(enclosingIntRect(layerBounds))) { |
| 2008 if (fixedPositionLayerNotCompositedReason) | 2013 if (viewportConstrainedNotCompositedReason) |
| 2009 *fixedPositionLayerNotCompositedReason = LayerBoundsOutOfView; | 2014 *viewportConstrainedNotCompositedReason = RenderLayer::NotCompos
itedForBoundsOutOfView; |
| 2010 return false; | 2015 return false; |
| 2011 } | 2016 } |
| 2012 } | 2017 } |
| 2013 | 2018 |
| 2014 return true; | 2019 return true; |
| 2015 } | 2020 } |
| 2016 | 2021 |
| 2017 bool RenderLayerCompositor::requiresCompositingForOverflowScrolling(const Render
Layer* layer) const | 2022 bool RenderLayerCompositor::requiresCompositingForOverflowScrolling(const Render
Layer* layer) const |
| 2018 { | 2023 { |
| 2019 return layer->needsCompositedScrolling(); | 2024 return layer->needsCompositedScrolling(); |
| (...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2798 #if ENABLE(RUBBER_BANDING) | 2803 #if ENABLE(RUBBER_BANDING) |
| 2799 info.addMember(m_layerForOverhangAreas); | 2804 info.addMember(m_layerForOverhangAreas); |
| 2800 info.addMember(m_contentShadowLayer); | 2805 info.addMember(m_contentShadowLayer); |
| 2801 #endif | 2806 #endif |
| 2802 info.addMember(m_layerUpdater); | 2807 info.addMember(m_layerUpdater); |
| 2803 } | 2808 } |
| 2804 | 2809 |
| 2805 } // namespace WebCore | 2810 } // namespace WebCore |
| 2806 | 2811 |
| 2807 #endif // USE(ACCELERATED_COMPOSITING) | 2812 #endif // USE(ACCELERATED_COMPOSITING) |
| OLD | NEW |