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

Unified Diff: ui/android/window_android.h

Issue 2564403002: [android] Make RWHVAndroid a BeginFrameObserver. (Closed)
Patch Set: . Created 4 years 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/android/window_android.h
diff --git a/ui/android/window_android.h b/ui/android/window_android.h
index 05279ced4c92a2a9e8827b15c67e0c94187a9e11..762406aa51ef389291fb573539f7a5f31f38dabb 100644
--- a/ui/android/window_android.h
+++ b/ui/android/window_android.h
@@ -6,6 +6,7 @@
#define UI_ANDROID_WINDOW_ANDROID_H_
#include <jni.h>
+#include <memory>
#include <string>
#include <vector>
@@ -18,9 +19,13 @@
#include "ui/android/view_android.h"
#include "ui/gfx/geometry/vector2d_f.h"
+namespace cc {
+class BeginFrameSource;
+} // namespace cc
+
namespace display {
class DisplayAndroidManager;
-}
+} // namespace display
namespace ui {
@@ -59,8 +64,9 @@ class UI_ANDROID_EXPORT WindowAndroid : public ViewAndroid {
void RemoveObserver(WindowAndroidObserver* observer);
WindowAndroidCompositor* GetCompositor() { return compositor_; }
+ cc::BeginFrameSource* GetBeginFrameSource();
- void RequestVSyncUpdate();
+ void SetNeedsBeginFrames(bool needs_begin_frames);
boliu 2016/12/12 21:41:48 private, and friend WindowBeginFrameSource?
Eric Seckler 2016/12/13 10:03:56 Done.
void SetNeedsAnimate();
void Animate(base::TimeTicks begin_frame_time);
void OnVSync(JNIEnv* env,
@@ -88,6 +94,8 @@ class UI_ANDROID_EXPORT WindowAndroid : public ViewAndroid {
~WindowAndroid() override;
+ void RequestVSyncUpdate();
+
// ViewAndroid overrides.
WindowAndroid* GetWindowAndroid() const override;
@@ -101,6 +109,10 @@ class UI_ANDROID_EXPORT WindowAndroid : public ViewAndroid {
base::ObserverList<WindowAndroidObserver> observer_list_;
+ class WindowBeginFrameSource;
+ std::unique_ptr<WindowBeginFrameSource> begin_frame_source_;
+ bool needs_begin_frames_;
+
DISALLOW_COPY_AND_ASSIGN(WindowAndroid);
};

Powered by Google App Engine
This is Rietveld 408576698