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

Side by Side Diff: Source/core/svg/SVGDocumentExtensions.h

Issue 190963003: Drive SVG Animations via requestAnimationFrame (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | « Source/core/page/PageAnimator.cpp ('k') | Source/core/svg/SVGDocumentExtensions.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) 2006 Apple Inc. All rights reserved. 2 * Copyright (C) 2006 Apple Inc. All rights reserved.
3 * Copyright (C) 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> 3 * Copyright (C) 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 SVGDocumentExtensions(Document*); 47 SVGDocumentExtensions(Document*);
48 ~SVGDocumentExtensions(); 48 ~SVGDocumentExtensions();
49 49
50 void addTimeContainer(SVGSVGElement*); 50 void addTimeContainer(SVGSVGElement*);
51 void removeTimeContainer(SVGSVGElement*); 51 void removeTimeContainer(SVGSVGElement*);
52 52
53 void addResource(const AtomicString& id, RenderSVGResourceContainer*); 53 void addResource(const AtomicString& id, RenderSVGResourceContainer*);
54 void removeResource(const AtomicString& id); 54 void removeResource(const AtomicString& id);
55 RenderSVGResourceContainer* resourceById(const AtomicString& id) const; 55 RenderSVGResourceContainer* resourceById(const AtomicString& id) const;
56 56
57 static void serviceOnAnimationFrame(Document&, double monotonicAnimationStar tTime);
58
57 void startAnimations(); 59 void startAnimations();
58 void pauseAnimations(); 60 void pauseAnimations();
59 void unpauseAnimations(); 61 void unpauseAnimations();
60 void dispatchSVGLoadEventToOutermostSVGElements(); 62 void dispatchSVGLoadEventToOutermostSVGElements();
61 63
62 void reportWarning(const String&); 64 void reportWarning(const String&);
63 void reportError(const String&); 65 void reportError(const String&);
64 66
65 SVGResourcesCache* resourcesCache() const { return m_resourcesCache.get(); } 67 SVGResourcesCache* resourcesCache() const { return m_resourcesCache.get(); }
66 68
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 // which are referenced by any object in the SVG document, but do NOT exist yet. 104 // which are referenced by any object in the SVG document, but do NOT exist yet.
103 // For instance, dynamically build gradients / patterns / clippers... 105 // For instance, dynamically build gradients / patterns / clippers...
104 void addPendingResource(const AtomicString& id, Element*); 106 void addPendingResource(const AtomicString& id, Element*);
105 bool hasPendingResource(const AtomicString& id) const; 107 bool hasPendingResource(const AtomicString& id) const;
106 bool isElementPendingResources(Element*) const; 108 bool isElementPendingResources(Element*) const;
107 bool isElementPendingResource(Element*, const AtomicString& id) const; 109 bool isElementPendingResource(Element*, const AtomicString& id) const;
108 void clearHasPendingResourcesIfPossible(Element*); 110 void clearHasPendingResourcesIfPossible(Element*);
109 void removeElementFromPendingResources(Element*); 111 void removeElementFromPendingResources(Element*);
110 PassOwnPtr<SVGPendingElements> removePendingResource(const AtomicString& id) ; 112 PassOwnPtr<SVGPendingElements> removePendingResource(const AtomicString& id) ;
111 113
114 void serviceAnimations(double monotonicAnimationStartTime);
115
112 // The following two functions are used for scheduling a pending resource to be removed. 116 // The following two functions are used for scheduling a pending resource to be removed.
113 void markPendingResourcesForRemoval(const AtomicString&); 117 void markPendingResourcesForRemoval(const AtomicString&);
114 Element* removeElementFromPendingResourcesForRemoval(const AtomicString&); 118 Element* removeElementFromPendingResourcesForRemoval(const AtomicString&);
115 119
116 private: 120 private:
117 PassOwnPtr<SVGPendingElements> removePendingResourceForRemoval(const AtomicS tring&); 121 PassOwnPtr<SVGPendingElements> removePendingResourceForRemoval(const AtomicS tring&);
118 }; 122 };
119 123
120 } 124 }
121 125
122 #endif 126 #endif
OLDNEW
« no previous file with comments | « Source/core/page/PageAnimator.cpp ('k') | Source/core/svg/SVGDocumentExtensions.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698