OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CC_SURFACES_DISPLAY_H_ | 5 #ifndef CC_SURFACES_DISPLAY_H_ |
6 #define CC_SURFACES_DISPLAY_H_ | 6 #define CC_SURFACES_DISPLAY_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "cc/output/output_surface_client.h" | 9 #include "cc/output/output_surface_client.h" |
10 #include "cc/output/renderer.h" | 10 #include "cc/output/renderer.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 | 34 |
35 // A Display produces a surface that can be used to draw to a physical display | 35 // A Display produces a surface that can be used to draw to a physical display |
36 // (OutputSurface). The client is responsible for creating and sizing the | 36 // (OutputSurface). The client is responsible for creating and sizing the |
37 // surface IDs used to draw into the display and deciding when to draw. | 37 // surface IDs used to draw into the display and deciding when to draw. |
38 class CC_SURFACES_EXPORT Display : public OutputSurfaceClient, | 38 class CC_SURFACES_EXPORT Display : public OutputSurfaceClient, |
39 public RendererClient, | 39 public RendererClient, |
40 public SurfaceDamageObserver { | 40 public SurfaceDamageObserver { |
41 public: | 41 public: |
42 Display(DisplayClient* client, | 42 Display(DisplayClient* client, |
43 SurfaceManager* manager, | 43 SurfaceManager* manager, |
44 SharedBitmapManager* bitmap_manager); | 44 SharedBitmapManager* bitmap_manager, |
| 45 GpuMemoryBufferManager* gpu_memory_buffer_manager); |
45 virtual ~Display(); | 46 virtual ~Display(); |
46 | 47 |
47 bool Initialize(scoped_ptr<OutputSurface> output_surface); | 48 bool Initialize(scoped_ptr<OutputSurface> output_surface); |
48 void Resize(SurfaceId id, const gfx::Size& new_size); | 49 void Resize(SurfaceId id, const gfx::Size& new_size); |
49 bool Draw(); | 50 bool Draw(); |
50 | 51 |
51 SurfaceId CurrentSurfaceId(); | 52 SurfaceId CurrentSurfaceId(); |
52 int GetMaxFramesPending(); | 53 int GetMaxFramesPending(); |
53 | 54 |
54 // OutputSurfaceClient implementation. | 55 // OutputSurfaceClient implementation. |
(...skipping 23 matching lines...) Expand all Loading... |
78 | 79 |
79 // SurfaceDamageObserver implementation. | 80 // SurfaceDamageObserver implementation. |
80 virtual void OnSurfaceDamaged(SurfaceId surface) override; | 81 virtual void OnSurfaceDamaged(SurfaceId surface) override; |
81 | 82 |
82 private: | 83 private: |
83 void InitializeRenderer(); | 84 void InitializeRenderer(); |
84 | 85 |
85 DisplayClient* client_; | 86 DisplayClient* client_; |
86 SurfaceManager* manager_; | 87 SurfaceManager* manager_; |
87 SharedBitmapManager* bitmap_manager_; | 88 SharedBitmapManager* bitmap_manager_; |
| 89 GpuMemoryBufferManager* gpu_memory_buffer_manager_; |
88 SurfaceId current_surface_id_; | 90 SurfaceId current_surface_id_; |
89 gfx::Size current_surface_size_; | 91 gfx::Size current_surface_size_; |
90 LayerTreeSettings settings_; | 92 LayerTreeSettings settings_; |
91 scoped_ptr<OutputSurface> output_surface_; | 93 scoped_ptr<OutputSurface> output_surface_; |
92 scoped_ptr<ResourceProvider> resource_provider_; | 94 scoped_ptr<ResourceProvider> resource_provider_; |
93 scoped_ptr<SurfaceAggregator> aggregator_; | 95 scoped_ptr<SurfaceAggregator> aggregator_; |
94 scoped_ptr<DirectRenderer> renderer_; | 96 scoped_ptr<DirectRenderer> renderer_; |
95 scoped_ptr<BlockingTaskRunner> blocking_main_thread_task_runner_; | 97 scoped_ptr<BlockingTaskRunner> blocking_main_thread_task_runner_; |
96 scoped_ptr<TextureMailboxDeleter> texture_mailbox_deleter_; | 98 scoped_ptr<TextureMailboxDeleter> texture_mailbox_deleter_; |
97 | 99 |
98 DISALLOW_COPY_AND_ASSIGN(Display); | 100 DISALLOW_COPY_AND_ASSIGN(Display); |
99 }; | 101 }; |
100 | 102 |
101 } // namespace cc | 103 } // namespace cc |
102 | 104 |
103 #endif // CC_SURFACES_DISPLAY_H_ | 105 #endif // CC_SURFACES_DISPLAY_H_ |
OLD | NEW |