| 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 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "cc/output/output_surface_client.h" | 12 #include "cc/output/output_surface_client.h" |
| 13 #include "cc/output/renderer.h" | 13 #include "cc/output/renderer.h" |
| 14 #include "cc/resources/returned_resource.h" | 14 #include "cc/resources/returned_resource.h" |
| 15 #include "cc/scheduler/begin_frame_source.h" | 15 #include "cc/scheduler/begin_frame_source.h" |
| 16 #include "cc/surfaces/display_scheduler.h" | 16 #include "cc/surfaces/display_scheduler.h" |
| 17 #include "cc/surfaces/surface_aggregator.h" | 17 #include "cc/surfaces/surface_aggregator.h" |
| 18 #include "cc/surfaces/surface_id.h" | 18 #include "cc/surfaces/surface_id.h" |
| 19 #include "cc/surfaces/surface_manager.h" | 19 #include "cc/surfaces/surface_manager.h" |
| 20 #include "cc/surfaces/surfaces_export.h" | 20 #include "cc/surfaces/surfaces_export.h" |
| 21 #include "gpu/command_buffer/common/texture_in_use_response.h" | 21 #include "gpu/command_buffer/common/texture_in_use_response.h" |
| 22 #include "ui/events/latency_info.h" | 22 #include "ui/events/latency_info.h" |
| 23 #include "ui/gfx/color_profile.h" |
| 23 | 24 |
| 24 namespace gpu { | 25 namespace gpu { |
| 25 class GpuMemoryBufferManager; | 26 class GpuMemoryBufferManager; |
| 26 } | 27 } |
| 27 | 28 |
| 28 namespace gfx { | 29 namespace gfx { |
| 29 class Size; | 30 class Size; |
| 30 } | 31 } |
| 31 | 32 |
| 32 namespace cc { | 33 namespace cc { |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 std::unique_ptr<TextureMailboxDeleter> texture_mailbox_deleter); | 66 std::unique_ptr<TextureMailboxDeleter> texture_mailbox_deleter); |
| 66 | 67 |
| 67 ~Display() override; | 68 ~Display() override; |
| 68 | 69 |
| 69 void Initialize(DisplayClient* client); | 70 void Initialize(DisplayClient* client); |
| 70 | 71 |
| 71 // device_scale_factor is used to communicate to the external window system | 72 // device_scale_factor is used to communicate to the external window system |
| 72 // what scale this was rendered at. | 73 // what scale this was rendered at. |
| 73 void SetSurfaceId(SurfaceId id, float device_scale_factor); | 74 void SetSurfaceId(SurfaceId id, float device_scale_factor); |
| 74 void Resize(const gfx::Size& new_size); | 75 void Resize(const gfx::Size& new_size); |
| 76 void SetColorProfile(const gfx::ColorProfile& color_profile); |
| 75 void SetExternalClip(const gfx::Rect& clip); | 77 void SetExternalClip(const gfx::Rect& clip); |
| 76 void SetOutputIsSecure(bool secure); | 78 void SetOutputIsSecure(bool secure); |
| 77 | 79 |
| 78 SurfaceId CurrentSurfaceId(); | 80 SurfaceId CurrentSurfaceId(); |
| 79 | 81 |
| 80 // DisplaySchedulerClient implementation. | 82 // DisplaySchedulerClient implementation. |
| 81 bool DrawAndSwap() override; | 83 bool DrawAndSwap() override; |
| 82 | 84 |
| 83 // OutputSurfaceClient implementation. | 85 // OutputSurfaceClient implementation. |
| 84 void CommitVSyncParameters(base::TimeTicks timebase, | 86 void CommitVSyncParameters(base::TimeTicks timebase, |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 | 120 |
| 119 DisplayClient* client_; | 121 DisplayClient* client_; |
| 120 SurfaceManager* surface_manager_; | 122 SurfaceManager* surface_manager_; |
| 121 SharedBitmapManager* bitmap_manager_; | 123 SharedBitmapManager* bitmap_manager_; |
| 122 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; | 124 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; |
| 123 RendererSettings settings_; | 125 RendererSettings settings_; |
| 124 SurfaceId current_surface_id_; | 126 SurfaceId current_surface_id_; |
| 125 uint32_t compositor_surface_namespace_; | 127 uint32_t compositor_surface_namespace_; |
| 126 gfx::Size current_surface_size_; | 128 gfx::Size current_surface_size_; |
| 127 float device_scale_factor_ = 1.f; | 129 float device_scale_factor_ = 1.f; |
| 130 gfx::ColorProfile device_color_profile_; |
| 128 bool swapped_since_resize_ = false; | 131 bool swapped_since_resize_ = false; |
| 129 gfx::Rect external_clip_; | 132 gfx::Rect external_clip_; |
| 130 gfx::Size enlarge_texture_amount_; | 133 gfx::Size enlarge_texture_amount_; |
| 131 bool output_is_secure_ = false; | 134 bool output_is_secure_ = false; |
| 132 | 135 |
| 133 // The begin_frame_source_ is often known by the output_surface_ and | 136 // The begin_frame_source_ is often known by the output_surface_ and |
| 134 // the scheduler_. | 137 // the scheduler_. |
| 135 std::unique_ptr<BeginFrameSource> begin_frame_source_; | 138 std::unique_ptr<BeginFrameSource> begin_frame_source_; |
| 136 std::unique_ptr<OutputSurface> output_surface_; | 139 std::unique_ptr<OutputSurface> output_surface_; |
| 137 std::unique_ptr<DisplayScheduler> scheduler_; | 140 std::unique_ptr<DisplayScheduler> scheduler_; |
| 138 std::unique_ptr<ResourceProvider> resource_provider_; | 141 std::unique_ptr<ResourceProvider> resource_provider_; |
| 139 std::unique_ptr<SurfaceAggregator> aggregator_; | 142 std::unique_ptr<SurfaceAggregator> aggregator_; |
| 140 std::unique_ptr<TextureMailboxDeleter> texture_mailbox_deleter_; | 143 std::unique_ptr<TextureMailboxDeleter> texture_mailbox_deleter_; |
| 141 std::unique_ptr<DirectRenderer> renderer_; | 144 std::unique_ptr<DirectRenderer> renderer_; |
| 142 std::vector<ui::LatencyInfo> stored_latency_info_; | 145 std::vector<ui::LatencyInfo> stored_latency_info_; |
| 143 | 146 |
| 144 private: | 147 private: |
| 145 DISALLOW_COPY_AND_ASSIGN(Display); | 148 DISALLOW_COPY_AND_ASSIGN(Display); |
| 146 }; | 149 }; |
| 147 | 150 |
| 148 } // namespace cc | 151 } // namespace cc |
| 149 | 152 |
| 150 #endif // CC_SURFACES_DISPLAY_H_ | 153 #endif // CC_SURFACES_DISPLAY_H_ |
| OLD | NEW |