| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 void Initialize(DisplayClient* client, | 69 void Initialize(DisplayClient* client, |
| 70 SurfaceManager* surface_manager, | 70 SurfaceManager* surface_manager, |
| 71 uint32_t compositor_surface_namespace); | 71 uint32_t compositor_surface_namespace); |
| 72 | 72 |
| 73 // device_scale_factor is used to communicate to the external window system | 73 // device_scale_factor is used to communicate to the external window system |
| 74 // what scale this was rendered at. | 74 // what scale this was rendered at. |
| 75 void SetSurfaceId(const SurfaceId& id, float device_scale_factor); | 75 void SetSurfaceId(const SurfaceId& id, float device_scale_factor); |
| 76 void Resize(const gfx::Size& new_size); | 76 void Resize(const gfx::Size& new_size); |
| 77 void SetColorSpace(const gfx::ColorSpace& color_space); | 77 void SetColorSpace(const gfx::ColorSpace& color_space); |
| 78 void SetExternalClip(const gfx::Rect& clip); | 78 void SetExternalClip(const gfx::Rect& clip); |
| 79 void SetExternalViewport(const gfx::Rect& viewport); |
| 79 void SetOutputIsSecure(bool secure); | 80 void SetOutputIsSecure(bool secure); |
| 80 | 81 |
| 81 const SurfaceId& CurrentSurfaceId(); | 82 const SurfaceId& CurrentSurfaceId(); |
| 82 | 83 |
| 83 // DisplaySchedulerClient implementation. | 84 // DisplaySchedulerClient implementation. |
| 84 bool DrawAndSwap() override; | 85 bool DrawAndSwap() override; |
| 85 | 86 |
| 86 // OutputSurfaceClient implementation. | 87 // OutputSurfaceClient implementation. |
| 87 void CommitVSyncParameters(base::TimeTicks timebase, | 88 void CommitVSyncParameters(base::TimeTicks timebase, |
| 88 base::TimeDelta interval) override; | 89 base::TimeDelta interval) override; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 127 |
| 127 DisplayClient* client_; | 128 DisplayClient* client_; |
| 128 SurfaceManager* surface_manager_; | 129 SurfaceManager* surface_manager_; |
| 129 uint32_t compositor_surface_namespace_; | 130 uint32_t compositor_surface_namespace_; |
| 130 SurfaceId current_surface_id_; | 131 SurfaceId current_surface_id_; |
| 131 gfx::Size current_surface_size_; | 132 gfx::Size current_surface_size_; |
| 132 float device_scale_factor_ = 1.f; | 133 float device_scale_factor_ = 1.f; |
| 133 gfx::ColorSpace device_color_space_; | 134 gfx::ColorSpace device_color_space_; |
| 134 bool swapped_since_resize_ = false; | 135 bool swapped_since_resize_ = false; |
| 135 gfx::Rect external_clip_; | 136 gfx::Rect external_clip_; |
| 137 gfx::Rect external_viewport_; |
| 136 gfx::Size enlarge_texture_amount_; | 138 gfx::Size enlarge_texture_amount_; |
| 137 bool output_is_secure_ = false; | 139 bool output_is_secure_ = false; |
| 138 | 140 |
| 139 // The begin_frame_source_ is often known by the output_surface_ and | 141 // The begin_frame_source_ is often known by the output_surface_ and |
| 140 // the scheduler_. | 142 // the scheduler_. |
| 141 std::unique_ptr<BeginFrameSource> begin_frame_source_; | 143 std::unique_ptr<BeginFrameSource> begin_frame_source_; |
| 142 std::unique_ptr<OutputSurface> output_surface_; | 144 std::unique_ptr<OutputSurface> output_surface_; |
| 143 std::unique_ptr<DisplayScheduler> scheduler_; | 145 std::unique_ptr<DisplayScheduler> scheduler_; |
| 144 std::unique_ptr<ResourceProvider> resource_provider_; | 146 std::unique_ptr<ResourceProvider> resource_provider_; |
| 145 std::unique_ptr<SurfaceAggregator> aggregator_; | 147 std::unique_ptr<SurfaceAggregator> aggregator_; |
| 146 std::unique_ptr<TextureMailboxDeleter> texture_mailbox_deleter_; | 148 std::unique_ptr<TextureMailboxDeleter> texture_mailbox_deleter_; |
| 147 std::unique_ptr<DirectRenderer> renderer_; | 149 std::unique_ptr<DirectRenderer> renderer_; |
| 148 SoftwareRenderer* software_renderer_ = nullptr; | 150 SoftwareRenderer* software_renderer_ = nullptr; |
| 149 std::vector<ui::LatencyInfo> stored_latency_info_; | 151 std::vector<ui::LatencyInfo> stored_latency_info_; |
| 150 | 152 |
| 151 private: | 153 private: |
| 152 DISALLOW_COPY_AND_ASSIGN(Display); | 154 DISALLOW_COPY_AND_ASSIGN(Display); |
| 153 }; | 155 }; |
| 154 | 156 |
| 155 } // namespace cc | 157 } // namespace cc |
| 156 | 158 |
| 157 #endif // CC_SURFACES_DISPLAY_H_ | 159 #endif // CC_SURFACES_DISPLAY_H_ |
| OLD | NEW |