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

Unified Diff: sky/compositor/layer_host.h

Issue 744753003: Use the scheduler to drive the Sky compositor (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/compositor/BUILD.gn ('k') | sky/compositor/layer_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/compositor/layer_host.h
diff --git a/sky/compositor/layer_host.h b/sky/compositor/layer_host.h
index d559cdfaba0f568bfb2a83d0dc91b285ed7a98e7..197ff9a9e8b0c3b0fc9b9ec78e83414af5d09153 100644
--- a/sky/compositor/layer_host.h
+++ b/sky/compositor/layer_host.h
@@ -11,13 +11,14 @@
#include "sky/compositor/layer_host_client.h"
#include "sky/compositor/resource_manager.h"
#include "sky/compositor/surface_holder.h"
+#include "sky/scheduler/scheduler.h"
namespace sky {
class ResourceManager;
class Layer;
class LayerHostClient;
-class LayerHost : public SurfaceHolder::Client {
+class LayerHost : public SurfaceHolder::Client, public Scheduler::Client {
public:
explicit LayerHost(LayerHostClient* client);
~LayerHost();
@@ -41,11 +42,14 @@ class LayerHost : public SurfaceHolder::Client {
private:
// SurfaceHolder::Client
- void OnReadyForNextFrame() override;
void OnSurfaceIdAvailable(mojo::SurfaceIdPtr surface_id) override;
void ReturnResources(
mojo::Array<mojo::ReturnedResourcePtr> resources) override;
+ // Scheduler::Client
+ void BeginFrame(base::TimeTicks frame_time,
+ base::TimeTicks deadline) override;
+
void Upload(Layer* layer);
LayerHostClient* client_;
@@ -53,6 +57,7 @@ class LayerHost : public SurfaceHolder::Client {
base::WeakPtr<mojo::GLContext> gl_context_;
mojo::GaneshContext ganesh_context_;
ResourceManager resource_manager_;
+ Scheduler scheduler_;
scoped_refptr<Layer> root_layer_;
« no previous file with comments | « sky/compositor/BUILD.gn ('k') | sky/compositor/layer_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698