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

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

Issue 13800013: Disable shader disk cache by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
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/gpu_process_host.h" 5 #include "content/browser/gpu/gpu_process_host.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/base_switches.h" 8 #include "base/base_switches.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 callback.Run(IPC::ChannelHandle(), GPUInfo()); 749 callback.Run(IPC::ChannelHandle(), GPUInfo());
750 return; 750 return;
751 } 751 }
752 752
753 if (Send(new GpuMsg_EstablishChannel(client_id, share_context))) { 753 if (Send(new GpuMsg_EstablishChannel(client_id, share_context))) {
754 channel_requests_.push(callback); 754 channel_requests_.push(callback);
755 } else { 755 } else {
756 callback.Run(IPC::ChannelHandle(), GPUInfo()); 756 callback.Run(IPC::ChannelHandle(), GPUInfo());
757 } 757 }
758 758
759 if (!CommandLine::ForCurrentProcess()->HasSwitch( 759 if (CommandLine::ForCurrentProcess()->HasSwitch(
760 switches::kDisableGpuShaderDiskCache)) { 760 switches::kEnableGpuShaderDiskCache)) {
761 CreateChannelCache(client_id, gpu::kDefaultMaxProgramCacheMemoryBytes); 761 CreateChannelCache(client_id, gpu::kDefaultMaxProgramCacheMemoryBytes);
762 } 762 }
763 } 763 }
764 764
765 void GpuProcessHost::CreateViewCommandBuffer( 765 void GpuProcessHost::CreateViewCommandBuffer(
766 const gfx::GLSurfaceHandle& compositing_surface, 766 const gfx::GLSurfaceHandle& compositing_surface,
767 int surface_id, 767 int surface_id,
768 int client_id, 768 int client_id,
769 const GPUCreateCommandBufferConfig& init_params, 769 const GPUCreateCommandBufferConfig& init_params,
770 const CreateCommandBufferCallback& callback) { 770 const CreateCommandBufferCallback& callback) {
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
1301 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); 1301 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader");
1302 ClientIdToShaderCacheMap::iterator iter = 1302 ClientIdToShaderCacheMap::iterator iter =
1303 client_id_to_shader_cache_.find(client_id); 1303 client_id_to_shader_cache_.find(client_id);
1304 // If the cache doesn't exist then this is an off the record profile. 1304 // If the cache doesn't exist then this is an off the record profile.
1305 if (iter == client_id_to_shader_cache_.end()) 1305 if (iter == client_id_to_shader_cache_.end())
1306 return; 1306 return;
1307 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); 1307 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader);
1308 } 1308 }
1309 1309
1310 } // namespace content 1310 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/chrome_restart_request.cc ('k') | gpu/command_buffer/service/gpu_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698