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

Side by Side Diff: Source/core/animation/Player.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
« no previous file with comments | « Source/core/animation/KeyframeAnimationEffect.h ('k') | Source/core/animation/Player.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 void setStartTime(double); 68 void setStartTime(double);
69 69
70 TimedItem* source() { return m_content.get(); } 70 TimedItem* source() { return m_content.get(); }
71 71
72 // Pausing via this method is not reflected in the value returned by 72 // Pausing via this method is not reflected in the value returned by
73 // paused() and must never overlap with pausing via setPaused(). 73 // paused() and must never overlap with pausing via setPaused().
74 void pauseForTesting(); 74 void pauseForTesting();
75 // Reflects all pausing, including via pauseForTesting(). 75 // Reflects all pausing, including via pauseForTesting().
76 bool pausedInternal() const { return !isNull(m_pauseStartTime); } 76 bool pausedInternal() const { return !isNull(m_pauseStartTime); }
77 77
78 bool maybeStartAnimationOnCompositor();
79 void cancelAnimationOnCompositor();
80
78 private: 81 private:
79 Player(DocumentTimeline&, TimedItem*); 82 Player(DocumentTimeline&, TimedItem*);
80 inline double pausedTimeDrift() const; 83 inline double pausedTimeDrift() const;
81 inline double currentTimeBeforeDrift() const; 84 inline double currentTimeBeforeDrift() const;
82 85
86 bool hasActiveAnimationsOnCompositor();
87
83 void setPausedImpl(bool); 88 void setPausedImpl(bool);
84 89
85 double m_pauseStartTime; 90 double m_pauseStartTime;
86 double m_playbackRate; 91 double m_playbackRate;
87 double m_timeDrift; 92 double m_timeDrift;
88 double m_startTime; 93 double m_startTime;
89 94
90 RefPtr<TimedItem> m_content; 95 RefPtr<TimedItem> m_content;
91 DocumentTimeline& m_timeline; 96 DocumentTimeline& m_timeline;
92 bool m_isPausedForTesting; 97 bool m_isPausedForTesting;
93 }; 98 };
94 99
95 } // namespace 100 } // namespace
96 101
97 #endif 102 #endif
OLDNEW
« no previous file with comments | « Source/core/animation/KeyframeAnimationEffect.h ('k') | Source/core/animation/Player.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698