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

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

Issue 33483002: Have Frame::animation() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 2011 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 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 } 505 }
506 506
507 void CompositedLayerMapping::updateGraphicsLayerGeometry() 507 void CompositedLayerMapping::updateGraphicsLayerGeometry()
508 { 508 {
509 // If we haven't built z-order lists yet, wait until later. 509 // If we haven't built z-order lists yet, wait until later.
510 if (m_owningLayer->stackingNode()->isStackingContainer() && m_owningLayer->s tackingNode()->zOrderListsDirty()) 510 if (m_owningLayer->stackingNode()->isStackingContainer() && m_owningLayer->s tackingNode()->zOrderListsDirty())
511 return; 511 return;
512 512
513 // Set transform property, if it is not animating. We have to do this here b ecause the transform 513 // Set transform property, if it is not animating. We have to do this here b ecause the transform
514 // is affected by the layer dimensions. 514 // is affected by the layer dimensions.
515 if (!renderer()->animation()->isRunningAcceleratedAnimationOnRenderer(render er(), CSSPropertyWebkitTransform)) 515 if (!renderer()->animation().isRunningAcceleratedAnimationOnRenderer(rendere r(), CSSPropertyWebkitTransform))
516 updateTransform(renderer()->style()); 516 updateTransform(renderer()->style());
517 517
518 // Set opacity, if it is not animating. 518 // Set opacity, if it is not animating.
519 if (!renderer()->animation()->isRunningAcceleratedAnimationOnRenderer(render er(), CSSPropertyOpacity)) 519 if (!renderer()->animation().isRunningAcceleratedAnimationOnRenderer(rendere r(), CSSPropertyOpacity))
520 updateOpacity(renderer()->style()); 520 updateOpacity(renderer()->style());
521 521
522 if (RuntimeEnabledFeatures::cssCompositingEnabled()) 522 if (RuntimeEnabledFeatures::cssCompositingEnabled())
523 updateLayerBlendMode(renderer()->style()); 523 updateLayerBlendMode(renderer()->style());
524 524
525 bool isSimpleContainer = isSimpleContainerCompositingLayer(); 525 bool isSimpleContainer = isSimpleContainerCompositingLayer();
526 526
527 m_owningLayer->updateDescendantDependentFlags(); 527 m_owningLayer->updateDescendantDependentFlags();
528 528
529 // m_graphicsLayer is the corresponding GraphicsLayer for this RenderLayer a nd its non-compositing 529 // m_graphicsLayer is the corresponding GraphicsLayer for this RenderLayer a nd its non-compositing
(...skipping 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after
1878 1878
1879 void CompositedLayerMapping::transitionFinished(CSSPropertyID property) 1879 void CompositedLayerMapping::transitionFinished(CSSPropertyID property)
1880 { 1880 {
1881 int animationId = m_animationProvider->getWebAnimationId(property); 1881 int animationId = m_animationProvider->getWebAnimationId(property);
1882 ASSERT(animationId); 1882 ASSERT(animationId);
1883 m_graphicsLayer->removeAnimation(animationId); 1883 m_graphicsLayer->removeAnimation(animationId);
1884 } 1884 }
1885 1885
1886 void CompositedLayerMapping::notifyAnimationStarted(const GraphicsLayer*, double time) 1886 void CompositedLayerMapping::notifyAnimationStarted(const GraphicsLayer*, double time)
1887 { 1887 {
1888 renderer()->animation()->notifyAnimationStarted(renderer(), time); 1888 renderer()->animation().notifyAnimationStarted(renderer(), time);
1889 } 1889 }
1890 1890
1891 // This is used for the 'freeze' API, for testing only. 1891 // This is used for the 'freeze' API, for testing only.
1892 void CompositedLayerMapping::suspendAnimations(double time) 1892 void CompositedLayerMapping::suspendAnimations(double time)
1893 { 1893 {
1894 m_graphicsLayer->suspendAnimations(time); 1894 m_graphicsLayer->suspendAnimations(time);
1895 } 1895 }
1896 1896
1897 IntRect CompositedLayerMapping::compositedBounds() const 1897 IntRect CompositedLayerMapping::compositedBounds() const
1898 { 1898 {
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
1971 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { 1971 } else if (graphicsLayer == m_scrollingContentsLayer.get()) {
1972 name = "Scrolling Contents Layer"; 1972 name = "Scrolling Contents Layer";
1973 } else { 1973 } else {
1974 ASSERT_NOT_REACHED(); 1974 ASSERT_NOT_REACHED();
1975 } 1975 }
1976 1976
1977 return name; 1977 return name;
1978 } 1978 }
1979 1979
1980 } // namespace WebCore 1980 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698