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

Side by Side Diff: services/ui/gpu/gpu_service.h

Issue 2814843002: gpu: GPU service scheduler. (Closed)
Patch Set: fix test dcheck failures Created 3 years, 7 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 | « gpu/ipc/service/gpu_command_buffer_stub.cc ('k') | services/ui/gpu/gpu_service.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 SERVICES_UI_GPU_GPU_SERVICE_H_ 5 #ifndef SERVICES_UI_GPU_GPU_SERVICE_H_
6 #define SERVICES_UI_GPU_GPU_SERVICE_H_ 6 #define SERVICES_UI_GPU_GPU_SERVICE_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/synchronization/waitable_event.h" 9 #include "base/synchronization/waitable_event.h"
10 #include "base/task/cancelable_task_tracker.h" 10 #include "base/task/cancelable_task_tracker.h"
(...skipping 11 matching lines...) Expand all
22 #include "gpu/ipc/service/gpu_config.h" 22 #include "gpu/ipc/service/gpu_config.h"
23 #include "gpu/ipc/service/x_util.h" 23 #include "gpu/ipc/service/x_util.h"
24 #include "mojo/public/cpp/bindings/binding_set.h" 24 #include "mojo/public/cpp/bindings/binding_set.h"
25 #include "services/ui/gpu/interfaces/gpu_host.mojom.h" 25 #include "services/ui/gpu/interfaces/gpu_host.mojom.h"
26 #include "services/ui/gpu/interfaces/gpu_service.mojom.h" 26 #include "services/ui/gpu/interfaces/gpu_service.mojom.h"
27 #include "ui/gfx/native_widget_types.h" 27 #include "ui/gfx/native_widget_types.h"
28 28
29 namespace gpu { 29 namespace gpu {
30 class GpuMemoryBufferFactory; 30 class GpuMemoryBufferFactory;
31 class GpuWatchdogThread; 31 class GpuWatchdogThread;
32 class Scheduler;
32 class SyncPointManager; 33 class SyncPointManager;
33 } 34 }
34 35
35 namespace media { 36 namespace media {
36 class MediaGpuChannelManager; 37 class MediaGpuChannelManager;
37 } 38 }
38 39
39 namespace ui { 40 namespace ui {
40 41
41 class GpuMain; 42 class GpuMain;
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 175
175 scoped_refptr<mojom::ThreadSafeGpuHostPtr> gpu_host_; 176 scoped_refptr<mojom::ThreadSafeGpuHostPtr> gpu_host_;
176 std::unique_ptr<gpu::GpuChannelManager> gpu_channel_manager_; 177 std::unique_ptr<gpu::GpuChannelManager> gpu_channel_manager_;
177 std::unique_ptr<media::MediaGpuChannelManager> media_gpu_channel_manager_; 178 std::unique_ptr<media::MediaGpuChannelManager> media_gpu_channel_manager_;
178 179
179 // On some platforms (e.g. android webview), the SyncPointManager comes from 180 // On some platforms (e.g. android webview), the SyncPointManager comes from
180 // external sources. 181 // external sources.
181 std::unique_ptr<gpu::SyncPointManager> owned_sync_point_manager_; 182 std::unique_ptr<gpu::SyncPointManager> owned_sync_point_manager_;
182 gpu::SyncPointManager* sync_point_manager_ = nullptr; 183 gpu::SyncPointManager* sync_point_manager_ = nullptr;
183 184
185 std::unique_ptr<gpu::Scheduler> scheduler_;
186
184 // An event that will be signalled when we shutdown. On some platforms it 187 // An event that will be signalled when we shutdown. On some platforms it
185 // comes from external sources. 188 // comes from external sources.
186 std::unique_ptr<base::WaitableEvent> owned_shutdown_event_; 189 std::unique_ptr<base::WaitableEvent> owned_shutdown_event_;
187 base::WaitableEvent* shutdown_event_ = nullptr; 190 base::WaitableEvent* shutdown_event_ = nullptr;
188 191
189 // Whether this is running in the same process as the gpu host. 192 // Whether this is running in the same process as the gpu host.
190 bool in_host_process_ = false; 193 bool in_host_process_ = false;
191 base::Time start_time_; 194 base::Time start_time_;
192 195
193 // Used to track the task to bind a GpuServiceRequest on the io thread. 196 // Used to track the task to bind a GpuServiceRequest on the io thread.
194 base::CancelableTaskTracker bind_task_tracker_; 197 base::CancelableTaskTracker bind_task_tracker_;
195 std::unique_ptr<mojo::BindingSet<mojom::GpuService>> bindings_; 198 std::unique_ptr<mojo::BindingSet<mojom::GpuService>> bindings_;
196 199
197 base::WeakPtr<GpuService> weak_ptr_; 200 base::WeakPtr<GpuService> weak_ptr_;
198 base::WeakPtrFactory<GpuService> weak_ptr_factory_; 201 base::WeakPtrFactory<GpuService> weak_ptr_factory_;
199 202
200 DISALLOW_COPY_AND_ASSIGN(GpuService); 203 DISALLOW_COPY_AND_ASSIGN(GpuService);
201 }; 204 };
202 205
203 } // namespace ui 206 } // namespace ui
204 207
205 #endif // SERVICES_UI_GPU_GPU_SERVICE_H_ 208 #endif // SERVICES_UI_GPU_GPU_SERVICE_H_
OLDNEW
« no previous file with comments | « gpu/ipc/service/gpu_command_buffer_stub.cc ('k') | services/ui/gpu/gpu_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698