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

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

Issue 881183003: Animation: Cancel same-property animations on compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add manual test. Improve code a bit. Created 5 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
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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 // to get the 'property-specific keyframes'. For efficiency, we cache the 123 // to get the 'property-specific keyframes'. For efficiency, we cache the
124 // property-specific lists. 124 // property-specific lists.
125 using KeyframeGroupMap = WillBeHeapHashMap<CSSPropertyID, OwnPtrWillBeMember <PropertySpecificKeyframeGroup>>; 125 using KeyframeGroupMap = WillBeHeapHashMap<CSSPropertyID, OwnPtrWillBeMember <PropertySpecificKeyframeGroup>>;
126 mutable OwnPtrWillBeMember<KeyframeGroupMap> m_keyframeGroups; 126 mutable OwnPtrWillBeMember<KeyframeGroupMap> m_keyframeGroups;
127 mutable RefPtrWillBeMember<InterpolationEffect> m_interpolationEffect; 127 mutable RefPtrWillBeMember<InterpolationEffect> m_interpolationEffect;
128 128
129 mutable bool m_hasSyntheticKeyframes; 129 mutable bool m_hasSyntheticKeyframes;
130 130
131 friend class KeyframeEffectModelTest; 131 friend class KeyframeEffectModelTest;
132 132
133 bool affects(CSSPropertyID property) 133 bool affects(CSSPropertyID property) const override
134 { 134 {
135 ensureKeyframeGroups(); 135 ensureKeyframeGroups();
136 return m_keyframeGroups->contains(property); 136 return m_keyframeGroups->contains(property);
137 } 137 }
138 }; 138 };
139 139
140 template <class Keyframe> 140 template <class Keyframe>
141 class KeyframeEffectModel final : public KeyframeEffectModelBase { 141 class KeyframeEffectModel final : public KeyframeEffectModelBase {
142 public: 142 public:
143 using KeyframeVector = WillBeHeapVector<RefPtrWillBeMember<Keyframe>>; 143 using KeyframeVector = WillBeHeapVector<RefPtrWillBeMember<Keyframe>>;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 180
181 template <> 181 template <>
182 inline bool KeyframeEffectModel<AnimatableValueKeyframe>::isAnimatableValueKeyfr ameEffectModel() const { return true; } 182 inline bool KeyframeEffectModel<AnimatableValueKeyframe>::isAnimatableValueKeyfr ameEffectModel() const { return true; }
183 183
184 template <> 184 template <>
185 inline bool KeyframeEffectModel<StringKeyframe>::isStringKeyframeEffectModel() c onst { return true; } 185 inline bool KeyframeEffectModel<StringKeyframe>::isStringKeyframeEffectModel() c onst { return true; }
186 186
187 } // namespace blink 187 } // namespace blink
188 188
189 #endif // KeyframeEffectModel_h 189 #endif // KeyframeEffectModel_h
OLDNEW
« no previous file with comments | « Source/core/animation/CompositorAnimationsTestHelper.h ('k') | public/platform/WebCompositorAnimation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698