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

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

Issue 2289553002: gpu: Introduce GpuInit. (Closed)
Patch Set: . Created 4 years, 3 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 | « services/ui/gpu/BUILD.gn ('k') | services/ui/gpu/gpu_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef SERVICES_UI_GPU_GPU_MAIN_H_
6 #define SERVICES_UI_GPU_GPU_MAIN_H_
7
8 #include "gpu/config/gpu_info.h"
9 #include "gpu/ipc/service/gpu_init.h"
10 #include "gpu/ipc/service/gpu_init_delegate.h"
11 #include "services/ui/gpu/interfaces/gpu_service_internal.mojom.h"
12
13 namespace ui {
14
15 class GpuServiceInternal;
16
17 class GpuMain : public gpu::GpuInitDelegate {
18 public:
19 GpuMain();
20 ~GpuMain() override;
21
22 void Add(mojom::GpuServiceInternalRequest request);
23
24 GpuServiceInternal* gpu_service() { return gpu_service_internal_.get(); }
25
26 private:
27 // gpu::GpuInit::Delegate:
28 void OnGpuInfoUpdate(const gpu::GPUInfo& info) override;
29 void OnGpuWatchdogThreadCreated(gpu::GpuWatchdogThread* thread) override;
30 void OnGpuWatchdogThreadDestroyed() override;
31
32 bool ShouldInitializeGL() override;
33 void WaitForDebugger() override;
34 void PreSandboxInitialization() override;
35 bool ShouldStartSandboxEarly() override;
36 void WarmUpSandbox() override;
37 bool StartSandbox() override;
38 void InitializeMessageLoop() override;
39 void Initialize(base::Time start_time,
40 bool dead_on_arrival,
41 std::vector<gpu::GpuInitLogMessage> int_log_messages,
42 gpu::GpuMemoryBufferFactory* gpu_buffer_factory) override;
43
44 std::unique_ptr<GpuServiceInternal> gpu_service_internal_;
45 gpu::GPUInfo gpu_info_;
46 gpu::GpuWatchdogThread* watchdog_thread_ = nullptr;
47 gpu::GpuInit gpu_init_;
48
49 DISALLOW_COPY_AND_ASSIGN(GpuMain);
50 };
51
52 } // namespace ui
53
54 #endif // SERVICES_UI_GPU_GPU_MAIN_H_
OLDNEW
« no previous file with comments | « services/ui/gpu/BUILD.gn ('k') | services/ui/gpu/gpu_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698