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

Unified Diff: mojo/ui/choreographer.h

Issue 1943153002: Mozart: Move frame lag compensation to new class. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 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 | « mojo/ui/BUILD.gn ('k') | mojo/ui/choreographer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/ui/choreographer.h
diff --git a/mojo/ui/choreographer.h b/mojo/ui/choreographer.h
index 3708cc2ad1d49e2f63c570b65b758dc087a54655..4e0cad55d8706cf0c747a69faa80d42c48844441 100644
--- a/mojo/ui/choreographer.h
+++ b/mojo/ui/choreographer.h
@@ -7,6 +7,7 @@
#include "base/time/time.h"
#include "mojo/public/cpp/system/macros.h"
+#include "mojo/services/gfx/composition/cpp/frame_tracker.h"
#include "mojo/services/gfx/composition/interfaces/scenes.mojom.h"
#include "mojo/services/gfx/composition/interfaces/scheduling.mojom.h"
@@ -27,7 +28,7 @@ class ChoreographerDelegate;
// const mojo::ui::ViewProvider::CreateViewCallback&
// create_view_callback)
// : BaseView(app_impl, "MyView", create_view_callback),
-// choreographer_(scene_scheduler(), this) {}
+// choreographer_(scene(), this) {}
// ~MyView() override {}
//
// private:
@@ -51,9 +52,9 @@ class Choreographer {
return scene_scheduler_.get();
}
- // Gets the most recent frame info, or null if none.
- mojo::gfx::composition::FrameInfo* last_frame_info() {
- return last_frame_info_.get();
+ // Gets the frame tracker.
+ mojo::gfx::composition::FrameTracker& frame_tracker() {
+ return frame_tracker_;
}
// Schedules a call to the delegate's |OnDraw| using the scene scheduler.
@@ -62,7 +63,7 @@ class Choreographer {
private:
mojo::gfx::composition::SceneSchedulerPtr scene_scheduler_;
ChoreographerDelegate* delegate_;
- mojo::gfx::composition::FrameInfoPtr last_frame_info_;
+ mojo::gfx::composition::FrameTracker frame_tracker_;
void ScheduleFrame();
void DoFrame(mojo::gfx::composition::FrameInfoPtr frame_info);
« no previous file with comments | « mojo/ui/BUILD.gn ('k') | mojo/ui/choreographer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698