| 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 1640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1651 if (layer->isRootLayer() | 1651 if (layer->isRootLayer() |
| 1652 || layer->transform() // note: excludes perspective and transformStyle3D
. | 1652 || layer->transform() // note: excludes perspective and transformStyle3D
. |
| 1653 || requiresCompositingForVideo(renderer) | 1653 || requiresCompositingForVideo(renderer) |
| 1654 || requiresCompositingForCanvas(renderer) | 1654 || requiresCompositingForCanvas(renderer) |
| 1655 || requiresCompositingForPlugin(renderer) | 1655 || requiresCompositingForPlugin(renderer) |
| 1656 || requiresCompositingForFrame(renderer) | 1656 || requiresCompositingForFrame(renderer) |
| 1657 || requiresCompositingForBackfaceVisibilityHidden(renderer) | 1657 || requiresCompositingForBackfaceVisibilityHidden(renderer) |
| 1658 || requiresCompositingForAnimation(renderer) | 1658 || requiresCompositingForAnimation(renderer) |
| 1659 || requiresCompositingForTransition(renderer) | 1659 || requiresCompositingForTransition(renderer) |
| 1660 || requiresCompositingForFilters(renderer) | 1660 || requiresCompositingForFilters(renderer) |
| 1661 || requiresCompositingForBlending(renderer) | |
| 1662 || requiresCompositingForPosition(renderer, layer) | 1661 || requiresCompositingForPosition(renderer, layer) |
| 1663 || requiresCompositingForOverflowScrolling(layer) | 1662 || requiresCompositingForOverflowScrolling(layer) |
| 1664 || requiresCompositingForOverflowScrollingParent(layer) | 1663 || requiresCompositingForOverflowScrollingParent(layer) |
| 1665 || requiresCompositingForOutOfFlowClipping(layer) | 1664 || requiresCompositingForOutOfFlowClipping(layer) |
| 1666 || renderer->isTransparent() | 1665 || renderer->isTransparent() |
| 1667 || renderer->hasMask() | 1666 || renderer->hasMask() |
| 1668 || renderer->hasReflection() | 1667 || renderer->hasReflection() |
| 1669 || renderer->hasFilter()) | 1668 || renderer->hasFilter()) |
| 1670 return true; | 1669 return true; |
| 1671 | 1670 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1710 | 1709 |
| 1711 if (requiresCompositingForFilters(renderer)) | 1710 if (requiresCompositingForFilters(renderer)) |
| 1712 directReasons |= CompositingReasonFilters; | 1711 directReasons |= CompositingReasonFilters; |
| 1713 | 1712 |
| 1714 if (requiresCompositingForPosition(renderer, layer)) | 1713 if (requiresCompositingForPosition(renderer, layer)) |
| 1715 directReasons |= renderer->style()->position() == FixedPosition ? Compos
itingReasonPositionFixed : CompositingReasonPositionSticky; | 1714 directReasons |= renderer->style()->position() == FixedPosition ? Compos
itingReasonPositionFixed : CompositingReasonPositionSticky; |
| 1716 | 1715 |
| 1717 if (requiresCompositingForOverflowScrolling(layer)) | 1716 if (requiresCompositingForOverflowScrolling(layer)) |
| 1718 directReasons |= CompositingReasonOverflowScrollingTouch; | 1717 directReasons |= CompositingReasonOverflowScrollingTouch; |
| 1719 | 1718 |
| 1720 if (requiresCompositingForBlending(renderer)) | |
| 1721 directReasons |= CompositingReasonBlending; | |
| 1722 | |
| 1723 if (requiresCompositingForOverflowScrollingParent(layer)) | 1719 if (requiresCompositingForOverflowScrollingParent(layer)) |
| 1724 directReasons |= CompositingReasonOverflowScrollingParent; | 1720 directReasons |= CompositingReasonOverflowScrollingParent; |
| 1725 | 1721 |
| 1726 if (requiresCompositingForOutOfFlowClipping(layer)) | 1722 if (requiresCompositingForOutOfFlowClipping(layer)) |
| 1727 directReasons |= CompositingReasonOutOfFlowClipping; | 1723 directReasons |= CompositingReasonOutOfFlowClipping; |
| 1728 | 1724 |
| 1729 return directReasons; | 1725 return directReasons; |
| 1730 } | 1726 } |
| 1731 | 1727 |
| 1732 CompositingReasons RenderLayerCompositor::reasonsForCompositing(const RenderLaye
r* layer) const | 1728 CompositingReasons RenderLayerCompositor::reasonsForCompositing(const RenderLaye
r* layer) const |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2041 } | 2037 } |
| 2042 | 2038 |
| 2043 bool RenderLayerCompositor::requiresCompositingForFilters(RenderObject* renderer
) const | 2039 bool RenderLayerCompositor::requiresCompositingForFilters(RenderObject* renderer
) const |
| 2044 { | 2040 { |
| 2045 if (!(m_compositingTriggers & ChromeClient::FilterTrigger)) | 2041 if (!(m_compositingTriggers & ChromeClient::FilterTrigger)) |
| 2046 return false; | 2042 return false; |
| 2047 | 2043 |
| 2048 return renderer->hasFilter(); | 2044 return renderer->hasFilter(); |
| 2049 } | 2045 } |
| 2050 | 2046 |
| 2051 bool RenderLayerCompositor::requiresCompositingForBlending(RenderObject* rendere
r) const | |
| 2052 { | |
| 2053 return renderer->hasBlendMode(); | |
| 2054 } | |
| 2055 | |
| 2056 bool RenderLayerCompositor::requiresCompositingForOverflowScrollingParent(const
RenderLayer* layer) const | 2047 bool RenderLayerCompositor::requiresCompositingForOverflowScrollingParent(const
RenderLayer* layer) const |
| 2057 { | 2048 { |
| 2058 return !!layer->scrollParent(); | 2049 return !!layer->scrollParent(); |
| 2059 } | 2050 } |
| 2060 | 2051 |
| 2061 bool RenderLayerCompositor::requiresCompositingForOutOfFlowClipping(const Render
Layer* layer) const | 2052 bool RenderLayerCompositor::requiresCompositingForOutOfFlowClipping(const Render
Layer* layer) const |
| 2062 { | 2053 { |
| 2063 return layer->compositorDrivenAcceleratedScrollingEnabled() && layer->isUncl
ippedDescendant(); | 2054 return layer->compositorDrivenAcceleratedScrollingEnabled() && layer->isUncl
ippedDescendant(); |
| 2064 } | 2055 } |
| 2065 | 2056 |
| (...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2788 } else if (graphicsLayer == m_scrollLayer.get()) { | 2779 } else if (graphicsLayer == m_scrollLayer.get()) { |
| 2789 name = "Frame Scrolling Layer"; | 2780 name = "Frame Scrolling Layer"; |
| 2790 } else { | 2781 } else { |
| 2791 ASSERT_NOT_REACHED(); | 2782 ASSERT_NOT_REACHED(); |
| 2792 } | 2783 } |
| 2793 | 2784 |
| 2794 return name; | 2785 return name; |
| 2795 } | 2786 } |
| 2796 | 2787 |
| 2797 } // namespace WebCore | 2788 } // namespace WebCore |
| OLD | NEW |