| Index: cc/test/test_delegating_output_surface.h
|
| diff --git a/cc/test/test_delegating_output_surface.h b/cc/test/test_delegating_output_surface.h
|
| index ed22b4bfe2d81c496b8ffe5a0bb1fbffe1fad09b..8f4d34a80c76592894130ee416c2e49bb78ead60 100644
|
| --- a/cc/test/test_delegating_output_surface.h
|
| +++ b/cc/test/test_delegating_output_surface.h
|
| @@ -19,16 +19,22 @@
|
| namespace cc {
|
|
|
| class TestDelegatingOutputSurface : public OutputSurface,
|
| - public SurfaceFactoryClient {
|
| + public SurfaceFactoryClient,
|
| + public DisplayClient {
|
| public:
|
| TestDelegatingOutputSurface(
|
| scoped_refptr<ContextProvider> compositor_context_provider,
|
| scoped_refptr<ContextProvider> worker_context_provider,
|
| - std::unique_ptr<Display> display,
|
| - bool context_shared_with_compositor,
|
| - bool allow_force_reclaim_resources);
|
| + std::unique_ptr<OutputSurface> display_output_surface,
|
| + SharedBitmapManager* shared_bitmap_manager,
|
| + gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
|
| + const RendererSettings& renderer_settings,
|
| + base::SingleThreadTaskRunner* task_runner,
|
| + bool synchronous_composite);
|
| ~TestDelegatingOutputSurface() override;
|
|
|
| + Display* display() const { return display_.get(); }
|
| +
|
| // OutputSurface implementation.
|
| bool BindToClient(OutputSurfaceClient* client) override;
|
| void DetachFromClient() override;
|
| @@ -41,14 +47,13 @@ class TestDelegatingOutputSurface : public OutputSurface,
|
| void ReturnResources(const ReturnedResourceArray& resources) override;
|
| void SetBeginFrameSource(BeginFrameSource* begin_frame_source) override;
|
|
|
| + // DisplayClient implementation.
|
| + void DisplayOutputSurfaceLost() override;
|
| + void DisplaySetMemoryPolicy(const ManagedMemoryPolicy& policy) override;
|
| +
|
| private:
|
| void DrawCallback(SurfaceDrawStatus);
|
|
|
| - class PixelTestDisplayClient : public DisplayClient {
|
| - void DisplayOutputSurfaceLost() override {}
|
| - void DisplaySetMemoryPolicy(const ManagedMemoryPolicy& policy) override {}
|
| - };
|
| -
|
| // TODO(danakj): These don't to be stored in unique_ptrs when OutputSurface
|
| // is owned/destroyed on the compositor thread.
|
| std::unique_ptr<SurfaceManager> surface_manager_;
|
| @@ -58,10 +63,11 @@ class TestDelegatingOutputSurface : public OutputSurface,
|
| // Uses surface_manager_.
|
| std::unique_ptr<SurfaceFactory> surface_factory_;
|
|
|
| - PixelTestDisplayClient display_client_;
|
| // Uses surface_manager_.
|
| std::unique_ptr<Display> display_;
|
|
|
| + bool bound_ = false;
|
| +
|
| base::WeakPtrFactory<TestDelegatingOutputSurface> weak_ptrs_;
|
| };
|
|
|
|
|