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

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

Issue 2133833002: gpu::GPUInfo::GPUDevice struct traits (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed unnecessary changes Created 4 years, 5 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_COMMON_GPU_SERVICE_H_ 5 #ifndef SERVICES_UI_COMMON_GPU_SERVICE_H_
6 #define SERVICES_UI_COMMON_GPU_SERVICE_H_ 6 #define SERVICES_UI_COMMON_GPU_SERVICE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 explicit GpuService(shell::Connector* connector); 49 explicit GpuService(shell::Connector* connector);
50 ~GpuService() override; 50 ~GpuService() override;
51 51
52 scoped_refptr<gpu::GpuChannelHost> GetGpuChannelLocked(); 52 scoped_refptr<gpu::GpuChannelHost> GetGpuChannelLocked();
53 void EstablishGpuChannelOnMainThread(); 53 void EstablishGpuChannelOnMainThread();
54 void EstablishGpuChannelOnMainThreadSyncLocked(); 54 void EstablishGpuChannelOnMainThreadSyncLocked();
55 void EstablishGpuChannelOnMainThreadDone( 55 void EstablishGpuChannelOnMainThreadDone(
56 bool locked, 56 bool locked,
57 int client_id, 57 int client_id,
58 mojom::ChannelHandlePtr channel_handle, 58 mojom::ChannelHandlePtr channel_handle,
59 mojom::GpuInfoPtr gpu_info); 59 const gpu::GPUInfo& gpu_info);
60 60
61 // gpu::GpuChannelHostFactory overrides: 61 // gpu::GpuChannelHostFactory overrides:
62 bool IsMainThread() override; 62 bool IsMainThread() override;
63 scoped_refptr<base::SingleThreadTaskRunner> GetIOThreadTaskRunner() override; 63 scoped_refptr<base::SingleThreadTaskRunner> GetIOThreadTaskRunner() override;
64 std::unique_ptr<base::SharedMemory> AllocateSharedMemory( 64 std::unique_ptr<base::SharedMemory> AllocateSharedMemory(
65 size_t size) override; 65 size_t size) override;
66 66
67 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; 67 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
68 shell::Connector* connector_; 68 shell::Connector* connector_;
69 base::WaitableEvent shutdown_event_; 69 base::WaitableEvent shutdown_event_;
70 base::Thread io_thread_; 70 base::Thread io_thread_;
71 std::unique_ptr<MojoGpuMemoryBufferManager> gpu_memory_buffer_manager_; 71 std::unique_ptr<MojoGpuMemoryBufferManager> gpu_memory_buffer_manager_;
72 72
73 // Lock for |gpu_channel_|, |establish_callbacks_| & |is_establishing_|. 73 // Lock for |gpu_channel_|, |establish_callbacks_| & |is_establishing_|.
74 base::Lock lock_; 74 base::Lock lock_;
75 bool is_establishing_; 75 bool is_establishing_;
76 ui::mojom::GpuServicePtr gpu_service_; 76 ui::mojom::GpuServicePtr gpu_service_;
77 scoped_refptr<gpu::GpuChannelHost> gpu_channel_; 77 scoped_refptr<gpu::GpuChannelHost> gpu_channel_;
78 std::vector<base::Closure> establish_callbacks_; 78 std::vector<base::Closure> establish_callbacks_;
79 base::ConditionVariable establishing_condition_; 79 base::ConditionVariable establishing_condition_;
80 80
81 DISALLOW_COPY_AND_ASSIGN(GpuService); 81 DISALLOW_COPY_AND_ASSIGN(GpuService);
82 }; 82 };
83 83
84 } // namespace ui 84 } // namespace ui
85 85
86 #endif // COMPONENTS_MUS_PUBLIC_CPP_LIB_GPU_SERVICE_CONNECTION_H_ 86 #endif // COMPONENTS_MUS_PUBLIC_CPP_LIB_GPU_SERVICE_CONNECTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698