Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: content/gpu/gpu_child_thread.h

Issue 2772193006: gpu: Replace GpuMsg_GpuSwitched with mojom api. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/common/gpu_host_messages.h ('k') | content/gpu/gpu_child_thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 bool dead_on_arrival, 80 bool dead_on_arrival,
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;
91 90
92 // IPC::Listener implementation via ChildThreadImpl: 91 // IPC::Listener implementation via ChildThreadImpl:
93 void OnAssociatedInterfaceRequest( 92 void OnAssociatedInterfaceRequest(
94 const std::string& name, 93 const std::string& name,
95 mojo::ScopedInterfaceEndpointHandle handle) override; 94 mojo::ScopedInterfaceEndpointHandle handle) override;
96 95
97 // ui::mojom::GpuMain: 96 // ui::mojom::GpuMain:
98 void CreateGpuService(ui::mojom::GpuServiceRequest request, 97 void CreateGpuService(ui::mojom::GpuServiceRequest request,
99 ui::mojom::GpuHostPtr gpu_host, 98 ui::mojom::GpuHostPtr gpu_host,
100 const gpu::GpuPreferences& preferences, 99 const gpu::GpuPreferences& preferences,
101 mojo::ScopedSharedBufferHandle activity_flags) override; 100 mojo::ScopedSharedBufferHandle activity_flags) override;
102 void CreateDisplayCompositor( 101 void CreateDisplayCompositor(
103 cc::mojom::DisplayCompositorRequest request, 102 cc::mojom::DisplayCompositorRequest request,
104 cc::mojom::DisplayCompositorClientPtr client) override; 103 cc::mojom::DisplayCompositorClientPtr client) override;
105 104
106 // base::FieldTrialList::Observer: 105 // base::FieldTrialList::Observer:
107 void OnFieldTrialGroupFinalized(const std::string& trial_name, 106 void OnFieldTrialGroupFinalized(const std::string& trial_name,
108 const std::string& group_name) override; 107 const std::string& group_name) override;
109 108
110 // Message handlers.
111 void OnGpuSwitched();
112
113 void BindServiceFactoryRequest( 109 void BindServiceFactoryRequest(
114 service_manager::mojom::ServiceFactoryRequest request); 110 service_manager::mojom::ServiceFactoryRequest request);
115 111
116 gpu::GpuChannelManager* gpu_channel_manager() { 112 gpu::GpuChannelManager* gpu_channel_manager() {
117 return gpu_service_->gpu_channel_manager(); 113 return gpu_service_->gpu_channel_manager();
118 } 114 }
119 115
120 // Set this flag to true if a fatal error occurred before we receive the 116 // Set this flag to true if a fatal error occurred before we receive the
121 // OnInitialize message, in which case we just declare ourselves DOA. 117 // OnInitialize message, in which case we just declare ourselves DOA.
122 const bool dead_on_arrival_; 118 const bool dead_on_arrival_;
(...skipping 14 matching lines...) Expand all
137 AssociatedInterfaceRegistryImpl associated_interfaces_; 133 AssociatedInterfaceRegistryImpl associated_interfaces_;
138 std::unique_ptr<ui::GpuService> gpu_service_; 134 std::unique_ptr<ui::GpuService> gpu_service_;
139 mojo::AssociatedBinding<ui::mojom::GpuMain> gpu_main_binding_; 135 mojo::AssociatedBinding<ui::mojom::GpuMain> gpu_main_binding_;
140 136
141 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); 137 DISALLOW_COPY_AND_ASSIGN(GpuChildThread);
142 }; 138 };
143 139
144 } // namespace content 140 } // namespace content
145 141
146 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ 142 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_
OLDNEW
« no previous file with comments | « content/common/gpu_host_messages.h ('k') | content/gpu/gpu_child_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698