OLD | NEW |
| (Empty) |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef COMPONENTS_MUS_SURFACES_TOP_LEVEL_DISPLAY_CLIENT_H_ | |
6 #define COMPONENTS_MUS_SURFACES_TOP_LEVEL_DISPLAY_CLIENT_H_ | |
7 | |
8 #include "cc/surfaces/display_client.h" | |
9 | |
10 #include "base/memory/ref_counted.h" | |
11 #include "base/single_thread_task_runner.h" | |
12 | |
13 namespace cc { | |
14 class Display; | |
15 class OutputSurface; | |
16 class RendererSettings; | |
17 class SharedBitmapManager; | |
18 class SurfaceManager; | |
19 } | |
20 | |
21 namespace gpu { | |
22 class GpuMemoryBufferManager; | |
23 } | |
24 | |
25 namespace mus { | |
26 | |
27 class TopLevelDisplayClient : public cc::DisplayClient { | |
28 public: | |
29 TopLevelDisplayClient(std::unique_ptr<cc::OutputSurface> output_surface, | |
30 cc::SurfaceManager* surface_manager, | |
31 cc::SharedBitmapManager* bitmap_manager, | |
32 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | |
33 const cc::RendererSettings& settings, | |
34 scoped_refptr<base::SingleThreadTaskRunner> task_runner, | |
35 uint32_t compositor_surface_namespace); | |
36 ~TopLevelDisplayClient() override; | |
37 | |
38 bool Initialize(); | |
39 | |
40 cc::Display* display() { return display_.get(); } | |
41 | |
42 private: | |
43 // DisplayClient implementation. | |
44 void OutputSurfaceLost() override; | |
45 void SetMemoryPolicy(const cc::ManagedMemoryPolicy& policy) override; | |
46 | |
47 std::unique_ptr<cc::OutputSurface> output_surface_; | |
48 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | |
49 std::unique_ptr<cc::Display> display_; | |
50 | |
51 DISALLOW_COPY_AND_ASSIGN(TopLevelDisplayClient); | |
52 }; | |
53 | |
54 } // namespace mus | |
55 | |
56 #endif // COMPONENTS_MUS_SURFACES_TOP_LEVEL_DISPLAY_CLIENT_H_ | |
OLD | NEW |