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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 // Avoid updating the layers with old values. Compositing layers will be upd
ated after the layout is finished. | 355 // Avoid updating the layers with old values. Compositing layers will be upd
ated after the layout is finished. |
356 if (m_renderView->needsLayout()) | 356 if (m_renderView->needsLayout()) |
357 return; | 357 return; |
358 | 358 |
359 if (m_forceCompositingMode && !m_compositing) | 359 if (m_forceCompositingMode && !m_compositing) |
360 enableCompositingMode(true); | 360 enableCompositingMode(true); |
361 | 361 |
362 if (!m_reevaluateCompositingAfterLayout && !m_compositing) | 362 if (!m_reevaluateCompositingAfterLayout && !m_compositing) |
363 return; | 363 return; |
364 | 364 |
365 AnimationUpdateBlock animationUpdateBlock(m_renderView->frameView()->frame()
.animation()); | 365 AnimationUpdateBlock animationUpdateBlock(m_renderView->frameView()->frame()
.animation().get()); |
366 | 366 |
367 TemporaryChange<bool> postLayoutChange(m_inPostLayoutUpdate, true); | 367 TemporaryChange<bool> postLayoutChange(m_inPostLayoutUpdate, true); |
368 | 368 |
369 bool checkForHierarchyUpdate = m_reevaluateCompositingAfterLayout; | 369 bool checkForHierarchyUpdate = m_reevaluateCompositingAfterLayout; |
370 bool needGeometryUpdate = false; | 370 bool needGeometryUpdate = false; |
371 | 371 |
372 switch (updateType) { | 372 switch (updateType) { |
373 case CompositingUpdateAfterStyleChange: | 373 case CompositingUpdateAfterStyleChange: |
374 case CompositingUpdateAfterLayout: | 374 case CompositingUpdateAfterLayout: |
375 checkForHierarchyUpdate = true; | 375 checkForHierarchyUpdate = true; |
(...skipping 1622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1998 | 1998 |
1999 bool RenderLayerCompositor::requiresCompositingForBackfaceVisibilityHidden(Rende
rObject* renderer) const | 1999 bool RenderLayerCompositor::requiresCompositingForBackfaceVisibilityHidden(Rende
rObject* renderer) const |
2000 { | 2000 { |
2001 return canRender3DTransforms() && renderer->style()->backfaceVisibility() ==
BackfaceVisibilityHidden; | 2001 return canRender3DTransforms() && renderer->style()->backfaceVisibility() ==
BackfaceVisibilityHidden; |
2002 } | 2002 } |
2003 | 2003 |
2004 bool RenderLayerCompositor::requiresCompositingForAnimation(RenderObject* render
er) const | 2004 bool RenderLayerCompositor::requiresCompositingForAnimation(RenderObject* render
er) const |
2005 { | 2005 { |
2006 if (!(m_compositingTriggers & ChromeClient::AnimationTrigger)) | 2006 if (!(m_compositingTriggers & ChromeClient::AnimationTrigger)) |
2007 return false; | 2007 return false; |
2008 | 2008 return renderer->animation()->isRunningAcceleratableAnimationOnRenderer(rend
erer); |
2009 if (AnimationController* animController = renderer->animation()) | |
2010 return animController->isRunningAcceleratableAnimationOnRenderer(rendere
r); | |
2011 return false; | |
2012 } | 2009 } |
2013 | 2010 |
2014 bool RenderLayerCompositor::requiresCompositingForTransition(RenderObject* rende
rer) const | 2011 bool RenderLayerCompositor::requiresCompositingForTransition(RenderObject* rende
rer) const |
2015 { | 2012 { |
2016 if (!(m_compositingTriggers & ChromeClient::AnimationTrigger)) | 2013 if (!(m_compositingTriggers & ChromeClient::AnimationTrigger)) |
2017 return false; | 2014 return false; |
2018 | 2015 |
2019 if (Settings* settings = m_renderView->document().settings()) { | 2016 if (Settings* settings = m_renderView->document().settings()) { |
2020 if (!settings->acceleratedCompositingForTransitionEnabled()) | 2017 if (!settings->acceleratedCompositingForTransitionEnabled()) |
2021 return false; | 2018 return false; |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2193 | 2190 |
2194 bool RenderLayerCompositor::requiresCompositingForOverflowScrolling(const Render
Layer* layer) const | 2191 bool RenderLayerCompositor::requiresCompositingForOverflowScrolling(const Render
Layer* layer) const |
2195 { | 2192 { |
2196 return layer->needsCompositedScrolling(); | 2193 return layer->needsCompositedScrolling(); |
2197 } | 2194 } |
2198 | 2195 |
2199 bool RenderLayerCompositor::isRunningAcceleratedTransformAnimation(RenderObject*
renderer) const | 2196 bool RenderLayerCompositor::isRunningAcceleratedTransformAnimation(RenderObject*
renderer) const |
2200 { | 2197 { |
2201 if (!(m_compositingTriggers & ChromeClient::AnimationTrigger)) | 2198 if (!(m_compositingTriggers & ChromeClient::AnimationTrigger)) |
2202 return false; | 2199 return false; |
2203 | 2200 return renderer->animation()->isRunningAnimationOnRenderer(renderer, CSSProp
ertyWebkitTransform); |
2204 if (AnimationController* animController = renderer->animation()) | |
2205 return animController->isRunningAnimationOnRenderer(renderer, CSSPropert
yWebkitTransform); | |
2206 | |
2207 return false; | |
2208 } | 2201 } |
2209 | 2202 |
2210 // If an element has negative z-index children, those children render in front o
f the | 2203 // If an element has negative z-index children, those children render in front o
f the |
2211 // layer background, so we need an extra 'contents' layer for the foreground of
the layer | 2204 // layer background, so we need an extra 'contents' layer for the foreground of
the layer |
2212 // object. | 2205 // object. |
2213 bool RenderLayerCompositor::needsContentsCompositingLayer(const RenderLayer* lay
er) const | 2206 bool RenderLayerCompositor::needsContentsCompositingLayer(const RenderLayer* lay
er) const |
2214 { | 2207 { |
2215 return layer->hasNegativeZOrderList(); | 2208 return layer->hasNegativeZOrderList(); |
2216 } | 2209 } |
2217 | 2210 |
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2816 } else if (graphicsLayer == m_scrollLayer.get()) { | 2809 } else if (graphicsLayer == m_scrollLayer.get()) { |
2817 name = "Frame Scrolling Layer"; | 2810 name = "Frame Scrolling Layer"; |
2818 } else { | 2811 } else { |
2819 ASSERT_NOT_REACHED(); | 2812 ASSERT_NOT_REACHED(); |
2820 } | 2813 } |
2821 | 2814 |
2822 return name; | 2815 return name; |
2823 } | 2816 } |
2824 | 2817 |
2825 } // namespace WebCore | 2818 } // namespace WebCore |
OLD | NEW |