Index: examples/ganesh_app/ganesh_view.h |
diff --git a/examples/ganesh_app/ganesh_view.h b/examples/ganesh_app/ganesh_view.h |
index 8b7e847ac96a505f815723f87ffdff66c2252ad9..505f6965744ed494ec0a08ef37411d577a71ac6f 100644 |
--- a/examples/ganesh_app/ganesh_view.h |
+++ b/examples/ganesh_app/ganesh_view.h |
@@ -8,6 +8,7 @@ |
#include "examples/ganesh_app/ganesh_context.h" |
#include "examples/ganesh_app/mojo_gl_context.h" |
#include "examples/ganesh_app/texture_uploader.h" |
+#include "mc/scheduler/scheduler.h" |
#include "mojo/services/public/cpp/view_manager/view_observer.h" |
#include "mojo/services/public/interfaces/surfaces/surface_id.mojom.h" |
@@ -17,25 +18,35 @@ class Shell; |
namespace examples { |
-class GaneshView : public TextureUploader::Client, public mojo::ViewObserver { |
+class GaneshView : public TextureUploader::Client, |
+ public mc::Scheduler::Client, |
+ public mojo::ViewObserver { |
public: |
GaneshView(mojo::Shell* shell, mojo::View* view); |
~GaneshView(); |
private: |
+ // From ViewObserver |
void OnViewDestroyed(mojo::View* view) override; |
void OnViewBoundsChanged(mojo::View* view, |
const mojo::Rect& old_bounds, |
const mojo::Rect& new_bounds) override; |
+ // From TextureUploader::Client |
void OnSurfaceIdAvailable(mojo::SurfaceIdPtr surface_id) override; |
- void Draw(const mojo::Size& size); |
+ // From mc::Scheduler::Client |
+ void BeginFrame(base::TimeTicks frame_time, |
+ base::TimeTicks deadline) override; |
+ |
+ base::TimeDelta Draw(base::TimeTicks frame_time); |
mojo::View* view_; |
MojoGLContext gl_context_; |
GaneshContext gr_context_; |
TextureUploader texture_uploader_; |
+ base::TimeTicks base_time_; |
+ mc::Scheduler scheduler_; |
DISALLOW_COPY_AND_ASSIGN(GaneshView); |
}; |