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

Side by Side Diff: third_party/WebKit/Source/core/animation/EffectStack.cpp

Issue 2309963002: Apply custom property animation (Closed)
Patch Set: Rebase Created 4 years 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // TODO(dstockwell): move the playing check into AnimationEffectReadOnly and 93 // TODO(dstockwell): move the playing check into AnimationEffectReadOnly and
94 // expose both hasAnimations and hasActiveAnimations 94 // expose both hasAnimations and hasActiveAnimations
95 if (sampledEffect->effect() && 95 if (sampledEffect->effect() &&
96 sampledEffect->effect()->animation()->playing() && 96 sampledEffect->effect()->animation()->playing() &&
97 sampledEffect->effect()->hasActiveAnimationsOnCompositor(property)) 97 sampledEffect->effect()->hasActiveAnimationsOnCompositor(property))
98 return true; 98 return true;
99 } 99 }
100 return false; 100 return false;
101 } 101 }
102 102
103 bool EffectStack::affectsProperties(PropertyHandleFilter filter) const {
104 for (const auto& sampledEffect : m_sampledEffects) {
105 for (const auto& interpolation : sampledEffect->interpolations()) {
106 if (filter(interpolation->getProperty()))
107 return true;
108 }
109 }
110 return false;
111 }
112
103 ActiveInterpolationsMap EffectStack::activeInterpolations( 113 ActiveInterpolationsMap EffectStack::activeInterpolations(
104 EffectStack* effectStack, 114 EffectStack* effectStack,
105 const HeapVector<Member<const InertEffect>>* newAnimations, 115 const HeapVector<Member<const InertEffect>>* newAnimations,
106 const HeapHashSet<Member<const Animation>>* suppressedAnimations, 116 const HeapHashSet<Member<const Animation>>* suppressedAnimations,
107 KeyframeEffectReadOnly::Priority priority, 117 KeyframeEffectReadOnly::Priority priority,
108 PropertyHandleFilter propertyHandleFilter) { 118 PropertyHandleFilter propertyHandleFilter) {
109 ActiveInterpolationsMap result; 119 ActiveInterpolationsMap result;
110 120
111 if (effectStack) { 121 if (effectStack) {
112 HeapVector<Member<SampledEffect>>& sampledEffects = 122 HeapVector<Member<SampledEffect>>& sampledEffects =
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 if (!CompositorAnimations::getAnimatedBoundingBox( 182 if (!CompositorAnimations::getAnimatedBoundingBox(
173 expandingBox, *effect->model(), startRange, endRange)) 183 expandingBox, *effect->model(), startRange, endRange))
174 return false; 184 return false;
175 box.expandTo(expandingBox); 185 box.expandTo(expandingBox);
176 } 186 }
177 } 187 }
178 return true; 188 return true;
179 } 189 }
180 190
181 } // namespace blink 191 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/animation/EffectStack.h ('k') | third_party/WebKit/Source/core/animation/css/CSSAnimations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698