Chromium Code Reviews| Index: cc/surfaces/display.h |
| diff --git a/cc/surfaces/display.h b/cc/surfaces/display.h |
| index 78b3054c9e0f52f4f9b62161179420c91bb7d8e1..481d807fb7a6f9103b5f8d2e3fac54e3040da83c 100644 |
| --- a/cc/surfaces/display.h |
| +++ b/cc/surfaces/display.h |
| @@ -11,6 +11,7 @@ |
| #include "cc/output/output_surface_client.h" |
| #include "cc/output/renderer.h" |
| #include "cc/resources/returned_resource.h" |
| +#include "cc/surfaces/display_scheduler.h" |
| #include "cc/surfaces/surface_aggregator.h" |
| #include "cc/surfaces/surface_id.h" |
| #include "cc/surfaces/surface_manager.h" |
| @@ -43,7 +44,8 @@ class TextureMailboxDeleter; |
| // A Display produces a surface that can be used to draw to a physical display |
| // (OutputSurface). The client is responsible for creating and sizing the |
| // surface IDs used to draw into the display and deciding when to draw. |
| -class CC_SURFACES_EXPORT Display : public OutputSurfaceClient, |
| +class CC_SURFACES_EXPORT Display : public DisplaySchedulerClient, |
| + public OutputSurfaceClient, |
| public RendererClient, |
| public SurfaceDamageObserver { |
| public: |
| @@ -54,16 +56,19 @@ class CC_SURFACES_EXPORT Display : public OutputSurfaceClient, |
| const RendererSettings& settings); |
| ~Display() override; |
| - bool Initialize(scoped_ptr<OutputSurface> output_surface); |
| + bool Initialize(scoped_ptr<OutputSurface> output_surface, |
| + DisplayScheduler* scheduler); |
| // device_scale_factor is used to communicate to the external window system |
| // what scale this was rendered at. |
| void SetSurfaceId(SurfaceId id, float device_scale_factor); |
| void Resize(const gfx::Size& new_size); |
| - bool Draw(); |
| + bool CurrentSurfaceHasResources(); |
|
brianderson
2015/04/11 02:23:17
Unused. Will delete.
|
| SurfaceId CurrentSurfaceId(); |
| - int GetMaxFramesPending(); |
| + |
| + // DisplaySchedulerClient implementation. |
| + bool DrawAndSwap() override; |
| // OutputSurfaceClient implementation. |
| void DeferredInitialize() override; |
| @@ -94,6 +99,7 @@ class CC_SURFACES_EXPORT Display : public OutputSurfaceClient, |
| private: |
| void InitializeRenderer(); |
| + void UpdateResourcesLockedByBrowser(); |
| DisplayClient* client_; |
| SurfaceManager* manager_; |
| @@ -104,6 +110,7 @@ class CC_SURFACES_EXPORT Display : public OutputSurfaceClient, |
| gfx::Size current_surface_size_; |
| float device_scale_factor_; |
| scoped_ptr<OutputSurface> output_surface_; |
| + DisplayScheduler* scheduler_; |
| scoped_ptr<ResourceProvider> resource_provider_; |
| scoped_ptr<SurfaceAggregator> aggregator_; |
| scoped_ptr<DirectRenderer> renderer_; |