Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: content/browser/gpu/browser_gpu_channel_host_factory.cc

Issue 2810593003: gpu: Some cleanups. (Closed)
Patch Set: . Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/gpu_support_stub.cc ('k') | content/browser/gpu/browser_gpu_memory_buffer_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/browser_gpu_channel_host_factory.h" 5 #include "content/browser/gpu/browser_gpu_channel_host_factory.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/profiler/scoped_tracker.h" 10 #include "base/profiler/scoped_tracker.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 gpu_client_tracing_id_(gpu_client_tracing_id), 91 gpu_client_tracing_id_(gpu_client_tracing_id),
92 finished_(false), 92 finished_(false),
93 main_task_runner_(base::ThreadTaskRunnerHandle::Get()) {} 93 main_task_runner_(base::ThreadTaskRunnerHandle::Get()) {}
94 94
95 void BrowserGpuChannelHostFactory::EstablishRequest::EstablishOnIO() { 95 void BrowserGpuChannelHostFactory::EstablishRequest::EstablishOnIO() {
96 // TODO(pkasting): Remove ScopedTracker below once crbug.com/477117 is fixed. 96 // TODO(pkasting): Remove ScopedTracker below once crbug.com/477117 is fixed.
97 tracked_objects::ScopedTracker tracking_profile( 97 tracked_objects::ScopedTracker tracking_profile(
98 FROM_HERE_WITH_EXPLICIT_FUNCTION( 98 FROM_HERE_WITH_EXPLICIT_FUNCTION(
99 "477117 " 99 "477117 "
100 "BrowserGpuChannelHostFactory::EstablishRequest::EstablishOnIO")); 100 "BrowserGpuChannelHostFactory::EstablishRequest::EstablishOnIO"));
101 GpuProcessHost* host = 101 GpuProcessHost* host = GpuProcessHost::Get();
102 GpuProcessHost::Get(GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED);
103 if (!host) { 102 if (!host) {
104 LOG(ERROR) << "Failed to launch GPU process."; 103 LOG(ERROR) << "Failed to launch GPU process.";
105 FinishOnIO(); 104 FinishOnIO();
106 return; 105 return;
107 } 106 }
108 107
109 bool preempts = true; 108 bool preempts = true;
110 bool allow_view_command_buffers = true; 109 bool allow_view_command_buffers = true;
111 bool allow_real_time_streams = true; 110 bool allow_real_time_streams = true;
112 host->EstablishGpuChannel( 111 host->EstablishGpuChannel(
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 } 338 }
340 339
341 // static 340 // static
342 void BrowserGpuChannelHostFactory::InitializeShaderDiskCacheOnIO( 341 void BrowserGpuChannelHostFactory::InitializeShaderDiskCacheOnIO(
343 int gpu_client_id, 342 int gpu_client_id,
344 const base::FilePath& cache_dir) { 343 const base::FilePath& cache_dir) {
345 GetShaderCacheFactorySingleton()->SetCacheInfo(gpu_client_id, cache_dir); 344 GetShaderCacheFactorySingleton()->SetCacheInfo(gpu_client_id, cache_dir);
346 } 345 }
347 346
348 } // namespace content 347 } // namespace content
OLDNEW
« no previous file with comments | « ash/gpu_support_stub.cc ('k') | content/browser/gpu/browser_gpu_memory_buffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698