OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/service/gpu_channel_manager.h" | 5 #include "gpu/ipc/service/gpu_channel_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/command_line.h" | |
12 #include "base/location.h" | 11 #include "base/location.h" |
13 #include "base/single_thread_task_runner.h" | 12 #include "base/single_thread_task_runner.h" |
14 #include "base/thread_task_runner_handle.h" | 13 #include "base/thread_task_runner_handle.h" |
15 #include "build/build_config.h" | 14 #include "build/build_config.h" |
16 #include "gpu/command_buffer/common/sync_token.h" | 15 #include "gpu/command_buffer/common/sync_token.h" |
17 #include "gpu/command_buffer/common/value_state.h" | 16 #include "gpu/command_buffer/common/value_state.h" |
18 #include "gpu/command_buffer/service/feature_info.h" | 17 #include "gpu/command_buffer/service/feature_info.h" |
19 #include "gpu/command_buffer/service/mailbox_manager.h" | 18 #include "gpu/command_buffer/service/mailbox_manager.h" |
20 #include "gpu/command_buffer/service/memory_program_cache.h" | 19 #include "gpu/command_buffer/service/memory_program_cache.h" |
21 #include "gpu/command_buffer/service/shader_translator_cache.h" | 20 #include "gpu/command_buffer/service/shader_translator_cache.h" |
(...skipping 24 matching lines...) Expand all Loading... |
46 GpuChannelManagerDelegate* delegate, | 45 GpuChannelManagerDelegate* delegate, |
47 GpuWatchdog* watchdog, | 46 GpuWatchdog* watchdog, |
48 base::SingleThreadTaskRunner* task_runner, | 47 base::SingleThreadTaskRunner* task_runner, |
49 base::SingleThreadTaskRunner* io_task_runner, | 48 base::SingleThreadTaskRunner* io_task_runner, |
50 base::WaitableEvent* shutdown_event, | 49 base::WaitableEvent* shutdown_event, |
51 SyncPointManager* sync_point_manager, | 50 SyncPointManager* sync_point_manager, |
52 GpuMemoryBufferFactory* gpu_memory_buffer_factory) | 51 GpuMemoryBufferFactory* gpu_memory_buffer_factory) |
53 : task_runner_(task_runner), | 52 : task_runner_(task_runner), |
54 io_task_runner_(io_task_runner), | 53 io_task_runner_(io_task_runner), |
55 gpu_preferences_(gpu_preferences), | 54 gpu_preferences_(gpu_preferences), |
56 gpu_driver_bug_workarounds_(base::CommandLine::ForCurrentProcess()), | |
57 delegate_(delegate), | 55 delegate_(delegate), |
58 watchdog_(watchdog), | 56 watchdog_(watchdog), |
59 shutdown_event_(shutdown_event), | 57 shutdown_event_(shutdown_event), |
60 share_group_(new gfx::GLShareGroup), | 58 share_group_(new gfx::GLShareGroup), |
61 mailbox_manager_(gles2::MailboxManager::Create(gpu_preferences)), | 59 mailbox_manager_(gles2::MailboxManager::Create(gpu_preferences)), |
62 gpu_memory_manager_(this), | 60 gpu_memory_manager_(this), |
63 sync_point_manager_(sync_point_manager), | 61 sync_point_manager_(sync_point_manager), |
64 sync_point_client_waiter_( | 62 sync_point_client_waiter_( |
65 sync_point_manager->CreateSyncPointClientWaiter()), | 63 sync_point_manager->CreateSyncPointClientWaiter()), |
66 gpu_memory_buffer_factory_(gpu_memory_buffer_factory), | 64 gpu_memory_buffer_factory_(gpu_memory_buffer_factory), |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 } | 312 } |
315 } | 313 } |
316 if (!stub || !stub->decoder()->MakeCurrent()) | 314 if (!stub || !stub->decoder()->MakeCurrent()) |
317 return; | 315 return; |
318 glFinish(); | 316 glFinish(); |
319 DidAccessGpu(); | 317 DidAccessGpu(); |
320 } | 318 } |
321 #endif | 319 #endif |
322 | 320 |
323 } // namespace gpu | 321 } // namespace gpu |
OLD | NEW |