| 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 1981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1992 | 1992 |
| 1993 bool RenderLayerCompositor::requiresCompositingForBackfaceVisibilityHidden(Rende
rObject* renderer) const | 1993 bool RenderLayerCompositor::requiresCompositingForBackfaceVisibilityHidden(Rende
rObject* renderer) const |
| 1994 { | 1994 { |
| 1995 return canRender3DTransforms() && renderer->style()->backfaceVisibility() ==
BackfaceVisibilityHidden; | 1995 return canRender3DTransforms() && renderer->style()->backfaceVisibility() ==
BackfaceVisibilityHidden; |
| 1996 } | 1996 } |
| 1997 | 1997 |
| 1998 bool RenderLayerCompositor::requiresCompositingForAnimation(RenderObject* render
er) const | 1998 bool RenderLayerCompositor::requiresCompositingForAnimation(RenderObject* render
er) const |
| 1999 { | 1999 { |
| 2000 if (!(m_compositingTriggers & ChromeClient::AnimationTrigger)) | 2000 if (!(m_compositingTriggers & ChromeClient::AnimationTrigger)) |
| 2001 return false; | 2001 return false; |
| 2002 | 2002 return renderer->animation().isRunningAcceleratableAnimationOnRenderer(rende
rer); |
| 2003 if (AnimationController* animController = renderer->animation()) | |
| 2004 return animController->isRunningAcceleratableAnimationOnRenderer(rendere
r); | |
| 2005 return false; | |
| 2006 } | 2003 } |
| 2007 | 2004 |
| 2008 bool RenderLayerCompositor::requiresCompositingForTransition(RenderObject* rende
rer) const | 2005 bool RenderLayerCompositor::requiresCompositingForTransition(RenderObject* rende
rer) const |
| 2009 { | 2006 { |
| 2010 if (!(m_compositingTriggers & ChromeClient::AnimationTrigger)) | 2007 if (!(m_compositingTriggers & ChromeClient::AnimationTrigger)) |
| 2011 return false; | 2008 return false; |
| 2012 | 2009 |
| 2013 if (Settings* settings = m_renderView->document().settings()) { | 2010 if (Settings* settings = m_renderView->document().settings()) { |
| 2014 if (!settings->acceleratedCompositingForTransitionEnabled()) | 2011 if (!settings->acceleratedCompositingForTransitionEnabled()) |
| 2015 return false; | 2012 return false; |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2182 | 2179 |
| 2183 bool RenderLayerCompositor::requiresCompositingForOverflowScrolling(const Render
Layer* layer) const | 2180 bool RenderLayerCompositor::requiresCompositingForOverflowScrolling(const Render
Layer* layer) const |
| 2184 { | 2181 { |
| 2185 return layer->needsCompositedScrolling(); | 2182 return layer->needsCompositedScrolling(); |
| 2186 } | 2183 } |
| 2187 | 2184 |
| 2188 bool RenderLayerCompositor::isRunningAcceleratedTransformAnimation(RenderObject*
renderer) const | 2185 bool RenderLayerCompositor::isRunningAcceleratedTransformAnimation(RenderObject*
renderer) const |
| 2189 { | 2186 { |
| 2190 if (!(m_compositingTriggers & ChromeClient::AnimationTrigger)) | 2187 if (!(m_compositingTriggers & ChromeClient::AnimationTrigger)) |
| 2191 return false; | 2188 return false; |
| 2192 | 2189 return renderer->animation().isRunningAnimationOnRenderer(renderer, CSSPrope
rtyWebkitTransform); |
| 2193 if (AnimationController* animController = renderer->animation()) | |
| 2194 return animController->isRunningAnimationOnRenderer(renderer, CSSPropert
yWebkitTransform); | |
| 2195 | |
| 2196 return false; | |
| 2197 } | 2190 } |
| 2198 | 2191 |
| 2199 // If an element has negative z-index children, those children render in front o
f the | 2192 // If an element has negative z-index children, those children render in front o
f the |
| 2200 // layer background, so we need an extra 'contents' layer for the foreground of
the layer | 2193 // layer background, so we need an extra 'contents' layer for the foreground of
the layer |
| 2201 // object. | 2194 // object. |
| 2202 bool RenderLayerCompositor::needsContentsCompositingLayer(const RenderLayer* lay
er) const | 2195 bool RenderLayerCompositor::needsContentsCompositingLayer(const RenderLayer* lay
er) const |
| 2203 { | 2196 { |
| 2204 return layer->stackingNode()->hasNegativeZOrderList(); | 2197 return layer->stackingNode()->hasNegativeZOrderList(); |
| 2205 } | 2198 } |
| 2206 | 2199 |
| (...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2814 } else if (graphicsLayer == m_scrollLayer.get()) { | 2807 } else if (graphicsLayer == m_scrollLayer.get()) { |
| 2815 name = "Frame Scrolling Layer"; | 2808 name = "Frame Scrolling Layer"; |
| 2816 } else { | 2809 } else { |
| 2817 ASSERT_NOT_REACHED(); | 2810 ASSERT_NOT_REACHED(); |
| 2818 } | 2811 } |
| 2819 | 2812 |
| 2820 return name; | 2813 return name; |
| 2821 } | 2814 } |
| 2822 | 2815 |
| 2823 } // namespace WebCore | 2816 } // namespace WebCore |
| OLD | NEW |