| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 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 |
| 11 * copyright notice, this list of conditions and the following disclaimer | 11 * copyright notice, this list of conditions and the following disclaimer |
| 12 * in the documentation and/or other materials provided with the | 12 * in the documentation and/or other materials provided with the |
| 13 * distribution. | 13 * distribution. |
| 14 * * Neither the name of Google Inc. nor the names of its | 14 * * Neither the name of Google Inc. nor the names of its |
| 15 * contributors may be used to endorse or promote products derived from | 15 * contributors may be used to endorse or promote products derived from |
| 16 * this software without specific prior written permission. | 16 * this software without specific prior written permission. |
| 17 * | 17 * |
| 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef AnimationStack_h | 31 #ifndef RemotePlayerProxy_h |
| 32 #define AnimationStack_h | 32 #define RemotePlayerProxy_h |
| 33 | 33 |
| 34 #include "core/animation/Animation.h" | 34 #include "core/animation/Animation.h" |
| 35 #include "core/animation/AnimationEffect.h" | 35 #include "core/animation/AnimationEffect.h" |
| 36 #include "core/animation/AnimationHelpers.h" |
| 36 #include "core/animation/AnimationPlayer.h" | 37 #include "core/animation/AnimationPlayer.h" |
| 37 #include "core/animation/SampledEffect.h" | 38 #include "core/animation/KeyframeEffectModel.h" |
| 38 #include "platform/geometry/FloatBox.h" | 39 #include "core/animation/StringKeyframe.h" |
| 39 #include "wtf/HashSet.h" | 40 #include "core/animation/TimingInput.h" |
| 40 #include "wtf/Vector.h" | 41 #include "core/css/parser/BisonCSSParser.h" |
| 42 #include "core/css/parser/CSSPropertyParser.h" |
| 43 #include "core/css/resolver/CSSToStyleMap.h" |
| 44 #include "core/css/resolver/StyleResolver.h" |
| 45 #include "core/dom/Document.h" |
| 46 #include "core/dom/Element.h" |
| 47 #include "core/wawwa/ProxyKeyframe.h" |
| 48 #include "core/workers/Worker.h" |
| 49 #include "wtf/NonCopyingSort.h" |
| 41 | 50 |
| 42 namespace blink { | 51 namespace blink { |
| 43 | 52 |
| 44 class InertAnimation; | 53 class Dictionary; |
| 54 class ExceptionState; |
| 55 class HTMLElement; |
| 56 class Element; |
| 45 | 57 |
| 46 class AnimationStack { | 58 class RemotePlayerProxy FINAL : public RefCountedWillBeRefCountedGarbageCollecte
d<RemotePlayerProxy> { |
| 47 DISALLOW_ALLOCATION(); | 59 |
| 48 WTF_MAKE_NONCOPYABLE(AnimationStack); | |
| 49 public: | 60 public: |
| 50 AnimationStack(); | 61 RemotePlayerProxy(String id, Vector<ProxyKeyframe> keyframes, Timing timingI
nputDictionary, ExceptionState&, PassRefPtr<Worker>); |
| 51 | 62 void execute(ACTIONS val, ExceptionState&); |
| 52 void add(PassOwnPtrWillBeRawPtr<SampledEffect> effect) { m_effects.append(ef
fect); } | 63 void reportTime(); |
| 53 bool isEmpty() const { return m_effects.isEmpty(); } | 64 bool animated; |
| 54 bool affects(CSSPropertyID) const; | 65 bool reported; |
| 55 bool hasActiveAnimationsOnCompositor(CSSPropertyID) const; | |
| 56 static WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation> >
activeInterpolations(AnimationStack*, const WillBeHeapVector<RawPtrWillBeMember<
InertAnimation> >* newAnimations, const WillBeHeapHashSet<RawPtrWillBeMember<con
st AnimationPlayer> >* cancelledAnimationPlayers, Animation::Priority, double ti
melineCurrentTime); | |
| 57 | |
| 58 bool getAnimatedBoundingBox(FloatBox&, CSSPropertyID) const; | |
| 59 void trace(Visitor*); | |
| 60 | 66 |
| 61 private: | 67 private: |
| 62 void simplifyEffects(); | 68 String m_elemID; |
| 63 // Effects sorted by priority. Lower priority at the start of the list. | 69 RefPtr<Worker> m_worker; |
| 64 WillBeHeapVector<OwnPtrWillBeMember<SampledEffect> > m_effects; | 70 AnimationPlayer* m_player; |
| 65 | 71 PassRefPtrWillBeRawPtr<Element> m_target; |
| 66 friend class AnimationAnimationStackTest; | 72 Vector<ProxyKeyframe> m_keyframes; |
| 73 Timing m_timingInputDictionary; |
| 67 }; | 74 }; |
| 68 | 75 |
| 69 } // namespace blink | 76 } // namespace blink |
| 70 | 77 |
| 71 #endif | 78 #endif |
| OLD | NEW |