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 <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 ~Display() override; | 60 ~Display() override; |
61 | 61 |
62 bool Initialize(std::unique_ptr<OutputSurface> output_surface, | 62 bool Initialize(std::unique_ptr<OutputSurface> output_surface, |
63 base::SingleThreadTaskRunner* task_runner); | 63 base::SingleThreadTaskRunner* task_runner); |
64 | 64 |
65 // device_scale_factor is used to communicate to the external window system | 65 // device_scale_factor is used to communicate to the external window system |
66 // what scale this was rendered at. | 66 // what scale this was rendered at. |
67 void SetSurfaceId(SurfaceId id, float device_scale_factor); | 67 void SetSurfaceId(SurfaceId id, float device_scale_factor); |
68 void Resize(const gfx::Size& new_size); | 68 void Resize(const gfx::Size& new_size); |
69 void SetExternalClip(const gfx::Rect& clip); | 69 void SetExternalClip(const gfx::Rect& clip); |
| 70 void SetOutputIsSecure(bool secure); |
70 | 71 |
71 SurfaceId CurrentSurfaceId(); | 72 SurfaceId CurrentSurfaceId(); |
72 | 73 |
73 // DisplaySchedulerClient implementation. | 74 // DisplaySchedulerClient implementation. |
74 bool DrawAndSwap() override; | 75 bool DrawAndSwap() override; |
75 | 76 |
76 // OutputSurfaceClient implementation. | 77 // OutputSurfaceClient implementation. |
77 void CommitVSyncParameters(base::TimeTicks timebase, | 78 void CommitVSyncParameters(base::TimeTicks timebase, |
78 base::TimeDelta interval) override {} | 79 base::TimeDelta interval) override {} |
79 void SetBeginFrameSource(BeginFrameSource* source) override; | 80 void SetBeginFrameSource(BeginFrameSource* source) override; |
(...skipping 29 matching lines...) Expand all Loading... |
109 SurfaceManager* surface_manager_; | 110 SurfaceManager* surface_manager_; |
110 SharedBitmapManager* bitmap_manager_; | 111 SharedBitmapManager* bitmap_manager_; |
111 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; | 112 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; |
112 RendererSettings settings_; | 113 RendererSettings settings_; |
113 SurfaceId current_surface_id_; | 114 SurfaceId current_surface_id_; |
114 uint32_t compositor_surface_namespace_; | 115 uint32_t compositor_surface_namespace_; |
115 gfx::Size current_surface_size_; | 116 gfx::Size current_surface_size_; |
116 float device_scale_factor_; | 117 float device_scale_factor_; |
117 bool swapped_since_resize_; | 118 bool swapped_since_resize_; |
118 gfx::Rect external_clip_; | 119 gfx::Rect external_clip_; |
| 120 bool output_is_secure_ = false; |
| 121 |
119 std::unique_ptr<OutputSurface> output_surface_; | 122 std::unique_ptr<OutputSurface> output_surface_; |
120 // An internal synthetic BFS. May be null when not used. | 123 // An internal synthetic BFS. May be null when not used. |
121 std::unique_ptr<BeginFrameSource> internal_begin_frame_source_; | 124 std::unique_ptr<BeginFrameSource> internal_begin_frame_source_; |
122 // The real BFS tied to vsync provided by the BrowserCompositorOutputSurface. | 125 // The real BFS tied to vsync provided by the BrowserCompositorOutputSurface. |
123 BeginFrameSource* vsync_begin_frame_source_; | 126 BeginFrameSource* vsync_begin_frame_source_; |
124 // The current BFS driving the Display/DisplayScheduler. | 127 // The current BFS driving the Display/DisplayScheduler. |
125 BeginFrameSource* observed_begin_frame_source_; | 128 BeginFrameSource* observed_begin_frame_source_; |
126 std::unique_ptr<DisplayScheduler> scheduler_; | 129 std::unique_ptr<DisplayScheduler> scheduler_; |
127 std::unique_ptr<ResourceProvider> resource_provider_; | 130 std::unique_ptr<ResourceProvider> resource_provider_; |
128 std::unique_ptr<SurfaceAggregator> aggregator_; | 131 std::unique_ptr<SurfaceAggregator> aggregator_; |
129 std::unique_ptr<DirectRenderer> renderer_; | 132 std::unique_ptr<DirectRenderer> renderer_; |
130 std::unique_ptr<TextureMailboxDeleter> texture_mailbox_deleter_; | 133 std::unique_ptr<TextureMailboxDeleter> texture_mailbox_deleter_; |
131 std::vector<ui::LatencyInfo> stored_latency_info_; | 134 std::vector<ui::LatencyInfo> stored_latency_info_; |
132 | 135 |
133 private: | 136 private: |
134 DISALLOW_COPY_AND_ASSIGN(Display); | 137 DISALLOW_COPY_AND_ASSIGN(Display); |
135 }; | 138 }; |
136 | 139 |
137 } // namespace cc | 140 } // namespace cc |
138 | 141 |
139 #endif // CC_SURFACES_DISPLAY_H_ | 142 #endif // CC_SURFACES_DISPLAY_H_ |
OLD | NEW |