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

Unified Diff: mojo/services/media/common/cpp/timeline_function.cc

Issue 1986303002: Motown: Use new TimelineTransform and related definitions (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fixes per feedback. Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/services/media/common/cpp/timeline_function.h ('k') | mojo/services/media/common/cpp/timeline_rate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/media/common/cpp/timeline_function.cc
diff --git a/mojo/services/media/common/cpp/timeline_function.cc b/mojo/services/media/common/cpp/timeline_function.cc
index 350fde64a6ef6332591cce5697b1d18ff74029d4..f2b1ec167dfc2d19bda9e0660f84787b944aabac 100644
--- a/mojo/services/media/common/cpp/timeline_function.cc
+++ b/mojo/services/media/common/cpp/timeline_function.cc
@@ -29,4 +29,25 @@ TimelineFunction TimelineFunction::Compose(const TimelineFunction& bc,
}
} // namespace media
+
+TimelineTransformPtr
+TypeConverter<TimelineTransformPtr, media::TimelineFunction>::Convert(
+ const media::TimelineFunction& input) {
+ TimelineTransformPtr result = TimelineTransform::New();
+ result->reference_time = input.reference_time();
+ result->subject_time = input.subject_time();
+ result->reference_delta = input.reference_delta();
+ result->subject_delta = input.subject_delta();
+ return result;
+}
+
+media::TimelineFunction
+TypeConverter<media::TimelineFunction, TimelineTransformPtr>::Convert(
+ const TimelineTransformPtr& input) {
+ return input ? media::TimelineFunction(
+ input->reference_time, input->subject_time,
+ input->reference_delta, input->subject_delta)
+ : media::TimelineFunction();
+}
+
} // namespace mojo
« no previous file with comments | « mojo/services/media/common/cpp/timeline_function.h ('k') | mojo/services/media/common/cpp/timeline_rate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698