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