| 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 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 771 layer->setPotentialCompositingReasonsFromStyle(m_compositingReasonFinder.pot
entialCompositingReasonsFromStyle(layer->layoutObject())); | 771 layer->setPotentialCompositingReasonsFromStyle(m_compositingReasonFinder.pot
entialCompositingReasonsFromStyle(layer->layoutObject())); |
| 772 } | 772 } |
| 773 | 773 |
| 774 void DeprecatedPaintLayerCompositor::updateDirectCompositingReasons(DeprecatedPa
intLayer* layer) | 774 void DeprecatedPaintLayerCompositor::updateDirectCompositingReasons(DeprecatedPa
intLayer* layer) |
| 775 { | 775 { |
| 776 layer->setCompositingReasons(m_compositingReasonFinder.directReasons(layer),
CompositingReasonComboAllDirectReasons); | 776 layer->setCompositingReasons(m_compositingReasonFinder.directReasons(layer),
CompositingReasonComboAllDirectReasons); |
| 777 } | 777 } |
| 778 | 778 |
| 779 bool DeprecatedPaintLayerCompositor::canBeComposited(const DeprecatedPaintLayer*
layer) const | 779 bool DeprecatedPaintLayerCompositor::canBeComposited(const DeprecatedPaintLayer*
layer) const |
| 780 { | 780 { |
| 781 return m_hasAcceleratedCompositing && layer->isSelfPaintingLayer() && !layer
->subtreeIsInvisible() && !layer->layoutObject()->isLayoutFlowThread(); | 781 const bool hasCompositorAnimation = m_compositingReasonFinder.requiresCompos
itingForAnimation(*layer->layoutObject()->style()); |
| 782 return m_hasAcceleratedCompositing && (hasCompositorAnimation || !layer->sub
treeIsInvisible()) && layer->isSelfPaintingLayer() && !layer->layoutObject()->is
LayoutFlowThread(); |
| 782 } | 783 } |
| 783 | 784 |
| 784 // Return true if the given layer is a stacking context and has compositing chil
d | 785 // Return true if the given layer is a stacking context and has compositing chil
d |
| 785 // layers that it needs to clip. In this case we insert a clipping GraphicsLayer | 786 // layers that it needs to clip. In this case we insert a clipping GraphicsLayer |
| 786 // into the hierarchy between this layer and its children in the z-order hierarc
hy. | 787 // into the hierarchy between this layer and its children in the z-order hierarc
hy. |
| 787 bool DeprecatedPaintLayerCompositor::clipsCompositingDescendants(const Deprecate
dPaintLayer* layer) const | 788 bool DeprecatedPaintLayerCompositor::clipsCompositingDescendants(const Deprecate
dPaintLayer* layer) const |
| 788 { | 789 { |
| 789 return layer->hasCompositingDescendant() && layer->layoutObject()->hasClipOr
OverflowClip(); | 790 return layer->hasCompositingDescendant() && layer->layoutObject()->hasClipOr
OverflowClip(); |
| 790 } | 791 } |
| 791 | 792 |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1205 } else if (graphicsLayer == m_scrollLayer.get()) { | 1206 } else if (graphicsLayer == m_scrollLayer.get()) { |
| 1206 name = "LocalFrame Scrolling Layer"; | 1207 name = "LocalFrame Scrolling Layer"; |
| 1207 } else { | 1208 } else { |
| 1208 ASSERT_NOT_REACHED(); | 1209 ASSERT_NOT_REACHED(); |
| 1209 } | 1210 } |
| 1210 | 1211 |
| 1211 return name; | 1212 return name; |
| 1212 } | 1213 } |
| 1213 | 1214 |
| 1214 } // namespace blink | 1215 } // namespace blink |
| OLD | NEW |