| 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 1691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1702 if (layer->isRootLayer() | 1702 if (layer->isRootLayer() |
| 1703 || layer->transform() // note: excludes perspective and transformStyle3D
. | 1703 || layer->transform() // note: excludes perspective and transformStyle3D
. |
| 1704 || requiresCompositingForVideo(renderer) | 1704 || requiresCompositingForVideo(renderer) |
| 1705 || requiresCompositingForCanvas(renderer) | 1705 || requiresCompositingForCanvas(renderer) |
| 1706 || requiresCompositingForPlugin(renderer) | 1706 || requiresCompositingForPlugin(renderer) |
| 1707 || requiresCompositingForFrame(renderer) | 1707 || requiresCompositingForFrame(renderer) |
| 1708 || requiresCompositingForBackfaceVisibilityHidden(renderer) | 1708 || requiresCompositingForBackfaceVisibilityHidden(renderer) |
| 1709 || requiresCompositingForAnimation(renderer) | 1709 || requiresCompositingForAnimation(renderer) |
| 1710 || requiresCompositingForTransition(renderer) | 1710 || requiresCompositingForTransition(renderer) |
| 1711 || requiresCompositingForFilters(renderer) | 1711 || requiresCompositingForFilters(renderer) |
| 1712 || requiresCompositingForBlending(renderer) | |
| 1713 || requiresCompositingForPosition(renderer, layer) | 1712 || requiresCompositingForPosition(renderer, layer) |
| 1714 || requiresCompositingForOverflowScrolling(layer) | 1713 || requiresCompositingForOverflowScrolling(layer) |
| 1715 || requiresCompositingForOverflowScrollingParent(layer) | 1714 || requiresCompositingForOverflowScrollingParent(layer) |
| 1716 || requiresCompositingForOutOfFlowClipping(layer) | 1715 || requiresCompositingForOutOfFlowClipping(layer) |
| 1717 || renderer->isTransparent() | 1716 || renderer->isTransparent() |
| 1718 || renderer->hasMask() | 1717 || renderer->hasMask() |
| 1719 || renderer->hasReflection() | 1718 || renderer->hasReflection() |
| 1720 || renderer->hasFilter()) | 1719 || renderer->hasFilter()) |
| 1721 return true; | 1720 return true; |
| 1722 | 1721 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1761 | 1760 |
| 1762 if (requiresCompositingForFilters(renderer)) | 1761 if (requiresCompositingForFilters(renderer)) |
| 1763 directReasons |= CompositingReasonFilters; | 1762 directReasons |= CompositingReasonFilters; |
| 1764 | 1763 |
| 1765 if (requiresCompositingForPosition(renderer, layer)) | 1764 if (requiresCompositingForPosition(renderer, layer)) |
| 1766 directReasons |= renderer->style()->position() == FixedPosition ? Compos
itingReasonPositionFixed : CompositingReasonPositionSticky; | 1765 directReasons |= renderer->style()->position() == FixedPosition ? Compos
itingReasonPositionFixed : CompositingReasonPositionSticky; |
| 1767 | 1766 |
| 1768 if (requiresCompositingForOverflowScrolling(layer)) | 1767 if (requiresCompositingForOverflowScrolling(layer)) |
| 1769 directReasons |= CompositingReasonOverflowScrollingTouch; | 1768 directReasons |= CompositingReasonOverflowScrollingTouch; |
| 1770 | 1769 |
| 1771 if (requiresCompositingForBlending(renderer)) | |
| 1772 directReasons |= CompositingReasonBlending; | |
| 1773 | |
| 1774 if (requiresCompositingForOverflowScrollingParent(layer)) | 1770 if (requiresCompositingForOverflowScrollingParent(layer)) |
| 1775 directReasons |= CompositingReasonOverflowScrollingParent; | 1771 directReasons |= CompositingReasonOverflowScrollingParent; |
| 1776 | 1772 |
| 1777 if (requiresCompositingForOutOfFlowClipping(layer)) | 1773 if (requiresCompositingForOutOfFlowClipping(layer)) |
| 1778 directReasons |= CompositingReasonOutOfFlowClipping; | 1774 directReasons |= CompositingReasonOutOfFlowClipping; |
| 1779 | 1775 |
| 1780 return directReasons; | 1776 return directReasons; |
| 1781 } | 1777 } |
| 1782 | 1778 |
| 1783 CompositingReasons RenderLayerCompositor::reasonsForCompositing(const RenderLaye
r* layer) const | 1779 CompositingReasons RenderLayerCompositor::reasonsForCompositing(const RenderLaye
r* layer) const |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2090 } | 2086 } |
| 2091 | 2087 |
| 2092 bool RenderLayerCompositor::requiresCompositingForFilters(RenderObject* renderer
) const | 2088 bool RenderLayerCompositor::requiresCompositingForFilters(RenderObject* renderer
) const |
| 2093 { | 2089 { |
| 2094 if (!(m_compositingTriggers & ChromeClient::FilterTrigger)) | 2090 if (!(m_compositingTriggers & ChromeClient::FilterTrigger)) |
| 2095 return false; | 2091 return false; |
| 2096 | 2092 |
| 2097 return renderer->hasFilter(); | 2093 return renderer->hasFilter(); |
| 2098 } | 2094 } |
| 2099 | 2095 |
| 2100 bool RenderLayerCompositor::requiresCompositingForBlending(RenderObject* rendere
r) const | |
| 2101 { | |
| 2102 return renderer->hasBlendMode(); | |
| 2103 } | |
| 2104 | |
| 2105 bool RenderLayerCompositor::requiresCompositingForOverflowScrollingParent(const
RenderLayer* layer) const | 2096 bool RenderLayerCompositor::requiresCompositingForOverflowScrollingParent(const
RenderLayer* layer) const |
| 2106 { | 2097 { |
| 2107 return !!layer->scrollParent(); | 2098 return !!layer->scrollParent(); |
| 2108 } | 2099 } |
| 2109 | 2100 |
| 2110 bool RenderLayerCompositor::requiresCompositingForOutOfFlowClipping(const Render
Layer* layer) const | 2101 bool RenderLayerCompositor::requiresCompositingForOutOfFlowClipping(const Render
Layer* layer) const |
| 2111 { | 2102 { |
| 2112 return layer->compositorDrivenAcceleratedScrollingEnabled() && layer->isUncl
ippedDescendant(); | 2103 return layer->compositorDrivenAcceleratedScrollingEnabled() && layer->isUncl
ippedDescendant(); |
| 2113 } | 2104 } |
| 2114 | 2105 |
| (...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2834 } else if (graphicsLayer == m_scrollLayer.get()) { | 2825 } else if (graphicsLayer == m_scrollLayer.get()) { |
| 2835 name = "Frame Scrolling Layer"; | 2826 name = "Frame Scrolling Layer"; |
| 2836 } else { | 2827 } else { |
| 2837 ASSERT_NOT_REACHED(); | 2828 ASSERT_NOT_REACHED(); |
| 2838 } | 2829 } |
| 2839 | 2830 |
| 2840 return name; | 2831 return name; |
| 2841 } | 2832 } |
| 2842 | 2833 |
| 2843 } // namespace WebCore | 2834 } // namespace WebCore |
| OLD | NEW |