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

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

Issue 236193013: Android: Consolidate and simplify VSync logic (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 8 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 | « ui/android/java/src/org/chromium/ui/base/WindowAndroid.java ('k') | ui/base/android/window_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/android/window_android.h
diff --git a/ui/base/android/window_android.h b/ui/base/android/window_android.h
index 842bc4c88699f59fc7add09e55499c4dfbe45787..7e3918488f021d71161801375f911235a3ff19e2 100644
--- a/ui/base/android/window_android.h
+++ b/ui/base/android/window_android.h
@@ -10,6 +10,7 @@
#include "base/android/jni_weak_ref.h"
#include "base/android/scoped_java_ref.h"
#include "base/observer_list.h"
+#include "base/time/time.h"
#include "ui/base/ui_base_export.h"
#include "ui/gfx/vector2d_f.h"
@@ -21,7 +22,7 @@ class WindowAndroidObserver;
// Android implementation of the activity window.
class UI_BASE_EXPORT WindowAndroid {
public:
- WindowAndroid(JNIEnv* env, jobject obj);
+ WindowAndroid(JNIEnv* env, jobject obj, jlong vsync_period);
void Destroy(JNIEnv* env, jobject obj);
@@ -49,12 +50,16 @@ class UI_BASE_EXPORT WindowAndroid {
WindowAndroidCompositor* GetCompositor() { return compositor_; }
+ void RequestVSyncUpdate();
+ void OnVSync(JNIEnv* env, jobject obj, jlong time_micros);
+
private:
~WindowAndroid();
JavaObjectWeakGlobalRef weak_java_window_;
gfx::Vector2dF content_offset_;
WindowAndroidCompositor* compositor_;
+ base::TimeDelta vsync_period_;
ObserverList<WindowAndroidObserver> observer_list_;
« no previous file with comments | « ui/android/java/src/org/chromium/ui/base/WindowAndroid.java ('k') | ui/base/android/window_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698