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

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

Issue 2801943002: gpu: Some code 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
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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 FROM_HERE_WITH_EXPLICIT_FUNCTION( 358 FROM_HERE_WITH_EXPLICIT_FUNCTION(
359 "466866 BrowserGpuChannelHostFactory::GpuChannelEstablished2")); 359 "466866 BrowserGpuChannelHostFactory::GpuChannelEstablished2"));
360 360
361 std::vector<gpu::GpuChannelEstablishedCallback> established_callbacks; 361 std::vector<gpu::GpuChannelEstablishedCallback> established_callbacks;
362 established_callbacks_.swap(established_callbacks); 362 established_callbacks_.swap(established_callbacks);
363 for (auto& callback : established_callbacks) 363 for (auto& callback : established_callbacks)
364 callback.Run(gpu_channel_); 364 callback.Run(gpu_channel_);
365 } 365 }
366 366
367 // static 367 // static
368 void BrowserGpuChannelHostFactory::AddFilterOnIO(
369 int host_id,
370 scoped_refptr<IPC::MessageFilter> filter) {
371 DCHECK_CURRENTLY_ON(BrowserThread::IO);
372
373 GpuProcessHost* host = GpuProcessHost::FromID(host_id);
374 if (host)
375 host->AddFilter(filter.get());
piman 2017/04/06 20:51:14 nit: can we remove GpuProcessHost::AddFilter now?
sadrul 2017/04/07 02:16:12 Done.
376 }
377
378 // static
379 void BrowserGpuChannelHostFactory::InitializeShaderDiskCacheOnIO( 368 void BrowserGpuChannelHostFactory::InitializeShaderDiskCacheOnIO(
380 int gpu_client_id, 369 int gpu_client_id,
381 const base::FilePath& cache_dir) { 370 const base::FilePath& cache_dir) {
382 GetShaderCacheFactorySingleton()->SetCacheInfo(gpu_client_id, cache_dir); 371 GetShaderCacheFactorySingleton()->SetCacheInfo(gpu_client_id, cache_dir);
383 } 372 }
384 373
385 } // namespace content 374 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/gpu/gpu_process_host.cc » ('j') | content/browser/gpu/gpu_process_host.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698