Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Side by Side Diff: Source/core/rendering/RenderLayerCompositor.cpp

Issue 23874019: Web Animations CSS: Start running animations on the compositor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 12 matching lines...) Expand all
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #include "config.h" 26 #include "config.h"
27 27
28 #include "core/rendering/RenderLayerCompositor.h" 28 #include "core/rendering/RenderLayerCompositor.h"
29 29
30 #include "CSSPropertyNames.h" 30 #include "CSSPropertyNames.h"
31 #include "HTMLNames.h" 31 #include "HTMLNames.h"
32 #include "RuntimeEnabledFeatures.h" 32 #include "RuntimeEnabledFeatures.h"
33 #include "core/animation/ActiveAnimations.h"
33 #include "core/dom/FullscreenElementStack.h" 34 #include "core/dom/FullscreenElementStack.h"
34 #include "core/dom/NodeList.h" 35 #include "core/dom/NodeList.h"
35 #include "core/html/HTMLCanvasElement.h" 36 #include "core/html/HTMLCanvasElement.h"
36 #include "core/html/HTMLIFrameElement.h" 37 #include "core/html/HTMLIFrameElement.h"
37 #include "core/html/HTMLVideoElement.h" 38 #include "core/html/HTMLVideoElement.h"
38 #include "core/html/canvas/CanvasRenderingContext.h" 39 #include "core/html/canvas/CanvasRenderingContext.h"
39 #include "core/inspector/InspectorInstrumentation.h" 40 #include "core/inspector/InspectorInstrumentation.h"
40 #include "core/page/Chrome.h" 41 #include "core/page/Chrome.h"
41 #include "core/page/ChromeClient.h" 42 #include "core/page/ChromeClient.h"
42 #include "core/frame/Frame.h" 43 #include "core/frame/Frame.h"
(...skipping 1627 matching lines...) Expand 10 before | Expand all | Expand 10 after
1670 1671
1671 bool RenderLayerCompositor::requiresCompositingForBackfaceVisibilityHidden(Rende rObject* renderer) const 1672 bool RenderLayerCompositor::requiresCompositingForBackfaceVisibilityHidden(Rende rObject* renderer) const
1672 { 1673 {
1673 return canRender3DTransforms() && renderer->style()->backfaceVisibility() == BackfaceVisibilityHidden; 1674 return canRender3DTransforms() && renderer->style()->backfaceVisibility() == BackfaceVisibilityHidden;
1674 } 1675 }
1675 1676
1676 bool RenderLayerCompositor::requiresCompositingForAnimation(RenderObject* render er) const 1677 bool RenderLayerCompositor::requiresCompositingForAnimation(RenderObject* render er) const
1677 { 1678 {
1678 if (!(m_compositingTriggers & ChromeClient::AnimationTrigger)) 1679 if (!(m_compositingTriggers & ChromeClient::AnimationTrigger))
1679 return false; 1680 return false;
1680 return renderer->animation().isRunningAcceleratableAnimationOnRenderer(rende rer); 1681
1682 return isRunningCompositorAnimationCandidate(*renderer, inCompositingMode()) ;
1681 } 1683 }
1682 1684
1683 bool RenderLayerCompositor::requiresCompositingForTransition(RenderObject* rende rer) const 1685 bool RenderLayerCompositor::requiresCompositingForTransition(RenderObject* rende rer) const
1684 { 1686 {
1685 if (!(m_compositingTriggers & ChromeClient::AnimationTrigger)) 1687 if (!(m_compositingTriggers & ChromeClient::AnimationTrigger))
1686 return false; 1688 return false;
1687 1689
1688 if (Settings* settings = m_renderView->document().settings()) { 1690 if (Settings* settings = m_renderView->document().settings()) {
1689 if (!settings->acceleratedCompositingForTransitionEnabled()) 1691 if (!settings->acceleratedCompositingForTransitionEnabled())
1690 return false; 1692 return false;
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
1861 1863
1862 bool RenderLayerCompositor::requiresCompositingForOverflowScrolling(const Render Layer* layer) const 1864 bool RenderLayerCompositor::requiresCompositingForOverflowScrolling(const Render Layer* layer) const
1863 { 1865 {
1864 return layer->needsCompositedScrolling(); 1866 return layer->needsCompositedScrolling();
1865 } 1867 }
1866 1868
1867 bool RenderLayerCompositor::isRunningAcceleratedTransformAnimation(RenderObject* renderer) const 1869 bool RenderLayerCompositor::isRunningAcceleratedTransformAnimation(RenderObject* renderer) const
1868 { 1870 {
1869 if (!(m_compositingTriggers & ChromeClient::AnimationTrigger)) 1871 if (!(m_compositingTriggers & ChromeClient::AnimationTrigger))
1870 return false; 1872 return false;
1871 return renderer->animation().isRunningAnimationOnRenderer(renderer, CSSPrope rtyWebkitTransform); 1873 return isRunningAnimation(*renderer, CSSPropertyWebkitTransform);
1872 } 1874 }
1873 1875
1874 // If an element has negative z-index children, those children render in front o f the 1876 // If an element has negative z-index children, those children render in front o f the
1875 // layer background, so we need an extra 'contents' layer for the foreground of the layer 1877 // layer background, so we need an extra 'contents' layer for the foreground of the layer
1876 // object. 1878 // object.
1877 bool RenderLayerCompositor::needsContentsCompositingLayer(const RenderLayer* lay er) const 1879 bool RenderLayerCompositor::needsContentsCompositingLayer(const RenderLayer* lay er) const
1878 { 1880 {
1879 return layer->stackingNode()->hasNegativeZOrderList(); 1881 return layer->stackingNode()->hasNegativeZOrderList();
1880 } 1882 }
1881 1883
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
2444 } else if (graphicsLayer == m_scrollLayer.get()) { 2446 } else if (graphicsLayer == m_scrollLayer.get()) {
2445 name = "Frame Scrolling Layer"; 2447 name = "Frame Scrolling Layer";
2446 } else { 2448 } else {
2447 ASSERT_NOT_REACHED(); 2449 ASSERT_NOT_REACHED();
2448 } 2450 }
2449 2451
2450 return name; 2452 return name;
2451 } 2453 }
2452 2454
2453 } // namespace WebCore 2455 } // namespace WebCore
OLDNEW
« Source/core/rendering/CompositedLayerMapping.cpp ('K') | « Source/core/rendering/RenderLayer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698