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

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

Issue 2814843002: gpu: GPU service scheduler. (Closed)
Patch Set: rebase 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
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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 173
173 scoped_refptr<mojom::ThreadSafeGpuHostPtr> gpu_host_; 174 scoped_refptr<mojom::ThreadSafeGpuHostPtr> gpu_host_;
174 std::unique_ptr<gpu::GpuChannelManager> gpu_channel_manager_; 175 std::unique_ptr<gpu::GpuChannelManager> gpu_channel_manager_;
175 std::unique_ptr<media::MediaGpuChannelManager> media_gpu_channel_manager_; 176 std::unique_ptr<media::MediaGpuChannelManager> media_gpu_channel_manager_;
176 177
177 // On some platforms (e.g. android webview), the SyncPointManager comes from 178 // On some platforms (e.g. android webview), the SyncPointManager comes from
178 // external sources. 179 // external sources.
179 std::unique_ptr<gpu::SyncPointManager> owned_sync_point_manager_; 180 std::unique_ptr<gpu::SyncPointManager> owned_sync_point_manager_;
180 gpu::SyncPointManager* sync_point_manager_ = nullptr; 181 gpu::SyncPointManager* sync_point_manager_ = nullptr;
181 182
183 std::unique_ptr<gpu::Scheduler> scheduler_;
184
182 // An event that will be signalled when we shutdown. On some platforms it 185 // An event that will be signalled when we shutdown. On some platforms it
183 // comes from external sources. 186 // comes from external sources.
184 std::unique_ptr<base::WaitableEvent> owned_shutdown_event_; 187 std::unique_ptr<base::WaitableEvent> owned_shutdown_event_;
185 base::WaitableEvent* shutdown_event_ = nullptr; 188 base::WaitableEvent* shutdown_event_ = nullptr;
186 189
187 // Whether this is running in the same process as the gpu host. 190 // Whether this is running in the same process as the gpu host.
188 bool in_host_process_ = false; 191 bool in_host_process_ = false;
189 base::Time start_time_; 192 base::Time start_time_;
190 193
191 // Used to track the task to bind a GpuServiceRequest on the io thread. 194 // Used to track the task to bind a GpuServiceRequest on the io thread.
192 base::CancelableTaskTracker bind_task_tracker_; 195 base::CancelableTaskTracker bind_task_tracker_;
193 std::unique_ptr<mojo::BindingSet<mojom::GpuService>> bindings_; 196 std::unique_ptr<mojo::BindingSet<mojom::GpuService>> bindings_;
194 197
195 base::WeakPtr<GpuService> weak_ptr_; 198 base::WeakPtr<GpuService> weak_ptr_;
196 base::WeakPtrFactory<GpuService> weak_ptr_factory_; 199 base::WeakPtrFactory<GpuService> weak_ptr_factory_;
197 200
198 DISALLOW_COPY_AND_ASSIGN(GpuService); 201 DISALLOW_COPY_AND_ASSIGN(GpuService);
199 }; 202 };
200 203
201 } // namespace ui 204 } // namespace ui
202 205
203 #endif // SERVICES_UI_GPU_GPU_SERVICE_H_ 206 #endif // SERVICES_UI_GPU_GPU_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698