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

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

Issue 611313003: Use estimated vsync period on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 void DetachCompositor(); 47 void DetachCompositor();
48 48
49 void AddObserver(WindowAndroidObserver* observer); 49 void AddObserver(WindowAndroidObserver* observer);
50 void RemoveObserver(WindowAndroidObserver* observer); 50 void RemoveObserver(WindowAndroidObserver* observer);
51 51
52 WindowAndroidCompositor* GetCompositor() { return compositor_; } 52 WindowAndroidCompositor* GetCompositor() { return compositor_; }
53 53
54 void RequestVSyncUpdate(); 54 void RequestVSyncUpdate();
55 void SetNeedsAnimate(); 55 void SetNeedsAnimate();
56 void OnVSync(JNIEnv* env, jobject obj, jlong time_micros); 56 void OnVSync(JNIEnv* env, jobject obj, jlong time_micros);
57 void UpdateVSyncPeriod(JNIEnv* env, jobject obj, jlong period_micros);
57 void Animate(base::TimeTicks begin_frame_time); 58 void Animate(base::TimeTicks begin_frame_time);
58 59
59 private: 60 private:
60 ~WindowAndroid(); 61 ~WindowAndroid();
61 62
62 JavaObjectWeakGlobalRef weak_java_window_; 63 JavaObjectWeakGlobalRef weak_java_window_;
63 gfx::Vector2dF content_offset_; 64 gfx::Vector2dF content_offset_;
64 WindowAndroidCompositor* compositor_; 65 WindowAndroidCompositor* compositor_;
65 base::TimeDelta vsync_period_; 66 base::TimeDelta vsync_period_;
66 67
67 ObserverList<WindowAndroidObserver> observer_list_; 68 ObserverList<WindowAndroidObserver> observer_list_;
68 69
69 DISALLOW_COPY_AND_ASSIGN(WindowAndroid); 70 DISALLOW_COPY_AND_ASSIGN(WindowAndroid);
70 }; 71 };
71 72
72 } // namespace ui 73 } // namespace ui
73 74
74 #endif // UI_BASE_ANDROID_WINDOW_ANDROID_H_ 75 #endif // UI_BASE_ANDROID_WINDOW_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698