Chromium Code Reviews| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 50 // surface IDs used to draw into the display and deciding when to draw. | 50 // surface IDs used to draw into the display and deciding when to draw. |
| 51 class CC_SURFACES_EXPORT Display : public DisplaySchedulerClient, | 51 class CC_SURFACES_EXPORT Display : public DisplaySchedulerClient, |
| 52 public OutputSurfaceClient, | 52 public OutputSurfaceClient, |
| 53 public SurfaceDamageObserver { | 53 public SurfaceDamageObserver { |
| 54 public: | 54 public: |
| 55 // The |begin_frame_source| and |scheduler| may be null (together). In that | 55 // The |begin_frame_source| and |scheduler| may be null (together). In that |
| 56 // case, DrawAndSwap must be called externally when needed. | 56 // case, DrawAndSwap must be called externally when needed. |
| 57 Display(SharedBitmapManager* bitmap_manager, | 57 Display(SharedBitmapManager* bitmap_manager, |
| 58 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | 58 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, |
| 59 const RendererSettings& settings, | 59 const RendererSettings& settings, |
| 60 std::unique_ptr<BeginFrameSource> begin_frame_source, | 60 BeginFrameSource* begin_frame_source, |
| 61 std::unique_ptr<OutputSurface> output_surface, | 61 std::unique_ptr<OutputSurface> output_surface, |
| 62 std::unique_ptr<DisplayScheduler> scheduler, | 62 std::unique_ptr<DisplayScheduler> scheduler, |
| 63 std::unique_ptr<TextureMailboxDeleter> texture_mailbox_deleter); | 63 std::unique_ptr<TextureMailboxDeleter> texture_mailbox_deleter); |
| 64 | 64 |
| 65 ~Display() override; | 65 ~Display() override; |
| 66 | 66 |
| 67 void Initialize(DisplayClient* client, | 67 void Initialize(DisplayClient* client, |
| 68 SurfaceManager* surface_manager, | 68 SurfaceManager* surface_manager, |
| 69 uint32_t compositor_surface_namespace); | 69 uint32_t compositor_surface_namespace); |
| 70 | 70 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 124 SurfaceId current_surface_id_; | 124 SurfaceId current_surface_id_; |
| 125 gfx::Size current_surface_size_; | 125 gfx::Size current_surface_size_; |
| 126 float device_scale_factor_ = 1.f; | 126 float device_scale_factor_ = 1.f; |
| 127 gfx::ColorSpace device_color_space_; | 127 gfx::ColorSpace device_color_space_; |
| 128 bool visible_ = false; | 128 bool visible_ = false; |
| 129 bool swapped_since_resize_ = false; | 129 bool swapped_since_resize_ = false; |
| 130 gfx::Rect external_clip_; | 130 gfx::Rect external_clip_; |
| 131 gfx::Rect external_viewport_; | 131 gfx::Rect external_viewport_; |
| 132 bool output_is_secure_ = false; | 132 bool output_is_secure_ = false; |
| 133 | 133 |
| 134 // The begin_frame_source_ is often known by the output_surface_ and | 134 // The begin_frame_source_ is often also known by the output_surface_ and the |
| 135 // the scheduler_. | 135 // scheduler_. |
| 136 std::unique_ptr<BeginFrameSource> begin_frame_source_; | 136 BeginFrameSource* begin_frame_source_; |
|
danakj
2016/08/30 01:10:56
can it be a const member maybe up with the bitmap_
| |
| 137 std::unique_ptr<OutputSurface> output_surface_; | 137 std::unique_ptr<OutputSurface> output_surface_; |
| 138 std::unique_ptr<DisplayScheduler> scheduler_; | 138 std::unique_ptr<DisplayScheduler> scheduler_; |
| 139 std::unique_ptr<ResourceProvider> resource_provider_; | 139 std::unique_ptr<ResourceProvider> resource_provider_; |
| 140 std::unique_ptr<SurfaceAggregator> aggregator_; | 140 std::unique_ptr<SurfaceAggregator> aggregator_; |
| 141 std::unique_ptr<TextureMailboxDeleter> texture_mailbox_deleter_; | 141 std::unique_ptr<TextureMailboxDeleter> texture_mailbox_deleter_; |
| 142 std::unique_ptr<DirectRenderer> renderer_; | 142 std::unique_ptr<DirectRenderer> renderer_; |
| 143 SoftwareRenderer* software_renderer_ = nullptr; | 143 SoftwareRenderer* software_renderer_ = nullptr; |
| 144 std::vector<ui::LatencyInfo> stored_latency_info_; | 144 std::vector<ui::LatencyInfo> stored_latency_info_; |
| 145 | 145 |
| 146 private: | 146 private: |
| 147 DISALLOW_COPY_AND_ASSIGN(Display); | 147 DISALLOW_COPY_AND_ASSIGN(Display); |
| 148 }; | 148 }; |
| 149 | 149 |
| 150 } // namespace cc | 150 } // namespace cc |
| 151 | 151 |
| 152 #endif // CC_SURFACES_DISPLAY_H_ | 152 #endif // CC_SURFACES_DISPLAY_H_ |
| OLD | NEW |