OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "gpu/ipc/in_process_command_buffer.h" | 5 #include "gpu/ipc/in_process_command_buffer.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <queue> | 10 #include <queue> |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 task_runner(), sync_point_manager_.get(), nullptr, nullptr); | 89 task_runner(), sync_point_manager_.get(), nullptr, nullptr); |
90 } | 90 } |
91 return gpu_thread_service_; | 91 return gpu_thread_service_; |
92 } | 92 } |
93 | 93 |
94 private: | 94 private: |
95 std::unique_ptr<SyncPointManager> sync_point_manager_; | 95 std::unique_ptr<SyncPointManager> sync_point_manager_; |
96 scoped_refptr<InProcessCommandBuffer::Service> gpu_thread_service_; | 96 scoped_refptr<InProcessCommandBuffer::Service> gpu_thread_service_; |
97 }; | 97 }; |
98 | 98 |
99 base::LazyInstance<GpuInProcessThreadHolder> g_default_service = | 99 base::LazyInstance<GpuInProcessThreadHolder>::DestructorAtExit |
100 LAZY_INSTANCE_INITIALIZER; | 100 g_default_service = LAZY_INSTANCE_INITIALIZER; |
101 | 101 |
102 class ScopedEvent { | 102 class ScopedEvent { |
103 public: | 103 public: |
104 explicit ScopedEvent(base::WaitableEvent* event) : event_(event) {} | 104 explicit ScopedEvent(base::WaitableEvent* event) : event_(event) {} |
105 ~ScopedEvent() { event_->Signal(); } | 105 ~ScopedEvent() { event_->Signal(); } |
106 | 106 |
107 private: | 107 private: |
108 base::WaitableEvent* event_; | 108 base::WaitableEvent* event_; |
109 }; | 109 }; |
110 | 110 |
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1119 return wrapped_callback; | 1119 return wrapped_callback; |
1120 } | 1120 } |
1121 | 1121 |
1122 InProcessCommandBuffer::GpuTask::GpuTask(const base::Closure& callback, | 1122 InProcessCommandBuffer::GpuTask::GpuTask(const base::Closure& callback, |
1123 uint32_t order_number) | 1123 uint32_t order_number) |
1124 : callback(callback), order_number(order_number) {} | 1124 : callback(callback), order_number(order_number) {} |
1125 | 1125 |
1126 InProcessCommandBuffer::GpuTask::~GpuTask() {} | 1126 InProcessCommandBuffer::GpuTask::~GpuTask() {} |
1127 | 1127 |
1128 } // namespace gpu | 1128 } // namespace gpu |
OLD | NEW |