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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
68 SurfaceManager* surface_manager, | 68 SurfaceManager* surface_manager, |
69 uint32_t compositor_surface_namespace); | 69 uint32_t compositor_surface_namespace); |
70 | 70 |
71 // device_scale_factor is used to communicate to the external window system | 71 // device_scale_factor is used to communicate to the external window system |
72 // what scale this was rendered at. | 72 // what scale this was rendered at. |
73 void SetSurfaceId(const SurfaceId& id, float device_scale_factor); | 73 void SetSurfaceId(const SurfaceId& id, float device_scale_factor); |
74 void SetVisible(bool visible); | 74 void SetVisible(bool visible); |
75 void Resize(const gfx::Size& new_size); | 75 void Resize(const gfx::Size& new_size); |
76 void SetColorSpace(const gfx::ColorSpace& color_space); | 76 void SetColorSpace(const gfx::ColorSpace& color_space); |
77 void SetExternalClip(const gfx::Rect& clip); | 77 void SetExternalClip(const gfx::Rect& clip); |
78 void SetExternalViewport(const gfx::Rect& viewport); | |
79 void SetOutputIsSecure(bool secure); | 78 void SetOutputIsSecure(bool secure); |
80 | 79 |
81 const SurfaceId& CurrentSurfaceId(); | 80 const SurfaceId& CurrentSurfaceId(); |
82 | 81 |
83 // DisplaySchedulerClient implementation. | 82 // DisplaySchedulerClient implementation. |
84 bool DrawAndSwap() override; | 83 bool DrawAndSwap() override; |
85 | 84 |
86 // OutputSurfaceClient implementation. | 85 // OutputSurfaceClient implementation. |
87 void SetBeginFrameSource(BeginFrameSource* source) override; | 86 void SetBeginFrameSource(BeginFrameSource* source) override; |
88 void SetNeedsRedrawRect(const gfx::Rect& damage_rect) override; | 87 void SetNeedsRedrawRect(const gfx::Rect& damage_rect) override; |
(...skipping 30 matching lines...) Expand all Loading... | |
119 DisplayClient* client_ = nullptr; | 118 DisplayClient* client_ = nullptr; |
120 SurfaceManager* surface_manager_ = nullptr; | 119 SurfaceManager* surface_manager_ = nullptr; |
121 uint32_t compositor_surface_namespace_; | 120 uint32_t compositor_surface_namespace_; |
122 SurfaceId current_surface_id_; | 121 SurfaceId current_surface_id_; |
123 gfx::Size current_surface_size_; | 122 gfx::Size current_surface_size_; |
124 float device_scale_factor_ = 1.f; | 123 float device_scale_factor_ = 1.f; |
125 gfx::ColorSpace device_color_space_; | 124 gfx::ColorSpace device_color_space_; |
126 bool visible_ = false; | 125 bool visible_ = false; |
127 bool swapped_since_resize_ = false; | 126 bool swapped_since_resize_ = false; |
128 gfx::Rect external_clip_; | 127 gfx::Rect external_clip_; |
129 gfx::Rect external_viewport_; | 128 gfx::Rect external_viewport_; |
boliu
2016/09/27 23:20:48
delete this
danakj
2016/09/29 22:55:52
Done.
| |
130 bool output_is_secure_ = false; | 129 bool output_is_secure_ = false; |
131 | 130 |
132 // The begin_frame_source_ is often known by the output_surface_ and | 131 // The begin_frame_source_ is often known by the output_surface_ and |
133 // the scheduler_. | 132 // the scheduler_. |
134 std::unique_ptr<BeginFrameSource> begin_frame_source_; | 133 std::unique_ptr<BeginFrameSource> begin_frame_source_; |
135 std::unique_ptr<OutputSurface> output_surface_; | 134 std::unique_ptr<OutputSurface> output_surface_; |
136 std::unique_ptr<DisplayScheduler> scheduler_; | 135 std::unique_ptr<DisplayScheduler> scheduler_; |
137 std::unique_ptr<ResourceProvider> resource_provider_; | 136 std::unique_ptr<ResourceProvider> resource_provider_; |
138 std::unique_ptr<SurfaceAggregator> aggregator_; | 137 std::unique_ptr<SurfaceAggregator> aggregator_; |
139 std::unique_ptr<TextureMailboxDeleter> texture_mailbox_deleter_; | 138 std::unique_ptr<TextureMailboxDeleter> texture_mailbox_deleter_; |
140 std::unique_ptr<DirectRenderer> renderer_; | 139 std::unique_ptr<DirectRenderer> renderer_; |
141 SoftwareRenderer* software_renderer_ = nullptr; | 140 SoftwareRenderer* software_renderer_ = nullptr; |
142 std::vector<ui::LatencyInfo> stored_latency_info_; | 141 std::vector<ui::LatencyInfo> stored_latency_info_; |
143 | 142 |
144 private: | 143 private: |
145 DISALLOW_COPY_AND_ASSIGN(Display); | 144 DISALLOW_COPY_AND_ASSIGN(Display); |
146 }; | 145 }; |
147 | 146 |
148 } // namespace cc | 147 } // namespace cc |
149 | 148 |
150 #endif // CC_SURFACES_DISPLAY_H_ | 149 #endif // CC_SURFACES_DISPLAY_H_ |
OLD | NEW |