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

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

Issue 1292263003: ipc: Use a global for the process's attachment broker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ipc_message2
Patch Set: Comments from avi. Created 5 years, 3 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
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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 host->CreateViewCommandBuffer( 301 host->CreateViewCommandBuffer(
302 surface, 302 surface,
303 surface_id, 303 surface_id,
304 gpu_client_id_, 304 gpu_client_id_,
305 init_params, 305 init_params,
306 request->route_id, 306 request->route_id,
307 base::Bind(&BrowserGpuChannelHostFactory::CommandBufferCreatedOnIO, 307 base::Bind(&BrowserGpuChannelHostFactory::CommandBufferCreatedOnIO,
308 request)); 308 request));
309 } 309 }
310 310
311 IPC::AttachmentBroker* BrowserGpuChannelHostFactory::GetAttachmentBroker() {
312 return content::ChildProcessHost::GetAttachmentBroker();
313 }
314
315 // static 311 // static
316 void BrowserGpuChannelHostFactory::CommandBufferCreatedOnIO( 312 void BrowserGpuChannelHostFactory::CommandBufferCreatedOnIO(
317 CreateRequest* request, CreateCommandBufferResult result) { 313 CreateRequest* request, CreateCommandBufferResult result) {
318 request->result = result; 314 request->result = result;
319 request->event.Signal(); 315 request->event.Signal();
320 } 316 }
321 317
322 CreateCommandBufferResult BrowserGpuChannelHostFactory::CreateViewCommandBuffer( 318 CreateCommandBufferResult BrowserGpuChannelHostFactory::CreateViewCommandBuffer(
323 int32 surface_id, 319 int32 surface_id,
324 const GPUCreateCommandBufferConfig& init_params, 320 const GPUCreateCommandBufferConfig& init_params,
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 } 432 }
437 433
438 // static 434 // static
439 void BrowserGpuChannelHostFactory::InitializeShaderDiskCacheOnIO( 435 void BrowserGpuChannelHostFactory::InitializeShaderDiskCacheOnIO(
440 int gpu_client_id, 436 int gpu_client_id,
441 const base::FilePath& cache_dir) { 437 const base::FilePath& cache_dir) {
442 ShaderCacheFactory::GetInstance()->SetCacheInfo(gpu_client_id, cache_dir); 438 ShaderCacheFactory::GetInstance()->SetCacheInfo(gpu_client_id, cache_dir);
443 } 439 }
444 440
445 } // namespace content 441 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/browser_gpu_channel_host_factory.h ('k') | content/browser/plugin_data_remover_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698