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

Side by Side Diff: content/common/gpu/gpu_channel_manager.cc

Issue 803813003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 12 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/common/gpu/gpu_channel_manager.h" 5 #include "content/common/gpu/gpu_channel_manager.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 "content/common/gpu/gpu_channel.h" 9 #include "content/common/gpu/gpu_channel.h"
10 #include "content/common/gpu/gpu_memory_buffer_factory.h" 10 #include "content/common/gpu/gpu_memory_buffer_factory.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 if (default_offscreen_surface_.get()) { 114 if (default_offscreen_surface_.get()) {
115 default_offscreen_surface_->Destroy(); 115 default_offscreen_surface_->Destroy();
116 default_offscreen_surface_ = NULL; 116 default_offscreen_surface_ = NULL;
117 } 117 }
118 } 118 }
119 119
120 gpu::gles2::ProgramCache* GpuChannelManager::program_cache() { 120 gpu::gles2::ProgramCache* GpuChannelManager::program_cache() {
121 if (!program_cache_.get() && 121 if (!program_cache_.get() &&
122 (gfx::g_driver_gl.ext.b_GL_ARB_get_program_binary || 122 (gfx::g_driver_gl.ext.b_GL_ARB_get_program_binary ||
123 gfx::g_driver_gl.ext.b_GL_OES_get_program_binary) && 123 gfx::g_driver_gl.ext.b_GL_OES_get_program_binary) &&
124 !CommandLine::ForCurrentProcess()->HasSwitch( 124 !base::CommandLine::ForCurrentProcess()->HasSwitch(
125 switches::kDisableGpuProgramCache)) { 125 switches::kDisableGpuProgramCache)) {
126 program_cache_.reset(new gpu::gles2::MemoryProgramCache()); 126 program_cache_.reset(new gpu::gles2::MemoryProgramCache());
127 } 127 }
128 return program_cache_.get(); 128 return program_cache_.get();
129 } 129 }
130 130
131 gpu::gles2::ShaderTranslatorCache* 131 gpu::gles2::ShaderTranslatorCache*
132 GpuChannelManager::shader_translator_cache() { 132 GpuChannelManager::shader_translator_cache() {
133 if (!shader_translator_cache_.get()) 133 if (!shader_translator_cache_.get())
134 shader_translator_cache_ = new gpu::gles2::ShaderTranslatorCache; 134 shader_translator_cache_ = new gpu::gles2::ShaderTranslatorCache;
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 OnResourcesRelinquished(); 363 OnResourcesRelinquished();
364 #endif 364 #endif
365 } 365 }
366 } 366 }
367 367
368 void GpuChannelManager::OnResourcesRelinquished() { 368 void GpuChannelManager::OnResourcesRelinquished() {
369 Send(new GpuHostMsg_ResourcesRelinquished()); 369 Send(new GpuHostMsg_ResourcesRelinquished());
370 } 370 }
371 371
372 } // namespace content 372 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc ('k') | content/common/gpu/gpu_command_buffer_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698