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

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

Issue 139273007: Web Animations: Remove legacy animations engine. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 months 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 26 matching lines...) Expand all
37 #include "core/html/HTMLCanvasElement.h" 37 #include "core/html/HTMLCanvasElement.h"
38 #include "core/html/HTMLIFrameElement.h" 38 #include "core/html/HTMLIFrameElement.h"
39 #include "core/html/HTMLMediaElement.h" 39 #include "core/html/HTMLMediaElement.h"
40 #include "core/html/canvas/CanvasRenderingContext.h" 40 #include "core/html/canvas/CanvasRenderingContext.h"
41 #include "core/inspector/InspectorInstrumentation.h" 41 #include "core/inspector/InspectorInstrumentation.h"
42 #include "core/page/Chrome.h" 42 #include "core/page/Chrome.h"
43 #include "core/frame/Frame.h" 43 #include "core/frame/Frame.h"
44 #include "core/frame/FrameView.h" 44 #include "core/frame/FrameView.h"
45 #include "core/page/Page.h" 45 #include "core/page/Page.h"
46 #include "core/frame/Settings.h" 46 #include "core/frame/Settings.h"
47 #include "core/frame/animation/AnimationController.h"
48 #include "core/page/scrolling/ScrollingConstraints.h" 47 #include "core/page/scrolling/ScrollingConstraints.h"
49 #include "core/page/scrolling/ScrollingCoordinator.h" 48 #include "core/page/scrolling/ScrollingCoordinator.h"
50 #include "core/rendering/CompositedLayerMapping.h" 49 #include "core/rendering/CompositedLayerMapping.h"
51 #include "core/rendering/HitTestResult.h" 50 #include "core/rendering/HitTestResult.h"
52 #include "core/rendering/RenderApplet.h" 51 #include "core/rendering/RenderApplet.h"
53 #include "core/rendering/RenderEmbeddedObject.h" 52 #include "core/rendering/RenderEmbeddedObject.h"
54 #include "core/rendering/RenderFullScreen.h" 53 #include "core/rendering/RenderFullScreen.h"
55 #include "core/rendering/RenderGeometryMap.h" 54 #include "core/rendering/RenderGeometryMap.h"
56 #include "core/rendering/RenderIFrame.h" 55 #include "core/rendering/RenderIFrame.h"
57 #include "core/rendering/RenderLayerStackingNode.h" 56 #include "core/rendering/RenderLayerStackingNode.h"
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 417
419 if (isMainFrame() && m_renderView->frameView()) 418 if (isMainFrame() && m_renderView->frameView())
420 finishCompositingUpdateForFrameTree(&m_renderView->frameView()->frame()) ; 419 finishCompositingUpdateForFrameTree(&m_renderView->frameView()->frame()) ;
421 420
422 if (m_forceCompositingMode && !m_compositing) 421 if (m_forceCompositingMode && !m_compositing)
423 enableCompositingMode(true); 422 enableCompositingMode(true);
424 423
425 if (!m_needsToRecomputeCompositingRequirements && !m_compositing) 424 if (!m_needsToRecomputeCompositingRequirements && !m_compositing)
426 return; 425 return;
427 426
428 AnimationUpdateBlock animationUpdateBlock(m_renderView->frameView()->frame() .animation());
429
430 TemporaryChange<bool> postLayoutChange(m_inPostLayoutUpdate, true); 427 TemporaryChange<bool> postLayoutChange(m_inPostLayoutUpdate, true);
431 428
432 bool needCompositingRequirementsUpdate = m_needsToRecomputeCompositingRequir ements; 429 bool needCompositingRequirementsUpdate = m_needsToRecomputeCompositingRequir ements;
433 bool needHierarchyAndGeometryUpdate = m_compositingLayersNeedRebuild; 430 bool needHierarchyAndGeometryUpdate = m_compositingLayersNeedRebuild;
434 bool needGeometryUpdate = m_needsToUpdateLayerTreeGeometry; 431 bool needGeometryUpdate = m_needsToUpdateLayerTreeGeometry;
435 bool needsToUpdateScrollingCoordinator = scrollingCoordinator() ? scrollingC oordinator()->needsToUpdateAfterCompositingChange() : false; 432 bool needsToUpdateScrollingCoordinator = scrollingCoordinator() ? scrollingC oordinator()->needsToUpdateAfterCompositingChange() : false;
436 433
437 if (!needCompositingRequirementsUpdate && !needHierarchyAndGeometryUpdate && !needGeometryUpdate && !needsToUpdateScrollingCoordinator) 434 if (!needCompositingRequirementsUpdate && !needHierarchyAndGeometryUpdate && !needGeometryUpdate && !needsToUpdateScrollingCoordinator)
438 return; 435 return;
439 436
(...skipping 1433 matching lines...) Expand 10 before | Expand all | Expand 10 after
1873 bool RenderLayerCompositor::requiresCompositingForBackfaceVisibilityHidden(Rende rObject* renderer) const 1870 bool RenderLayerCompositor::requiresCompositingForBackfaceVisibilityHidden(Rende rObject* renderer) const
1874 { 1871 {
1875 return canRender3DTransforms() && renderer->style()->backfaceVisibility() == BackfaceVisibilityHidden; 1872 return canRender3DTransforms() && renderer->style()->backfaceVisibility() == BackfaceVisibilityHidden;
1876 } 1873 }
1877 1874
1878 bool RenderLayerCompositor::requiresCompositingForAnimation(RenderObject* render er) const 1875 bool RenderLayerCompositor::requiresCompositingForAnimation(RenderObject* render er) const
1879 { 1876 {
1880 if (!(m_compositingTriggers & ChromeClient::AnimationTrigger)) 1877 if (!(m_compositingTriggers & ChromeClient::AnimationTrigger))
1881 return false; 1878 return false;
1882 1879
1883 if (!RuntimeEnabledFeatures::webAnimationsCSSEnabled())
1884 return renderer->animation().isRunningAcceleratableAnimationOnRenderer(r enderer);
1885
1886 return shouldCompositeForActiveAnimations(*renderer); 1880 return shouldCompositeForActiveAnimations(*renderer);
1887 } 1881 }
1888 1882
1889 bool RenderLayerCompositor::requiresCompositingForTransition(RenderObject* rende rer) const 1883 bool RenderLayerCompositor::requiresCompositingForTransition(RenderObject* rende rer) const
1890 { 1884 {
1891 if (!(m_compositingTriggers & ChromeClient::AnimationTrigger)) 1885 if (!(m_compositingTriggers & ChromeClient::AnimationTrigger))
1892 return false; 1886 return false;
1893 1887
1894 if (Settings* settings = m_renderView->document().settings()) { 1888 if (Settings* settings = m_renderView->document().settings()) {
1895 if (!settings->acceleratedCompositingForTransitionEnabled()) 1889 if (!settings->acceleratedCompositingForTransitionEnabled())
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
2090 2084
2091 bool RenderLayerCompositor::requiresCompositingForOverflowScrolling(const Render Layer* layer) const 2085 bool RenderLayerCompositor::requiresCompositingForOverflowScrolling(const Render Layer* layer) const
2092 { 2086 {
2093 return layer->needsCompositedScrolling(); 2087 return layer->needsCompositedScrolling();
2094 } 2088 }
2095 2089
2096 bool RenderLayerCompositor::isRunningAcceleratedTransformAnimation(RenderObject* renderer) const 2090 bool RenderLayerCompositor::isRunningAcceleratedTransformAnimation(RenderObject* renderer) const
2097 { 2091 {
2098 if (!(m_compositingTriggers & ChromeClient::AnimationTrigger)) 2092 if (!(m_compositingTriggers & ChromeClient::AnimationTrigger))
2099 return false; 2093 return false;
2100 if (!RuntimeEnabledFeatures::webAnimationsCSSEnabled())
2101 return renderer->animation().isRunningAnimationOnRenderer(renderer, CSSP ropertyWebkitTransform);
2102 return hasActiveAnimations(*renderer, CSSPropertyWebkitTransform); 2094 return hasActiveAnimations(*renderer, CSSPropertyWebkitTransform);
2103 } 2095 }
2104 2096
2105 // If an element has negative z-index children, those children render in front o f the 2097 // If an element has negative z-index children, those children render in front o f the
2106 // layer background, so we need an extra 'contents' layer for the foreground of the layer 2098 // layer background, so we need an extra 'contents' layer for the foreground of the layer
2107 // object. 2099 // object.
2108 bool RenderLayerCompositor::needsContentsCompositingLayer(const RenderLayer* lay er) const 2100 bool RenderLayerCompositor::needsContentsCompositingLayer(const RenderLayer* lay er) const
2109 { 2101 {
2110 return layer->stackingNode()->hasNegativeZOrderList(); 2102 return layer->stackingNode()->hasNegativeZOrderList();
2111 } 2103 }
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
2656 } else if (graphicsLayer == m_scrollLayer.get()) { 2648 } else if (graphicsLayer == m_scrollLayer.get()) {
2657 name = "Frame Scrolling Layer"; 2649 name = "Frame Scrolling Layer";
2658 } else { 2650 } else {
2659 ASSERT_NOT_REACHED(); 2651 ASSERT_NOT_REACHED();
2660 } 2652 }
2661 2653
2662 return name; 2654 return name;
2663 } 2655 }
2664 2656
2665 } // namespace WebCore 2657 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698