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

Side by Side Diff: Source/core/animation/ActiveAnimations.h

Issue 23874019: Web Animations CSS: Start running animations on the compositor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase and rename hasActiveAnimationOnCompositor to hasActiveAnimationsOnCompositor 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 22 matching lines...) Expand all
33 33
34 #include "core/animation/AnimationStack.h" 34 #include "core/animation/AnimationStack.h"
35 #include "core/animation/css/CSSAnimations.h" 35 #include "core/animation/css/CSSAnimations.h"
36 #include "wtf/HashCountedSet.h" 36 #include "wtf/HashCountedSet.h"
37 #include "wtf/HashMap.h" 37 #include "wtf/HashMap.h"
38 #include "wtf/RefPtr.h" 38 #include "wtf/RefPtr.h"
39 #include "wtf/Vector.h" 39 #include "wtf/Vector.h"
40 40
41 namespace WebCore { 41 namespace WebCore {
42 42
43 class RenderObject;
44 class Element;
45
46 // FIXME: Move these to CompositorAnimations
47 bool shouldCompositeForActiveAnimations(const RenderObject&, bool renderViewInCo mpositingMode);
48 bool hasActiveAnimations(const RenderObject&, CSSPropertyID);
49 bool hasActiveAnimationsOnCompositor(const RenderObject&, CSSPropertyID);
50
43 class ActiveAnimations { 51 class ActiveAnimations {
44 public: 52 public:
45 // Animations that are currently active for this element, their effects will be applied 53 // Animations that are currently active for this element, their effects will be applied
46 // during a style recalc. CSS Transitions are included in this stack. 54 // during a style recalc. CSS Transitions are included in this stack.
47 AnimationStack& defaultStack() { return m_defaultStack; } 55 AnimationStack& defaultStack() { return m_defaultStack; }
48 // Tracks the state of active CSS Animations and Transitions. The individual animations 56 // Tracks the state of active CSS Animations and Transitions. The individual animations
49 // will also be part of the default stack, but the mapping betwen animation name and 57 // will also be part of the default stack, but the mapping betwen animation name and
50 // player is kept here. 58 // player is kept here.
51 CSSAnimations& cssAnimations() { return m_cssAnimations; } 59 CSSAnimations& cssAnimations() { return m_cssAnimations; }
60 const CSSAnimations& cssAnimations() const { return m_cssAnimations; }
52 61
53 typedef HashCountedSet<Player*> PlayerSet; 62 typedef HashCountedSet<Player*> PlayerSet;
54 // Players which have animations targeting this element. 63 // Players which have animations targeting this element.
55 const PlayerSet& players() const { return m_players; } 64 const PlayerSet& players() const { return m_players; }
56 PlayerSet& players() { return m_players; } 65 PlayerSet& players() { return m_players; }
57 66
58 bool isEmpty() const { return m_defaultStack.isEmpty() && m_cssAnimations.is Empty(); } 67 bool isEmpty() const { return m_defaultStack.isEmpty() && m_cssAnimations.is Empty(); }
68
69 bool hasActiveAnimations(CSSPropertyID) const;
70 bool hasActiveAnimationsOnCompositor(CSSPropertyID) const;
71 void cancelAnimationOnCompositor();
72
59 private: 73 private:
60 AnimationStack m_defaultStack; 74 AnimationStack m_defaultStack;
61 CSSAnimations m_cssAnimations; 75 CSSAnimations m_cssAnimations;
62 PlayerSet m_players; 76 PlayerSet m_players;
63 }; 77 };
64 78
65 } // namespace WebCore 79 } // namespace WebCore
66 80
67 #endif 81 #endif
OLDNEW
« no previous file with comments | « LayoutTests/animations/opacity-transform-animation-expected.html ('k') | Source/core/animation/ActiveAnimations.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698