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

Unified Diff: ui/base/android/window_android.cc

Issue 285373008: Android: Decouple animate from vsync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sami's comments Created 6 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
Index: ui/base/android/window_android.cc
diff --git a/ui/base/android/window_android.cc b/ui/base/android/window_android.cc
index 3dd3e6e2a6b3af44d7d00b265b24c7730dbc6f61..975460a2b88879e5326928635b34395c973f3e09 100644
--- a/ui/base/android/window_android.cc
+++ b/ui/base/android/window_android.cc
@@ -95,6 +95,16 @@ void WindowAndroid::RequestVSyncUpdate() {
Java_WindowAndroid_requestVSyncUpdate(env, GetJavaObject().obj());
}
+void WindowAndroid::SetNeedsAnimate() {
+ if (compositor_)
+ compositor_->SetNeedsAnimate();
+}
+
+void WindowAndroid::Animate(base::TimeTicks begin_frame_time) {
+ FOR_EACH_OBSERVER(
+ WindowAndroidObserver, observer_list_, OnAnimate(begin_frame_time));
+}
+
void WindowAndroid::OnVSync(JNIEnv* env, jobject obj, jlong time_micros) {
base::TimeTicks frame_time(base::TimeTicks::FromInternalValue(time_micros));
FOR_EACH_OBSERVER(

Powered by Google App Engine
This is Rietveld 408576698