OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/browser/gpu/browser_gpu_memory_buffer_manager.h" | 5 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" |
6 | 6 |
7 #include "base/atomic_sequence_num.h" | 7 #include "base/atomic_sequence_num.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/debug/trace_event.h" | |
10 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
11 #include "base/synchronization/waitable_event.h" | 10 #include "base/synchronization/waitable_event.h" |
12 #include "base/threading/thread_restrictions.h" | 11 #include "base/threading/thread_restrictions.h" |
| 12 #include "base/trace_event/trace_event.h" |
13 #include "content/common/gpu/client/gpu_memory_buffer_factory_host.h" | 13 #include "content/common/gpu/client/gpu_memory_buffer_factory_host.h" |
14 #include "content/common/gpu/client/gpu_memory_buffer_impl.h" | 14 #include "content/common/gpu/client/gpu_memory_buffer_impl.h" |
15 #include "content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h" | 15 #include "content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h" |
16 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
17 | 17 |
18 namespace content { | 18 namespace content { |
19 namespace { | 19 namespace { |
20 | 20 |
21 BrowserGpuMemoryBufferManager* g_gpu_memory_buffer_manager = nullptr; | 21 BrowserGpuMemoryBufferManager* g_gpu_memory_buffer_manager = nullptr; |
22 | 22 |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 DCHECK_NE(handle.type, gfx::SHARED_MEMORY_BUFFER); | 316 DCHECK_NE(handle.type, gfx::SHARED_MEMORY_BUFFER); |
317 | 317 |
318 // Store the type of this buffer so it can be cleaned up if the child | 318 // Store the type of this buffer so it can be cleaned up if the child |
319 // process is removed. | 319 // process is removed. |
320 buffer_it->second = handle.type; | 320 buffer_it->second = handle.type; |
321 | 321 |
322 callback.Run(handle); | 322 callback.Run(handle); |
323 } | 323 } |
324 | 324 |
325 } // namespace content | 325 } // namespace content |
OLD | NEW |