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

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: 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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 host->CreateViewCommandBuffer( 306 host->CreateViewCommandBuffer(
307 surface, 307 surface,
308 surface_id, 308 surface_id,
309 gpu_client_id_, 309 gpu_client_id_,
310 init_params, 310 init_params,
311 request->route_id, 311 request->route_id,
312 base::Bind(&BrowserGpuChannelHostFactory::CommandBufferCreatedOnIO, 312 base::Bind(&BrowserGpuChannelHostFactory::CommandBufferCreatedOnIO,
313 request)); 313 request));
314 } 314 }
315 315
316 IPC::AttachmentBroker* BrowserGpuChannelHostFactory::GetAttachmentBroker() {
317 return content::ChildProcessHost::GetAttachmentBroker();
318 }
319
320 // static 316 // static
321 void BrowserGpuChannelHostFactory::CommandBufferCreatedOnIO( 317 void BrowserGpuChannelHostFactory::CommandBufferCreatedOnIO(
322 CreateRequest* request, CreateCommandBufferResult result) { 318 CreateRequest* request, CreateCommandBufferResult result) {
323 request->result = result; 319 request->result = result;
324 request->event.Signal(); 320 request->event.Signal();
325 } 321 }
326 322
327 CreateCommandBufferResult BrowserGpuChannelHostFactory::CreateViewCommandBuffer( 323 CreateCommandBufferResult BrowserGpuChannelHostFactory::CreateViewCommandBuffer(
328 int32 surface_id, 324 int32 surface_id,
329 const GPUCreateCommandBufferConfig& init_params, 325 const GPUCreateCommandBufferConfig& init_params,
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 } 436 }
441 437
442 // static 438 // static
443 void BrowserGpuChannelHostFactory::InitializeShaderDiskCacheOnIO( 439 void BrowserGpuChannelHostFactory::InitializeShaderDiskCacheOnIO(
444 int gpu_client_id, 440 int gpu_client_id,
445 const base::FilePath& cache_dir) { 441 const base::FilePath& cache_dir) {
446 ShaderCacheFactory::GetInstance()->SetCacheInfo(gpu_client_id, cache_dir); 442 ShaderCacheFactory::GetInstance()->SetCacheInfo(gpu_client_id, cache_dir);
447 } 443 }
448 444
449 } // namespace content 445 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698