| 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 1673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1684 if (layer->isRootLayer() | 1684 if (layer->isRootLayer() |
| 1685 || layer->transform() // note: excludes perspective and transformStyle3D
. | 1685 || layer->transform() // note: excludes perspective and transformStyle3D
. |
| 1686 || requiresCompositingForVideo(renderer) | 1686 || requiresCompositingForVideo(renderer) |
| 1687 || requiresCompositingForCanvas(renderer) | 1687 || requiresCompositingForCanvas(renderer) |
| 1688 || requiresCompositingForPlugin(renderer) | 1688 || requiresCompositingForPlugin(renderer) |
| 1689 || requiresCompositingForFrame(renderer) | 1689 || requiresCompositingForFrame(renderer) |
| 1690 || requiresCompositingForBackfaceVisibilityHidden(renderer) | 1690 || requiresCompositingForBackfaceVisibilityHidden(renderer) |
| 1691 || requiresCompositingForAnimation(renderer) | 1691 || requiresCompositingForAnimation(renderer) |
| 1692 || requiresCompositingForTransition(renderer) | 1692 || requiresCompositingForTransition(renderer) |
| 1693 || requiresCompositingForFilters(renderer) | 1693 || requiresCompositingForFilters(renderer) |
| 1694 || requiresCompositingForBlending(renderer) | |
| 1695 || requiresCompositingForPosition(renderer, layer) | 1694 || requiresCompositingForPosition(renderer, layer) |
| 1696 || requiresCompositingForOverflowScrolling(layer) | 1695 || requiresCompositingForOverflowScrolling(layer) |
| 1697 || requiresCompositingForOverflowScrollingParent(layer) | 1696 || requiresCompositingForOverflowScrollingParent(layer) |
| 1698 || requiresCompositingForOutOfFlowClipping(layer) | 1697 || requiresCompositingForOutOfFlowClipping(layer) |
| 1699 || renderer->isTransparent() | 1698 || renderer->isTransparent() |
| 1700 || renderer->hasMask() | 1699 || renderer->hasMask() |
| 1701 || renderer->hasReflection() | 1700 || renderer->hasReflection() |
| 1702 || renderer->hasFilter()) | 1701 || renderer->hasFilter()) |
| 1703 return true; | 1702 return true; |
| 1704 | 1703 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1743 | 1742 |
| 1744 if (requiresCompositingForFilters(renderer)) | 1743 if (requiresCompositingForFilters(renderer)) |
| 1745 directReasons |= CompositingReasonFilters; | 1744 directReasons |= CompositingReasonFilters; |
| 1746 | 1745 |
| 1747 if (requiresCompositingForPosition(renderer, layer)) | 1746 if (requiresCompositingForPosition(renderer, layer)) |
| 1748 directReasons |= renderer->style()->position() == FixedPosition ? Compos
itingReasonPositionFixed : CompositingReasonPositionSticky; | 1747 directReasons |= renderer->style()->position() == FixedPosition ? Compos
itingReasonPositionFixed : CompositingReasonPositionSticky; |
| 1749 | 1748 |
| 1750 if (requiresCompositingForOverflowScrolling(layer)) | 1749 if (requiresCompositingForOverflowScrolling(layer)) |
| 1751 directReasons |= CompositingReasonOverflowScrollingTouch; | 1750 directReasons |= CompositingReasonOverflowScrollingTouch; |
| 1752 | 1751 |
| 1753 if (requiresCompositingForBlending(renderer)) | |
| 1754 directReasons |= CompositingReasonBlending; | |
| 1755 | |
| 1756 if (requiresCompositingForOverflowScrollingParent(layer)) | 1752 if (requiresCompositingForOverflowScrollingParent(layer)) |
| 1757 directReasons |= CompositingReasonOverflowScrollingParent; | 1753 directReasons |= CompositingReasonOverflowScrollingParent; |
| 1758 | 1754 |
| 1759 if (requiresCompositingForOutOfFlowClipping(layer)) | 1755 if (requiresCompositingForOutOfFlowClipping(layer)) |
| 1760 directReasons |= CompositingReasonOutOfFlowClipping; | 1756 directReasons |= CompositingReasonOutOfFlowClipping; |
| 1761 | 1757 |
| 1762 return directReasons; | 1758 return directReasons; |
| 1763 } | 1759 } |
| 1764 | 1760 |
| 1765 CompositingReasons RenderLayerCompositor::reasonsForCompositing(const RenderLaye
r* layer) const | 1761 CompositingReasons RenderLayerCompositor::reasonsForCompositing(const RenderLaye
r* layer) const |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2072 } | 2068 } |
| 2073 | 2069 |
| 2074 bool RenderLayerCompositor::requiresCompositingForFilters(RenderObject* renderer
) const | 2070 bool RenderLayerCompositor::requiresCompositingForFilters(RenderObject* renderer
) const |
| 2075 { | 2071 { |
| 2076 if (!(m_compositingTriggers & ChromeClient::FilterTrigger)) | 2072 if (!(m_compositingTriggers & ChromeClient::FilterTrigger)) |
| 2077 return false; | 2073 return false; |
| 2078 | 2074 |
| 2079 return renderer->hasFilter(); | 2075 return renderer->hasFilter(); |
| 2080 } | 2076 } |
| 2081 | 2077 |
| 2082 bool RenderLayerCompositor::requiresCompositingForBlending(RenderObject* rendere
r) const | |
| 2083 { | |
| 2084 return renderer->hasBlendMode(); | |
| 2085 } | |
| 2086 | |
| 2087 bool RenderLayerCompositor::requiresCompositingForOverflowScrollingParent(const
RenderLayer* layer) const | 2078 bool RenderLayerCompositor::requiresCompositingForOverflowScrollingParent(const
RenderLayer* layer) const |
| 2088 { | 2079 { |
| 2089 return !!layer->scrollParent(); | 2080 return !!layer->scrollParent(); |
| 2090 } | 2081 } |
| 2091 | 2082 |
| 2092 bool RenderLayerCompositor::requiresCompositingForOutOfFlowClipping(const Render
Layer* layer) const | 2083 bool RenderLayerCompositor::requiresCompositingForOutOfFlowClipping(const Render
Layer* layer) const |
| 2093 { | 2084 { |
| 2094 return layer->compositorDrivenAcceleratedScrollingEnabled() && layer->isUncl
ippedDescendant(); | 2085 return layer->compositorDrivenAcceleratedScrollingEnabled() && layer->isUncl
ippedDescendant(); |
| 2095 } | 2086 } |
| 2096 | 2087 |
| (...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2816 } else if (graphicsLayer == m_scrollLayer.get()) { | 2807 } else if (graphicsLayer == m_scrollLayer.get()) { |
| 2817 name = "Frame Scrolling Layer"; | 2808 name = "Frame Scrolling Layer"; |
| 2818 } else { | 2809 } else { |
| 2819 ASSERT_NOT_REACHED(); | 2810 ASSERT_NOT_REACHED(); |
| 2820 } | 2811 } |
| 2821 | 2812 |
| 2822 return name; | 2813 return name; |
| 2823 } | 2814 } |
| 2824 | 2815 |
| 2825 } // namespace WebCore | 2816 } // namespace WebCore |
| OLD | NEW |