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

Unified Diff: services/gfx/compositor/scene_state.h

Issue 1997513002: Mozart: Generalize frame scheduling. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-jank2
Patch Set: add comments Created 4 years, 7 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 | « services/gfx/compositor/scene_impl.cc ('k') | services/gfx/compositor/scene_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/gfx/compositor/scene_state.h
diff --git a/services/gfx/compositor/scene_state.h b/services/gfx/compositor/scene_state.h
index c5f07efb0d3443b378558ea51057e5e72591145c..ec26485cac09a6d3da32866f7f351d9751ce5993 100644
--- a/services/gfx/compositor/scene_state.h
+++ b/services/gfx/compositor/scene_state.h
@@ -8,20 +8,17 @@
#include <memory>
#include <string>
#include <unordered_map>
-#include <vector>
#include "base/callback.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "mojo/services/gfx/composition/cpp/formatting.h"
#include "mojo/services/gfx/composition/interfaces/scenes.mojom.h"
+#include "services/gfx/compositor/frame_dispatcher.h"
#include "services/gfx/compositor/graph/scene_def.h"
namespace compositor {
-using SceneFrameCallback =
- base::Callback<void(mojo::gfx::composition::FrameInfoPtr)>;
-
// Describes the state of a particular scene.
// This object is owned by the CompositorEngine that created it.
class SceneState {
@@ -54,15 +51,15 @@ class SceneState {
// Gets the underlying scene definition, never null.
SceneDef* scene_def() { return &scene_def_; }
- void AddSceneFrameCallback(const SceneFrameCallback& callback);
- void DispatchSceneFrameCallbacks(
- const mojo::gfx::composition::FrameInfo& frame_info);
+ FrameDispatcher& frame_dispatcher() { return frame_dispatcher_; }
private:
mojo::gfx::composition::SceneTokenPtr scene_token_;
+
+ FrameDispatcher frame_dispatcher_; // must be before scene_impl_
std::unique_ptr<mojo::gfx::composition::Scene> scene_impl_;
+
mojo::gfx::composition::SceneListenerPtr scene_listener_;
- std::vector<SceneFrameCallback> pending_frame_callbacks_;
SceneDef scene_def_;
« no previous file with comments | « services/gfx/compositor/scene_impl.cc ('k') | services/gfx/compositor/scene_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698