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

Side by Side Diff: Source/core/svg/animation/SMILTimeContainer.h

Issue 143403005: Make the timer in SMILTimeContainer more of an implementation detail (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Not Soon anymore. 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
« no previous file with comments | « no previous file | Source/core/svg/animation/SMILTimeContainer.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) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 void begin(); 59 void begin();
60 void pause(); 60 void pause();
61 void resume(); 61 void resume();
62 void setElapsed(SMILTime); 62 void setElapsed(SMILTime);
63 63
64 void setDocumentOrderIndexesDirty() { m_documentOrderIndexesDirty = true; } 64 void setDocumentOrderIndexesDirty() { m_documentOrderIndexesDirty = true; }
65 65
66 private: 66 private:
67 SMILTimeContainer(SVGSVGElement* owner); 67 SMILTimeContainer(SVGSVGElement* owner);
68 68
69 bool isTimelineRunning() const;
70 void scheduleAnimationFrame(SMILTime fireTime);
71 void scheduleAnimationFrame();
72 void cancelAnimationFrame();
69 void timerFired(Timer<SMILTimeContainer>*); 73 void timerFired(Timer<SMILTimeContainer>*);
70 void startTimer(SMILTime fireTime, SMILTime minimumDelay = 0);
71 void updateAnimations(SMILTime elapsed, bool seekToTime = false); 74 void updateAnimations(SMILTime elapsed, bool seekToTime = false);
72 75
73 void updateDocumentOrderIndexes(); 76 void updateDocumentOrderIndexes();
74 double lastResumeTime() const { return m_resumeTime ? m_resumeTime : m_begin Time; } 77 double lastResumeTime() const { return m_resumeTime ? m_resumeTime : m_begin Time; }
75 78
76 double m_beginTime; 79 double m_beginTime;
77 double m_pauseTime; 80 double m_pauseTime;
78 double m_resumeTime; 81 double m_resumeTime;
79 double m_accumulatedActiveTime; 82 double m_accumulatedActiveTime;
80 double m_presetStartTime; 83 double m_presetStartTime;
81 84
82 bool m_documentOrderIndexesDirty; 85 bool m_documentOrderIndexesDirty;
83 86
84 Timer<SMILTimeContainer> m_timer; 87 Timer<SMILTimeContainer> m_timer;
85 88
86 typedef pair<SVGElement*, QualifiedName> ElementAttributePair; 89 typedef pair<SVGElement*, QualifiedName> ElementAttributePair;
87 typedef Vector<SVGSMILElement*> AnimationsVector; 90 typedef Vector<SVGSMILElement*> AnimationsVector;
88 typedef HashMap<ElementAttributePair, OwnPtr<AnimationsVector> > GroupedAnim ationsMap; 91 typedef HashMap<ElementAttributePair, OwnPtr<AnimationsVector> > GroupedAnim ationsMap;
89 GroupedAnimationsMap m_scheduledAnimations; 92 GroupedAnimationsMap m_scheduledAnimations;
90 93
91 SVGSVGElement* m_ownerSVGElement; 94 SVGSVGElement* m_ownerSVGElement;
92 95
93 #ifndef NDEBUG 96 #ifndef NDEBUG
94 bool m_preventScheduledAnimationsChanges; 97 bool m_preventScheduledAnimationsChanges;
95 #endif 98 #endif
96 }; 99 };
97 } 100 }
98 101
99 #endif // SMILTimeContainer_h 102 #endif // SMILTimeContainer_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/svg/animation/SMILTimeContainer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698