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

Unified Diff: cc/blink/web_filter_animation_curve_impl.cc

Issue 809523004: Define step timing function for the cc animation framework. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused enum Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/blink/web_filter_animation_curve_impl.h ('k') | cc/blink/web_float_animation_curve_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/blink/web_filter_animation_curve_impl.cc
diff --git a/cc/blink/web_filter_animation_curve_impl.cc b/cc/blink/web_filter_animation_curve_impl.cc
index bdbffe8f89a81b617f96511a59741a34321a8ad7..9206dc735252989bdfcc26c884d9e6cf794235e5 100644
--- a/cc/blink/web_filter_animation_curve_impl.cc
+++ b/cc/blink/web_filter_animation_curve_impl.cc
@@ -49,6 +49,17 @@ void WebFilterAnimationCurveImpl::add(const WebFilterKeyframe& keyframe,
cc::CubicBezierTimingFunction::Create(x1, y1, x2, y2)));
}
+void WebFilterAnimationCurveImpl::add(const WebFilterKeyframe& keyframe,
+ int steps,
+ float steps_start_offset) {
+ const cc::FilterOperations& filter_operations =
+ static_cast<const WebFilterOperationsImpl&>(keyframe.value())
+ .AsFilterOperations();
+ curve_->AddKeyframe(cc::FilterKeyframe::Create(
+ base::TimeDelta::FromSecondsD(keyframe.time()), filter_operations,
+ cc::StepsTimingFunction::Create(steps, steps_start_offset)));
+}
+
void WebFilterAnimationCurveImpl::setTimingFunction(TimingFunctionType type) {
curve_->SetTimingFunction(CreateTimingFunction(type));
}
« no previous file with comments | « cc/blink/web_filter_animation_curve_impl.h ('k') | cc/blink/web_float_animation_curve_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698