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

Side by Side Diff: ui/base/android/window_android.h

Issue 285373008: Android: Decouple animate from vsync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_BASE_ANDROID_WINDOW_ANDROID_H_ 5 #ifndef UI_BASE_ANDROID_WINDOW_ANDROID_H_
6 #define UI_BASE_ANDROID_WINDOW_ANDROID_H_ 6 #define UI_BASE_ANDROID_WINDOW_ANDROID_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <vector> 9 #include <vector>
10 #include "base/android/jni_weak_ref.h" 10 #include "base/android/jni_weak_ref.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 void AttachCompositor(WindowAndroidCompositor* compositor); 45 void AttachCompositor(WindowAndroidCompositor* compositor);
46 void DetachCompositor(); 46 void DetachCompositor();
47 47
48 void AddObserver(WindowAndroidObserver* observer); 48 void AddObserver(WindowAndroidObserver* observer);
49 void RemoveObserver(WindowAndroidObserver* observer); 49 void RemoveObserver(WindowAndroidObserver* observer);
50 50
51 WindowAndroidCompositor* GetCompositor() { return compositor_; } 51 WindowAndroidCompositor* GetCompositor() { return compositor_; }
52 52
53 void RequestVSyncUpdate(); 53 void RequestVSyncUpdate();
54 void SetNeedsAnimate();
54 void OnVSync(JNIEnv* env, jobject obj, jlong time_micros); 55 void OnVSync(JNIEnv* env, jobject obj, jlong time_micros);
56 void Animate(base::TimeTicks frame_begin_time);
Sami 2014/05/27 19:54:05 nit: begin_frame_time would be more consistent wit
no sievers 2014/05/27 20:05:17 Done.
55 57
56 private: 58 private:
57 ~WindowAndroid(); 59 ~WindowAndroid();
58 60
59 JavaObjectWeakGlobalRef weak_java_window_; 61 JavaObjectWeakGlobalRef weak_java_window_;
60 gfx::Vector2dF content_offset_; 62 gfx::Vector2dF content_offset_;
61 WindowAndroidCompositor* compositor_; 63 WindowAndroidCompositor* compositor_;
62 base::TimeDelta vsync_period_; 64 base::TimeDelta vsync_period_;
63 65
64 ObserverList<WindowAndroidObserver> observer_list_; 66 ObserverList<WindowAndroidObserver> observer_list_;
65 67
66 DISALLOW_COPY_AND_ASSIGN(WindowAndroid); 68 DISALLOW_COPY_AND_ASSIGN(WindowAndroid);
67 }; 69 };
68 70
69 } // namespace ui 71 } // namespace ui
70 72
71 #endif // UI_BASE_ANDROID_WINDOW_ANDROID_H_ 73 #endif // UI_BASE_ANDROID_WINDOW_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698