| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_GPU_GPU_CHILD_THREAD_H_ | 5 #ifndef CONTENT_GPU_GPU_CHILD_THREAD_H_ |
| 6 #define CONTENT_GPU_GPU_CHILD_THREAD_H_ | 6 #define CONTENT_GPU_GPU_CHILD_THREAD_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 bool in_browser_process, | 81 bool in_browser_process, |
| 82 const gpu::GPUInfo& gpu_info, | 82 const gpu::GPUInfo& gpu_info, |
| 83 const gpu::GpuFeatureInfo& gpu_feature_info, | 83 const gpu::GpuFeatureInfo& gpu_feature_info, |
| 84 gpu::GpuMemoryBufferFactory* gpu_memory_buffer_factory); | 84 gpu::GpuMemoryBufferFactory* gpu_memory_buffer_factory); |
| 85 | 85 |
| 86 void CreateGpuMainService(ui::mojom::GpuMainAssociatedRequest request); | 86 void CreateGpuMainService(ui::mojom::GpuMainAssociatedRequest request); |
| 87 | 87 |
| 88 // ChildThreadImpl:. | 88 // ChildThreadImpl:. |
| 89 bool Send(IPC::Message* msg) override; | 89 bool Send(IPC::Message* msg) override; |
| 90 bool OnControlMessageReceived(const IPC::Message& msg) override; | 90 bool OnControlMessageReceived(const IPC::Message& msg) override; |
| 91 bool OnMessageReceived(const IPC::Message& msg) override; | |
| 92 | 91 |
| 93 // IPC::Listener implementation via ChildThreadImpl: | 92 // IPC::Listener implementation via ChildThreadImpl: |
| 94 void OnAssociatedInterfaceRequest( | 93 void OnAssociatedInterfaceRequest( |
| 95 const std::string& name, | 94 const std::string& name, |
| 96 mojo::ScopedInterfaceEndpointHandle handle) override; | 95 mojo::ScopedInterfaceEndpointHandle handle) override; |
| 97 | 96 |
| 98 // ui::mojom::GpuMain: | 97 // ui::mojom::GpuMain: |
| 99 void CreateGpuService(ui::mojom::GpuServiceRequest request, | 98 void CreateGpuService(ui::mojom::GpuServiceRequest request, |
| 100 ui::mojom::GpuHostPtr gpu_host, | 99 ui::mojom::GpuHostPtr gpu_host, |
| 101 const gpu::GpuPreferences& preferences, | 100 const gpu::GpuPreferences& preferences, |
| 102 mojo::ScopedSharedBufferHandle activity_flags) override; | 101 mojo::ScopedSharedBufferHandle activity_flags) override; |
| 103 void CreateDisplayCompositor( | 102 void CreateDisplayCompositor( |
| 104 cc::mojom::DisplayCompositorRequest request, | 103 cc::mojom::DisplayCompositorRequest request, |
| 105 cc::mojom::DisplayCompositorClientPtr client) override; | 104 cc::mojom::DisplayCompositorClientPtr client) override; |
| 106 | 105 |
| 107 // base::FieldTrialList::Observer: | 106 // base::FieldTrialList::Observer: |
| 108 void OnFieldTrialGroupFinalized(const std::string& trial_name, | 107 void OnFieldTrialGroupFinalized(const std::string& trial_name, |
| 109 const std::string& group_name) override; | 108 const std::string& group_name) override; |
| 110 | 109 |
| 111 // Message handlers. | 110 // Message handlers. |
| 112 void OnGpuSwitched(); | 111 void OnGpuSwitched(); |
| 113 | 112 |
| 114 void OnDestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, | |
| 115 int client_id, | |
| 116 const gpu::SyncToken& sync_token); | |
| 117 void BindServiceFactoryRequest( | 113 void BindServiceFactoryRequest( |
| 118 service_manager::mojom::ServiceFactoryRequest request); | 114 service_manager::mojom::ServiceFactoryRequest request); |
| 119 | 115 |
| 120 gpu::GpuChannelManager* gpu_channel_manager() { | 116 gpu::GpuChannelManager* gpu_channel_manager() { |
| 121 return gpu_service_->gpu_channel_manager(); | 117 return gpu_service_->gpu_channel_manager(); |
| 122 } | 118 } |
| 123 | 119 |
| 124 // Set this flag to true if a fatal error occurred before we receive the | 120 // Set this flag to true if a fatal error occurred before we receive the |
| 125 // OnInitialize message, in which case we just declare ourselves DOA. | 121 // OnInitialize message, in which case we just declare ourselves DOA. |
| 126 const bool dead_on_arrival_; | 122 const bool dead_on_arrival_; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 141 AssociatedInterfaceRegistryImpl associated_interfaces_; | 137 AssociatedInterfaceRegistryImpl associated_interfaces_; |
| 142 std::unique_ptr<ui::GpuService> gpu_service_; | 138 std::unique_ptr<ui::GpuService> gpu_service_; |
| 143 mojo::AssociatedBinding<ui::mojom::GpuMain> gpu_main_binding_; | 139 mojo::AssociatedBinding<ui::mojom::GpuMain> gpu_main_binding_; |
| 144 | 140 |
| 145 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); | 141 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); |
| 146 }; | 142 }; |
| 147 | 143 |
| 148 } // namespace content | 144 } // namespace content |
| 149 | 145 |
| 150 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ | 146 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ |
| OLD | NEW |