| 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 "content/browser/gpu/gpu_process_host.h" | 5 #include "content/browser/gpu/gpu_process_host.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <list> | 10 #include <list> |
| (...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 ServiceManagerConnection::GetForProcess()->AddConnectionFilter( | 599 ServiceManagerConnection::GetForProcess()->AddConnectionFilter( |
| 600 base::MakeUnique<ConnectionFilterImpl>(this)); | 600 base::MakeUnique<ConnectionFilterImpl>(this)); |
| 601 } | 601 } |
| 602 | 602 |
| 603 process_->GetHost()->CreateChannelMojo(); | 603 process_->GetHost()->CreateChannelMojo(); |
| 604 | 604 |
| 605 gpu::GpuPreferences gpu_preferences = GetGpuPreferencesFromCommandLine(); | 605 gpu::GpuPreferences gpu_preferences = GetGpuPreferencesFromCommandLine(); |
| 606 if (in_process_) { | 606 if (in_process_) { |
| 607 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 607 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 608 DCHECK(GetGpuMainThreadFactory()); | 608 DCHECK(GetGpuMainThreadFactory()); |
| 609 in_process_gpu_thread_.reset(GetGpuMainThreadFactory()( | 609 in_process_gpu_thread_.reset( |
| 610 InProcessChildThreadParams( | 610 GetGpuMainThreadFactory()(InProcessChildThreadParams( |
| 611 base::ThreadTaskRunnerHandle::Get(), | 611 base::ThreadTaskRunnerHandle::Get(), |
| 612 process_->child_connection()->service_token()), | 612 process_->child_connection()->service_token()))); |
| 613 gpu_preferences)); | |
| 614 base::Thread::Options options; | 613 base::Thread::Options options; |
| 615 #if defined(OS_WIN) | 614 #if defined(OS_WIN) |
| 616 // WGL needs to create its own window and pump messages on it. | 615 // WGL needs to create its own window and pump messages on it. |
| 617 options.message_loop_type = base::MessageLoop::TYPE_UI; | 616 options.message_loop_type = base::MessageLoop::TYPE_UI; |
| 618 #endif | 617 #endif |
| 619 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) | 618 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) |
| 620 options.priority = base::ThreadPriority::DISPLAY; | 619 options.priority = base::ThreadPriority::DISPLAY; |
| 621 #endif | 620 #endif |
| 622 in_process_gpu_thread_->StartWithOptions(options); | 621 in_process_gpu_thread_->StartWithOptions(options); |
| 623 | 622 |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1207 GetShaderCacheFactorySingleton()->Get(client_id); | 1206 GetShaderCacheFactorySingleton()->Get(client_id); |
| 1208 if (!cache.get()) | 1207 if (!cache.get()) |
| 1209 return; | 1208 return; |
| 1210 | 1209 |
| 1211 cache->set_shader_loaded_callback(base::Bind(&HostLoadedShader, host_id_)); | 1210 cache->set_shader_loaded_callback(base::Bind(&HostLoadedShader, host_id_)); |
| 1212 | 1211 |
| 1213 client_id_to_shader_cache_[client_id] = cache; | 1212 client_id_to_shader_cache_[client_id] = cache; |
| 1214 } | 1213 } |
| 1215 | 1214 |
| 1216 } // namespace content | 1215 } // namespace content |
| OLD | NEW |