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

Side by Side Diff: gpu/ipc/service/gpu_channel_manager.cc

Issue 2615573002: Add disable_program_caching_for_transform_feedback workaround. (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « gpu/ipc/in_process_command_buffer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "gpu/ipc/service/gpu_channel_manager.h" 5 #include "gpu/ipc/service/gpu_channel_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 default_offscreen_surface_->Destroy(); 80 default_offscreen_surface_->Destroy();
81 default_offscreen_surface_ = NULL; 81 default_offscreen_surface_ = NULL;
82 } 82 }
83 } 83 }
84 84
85 gles2::ProgramCache* GpuChannelManager::program_cache() { 85 gles2::ProgramCache* GpuChannelManager::program_cache() {
86 if (!program_cache_.get() && 86 if (!program_cache_.get() &&
87 (gl::g_driver_gl.ext.b_GL_ARB_get_program_binary || 87 (gl::g_driver_gl.ext.b_GL_ARB_get_program_binary ||
88 gl::g_driver_gl.ext.b_GL_OES_get_program_binary) && 88 gl::g_driver_gl.ext.b_GL_OES_get_program_binary) &&
89 !gpu_preferences_.disable_gpu_program_cache) { 89 !gpu_preferences_.disable_gpu_program_cache) {
90 const GpuDriverBugWorkarounds& workarounds = gpu_driver_bug_workarounds_;
90 bool disable_disk_cache = 91 bool disable_disk_cache =
91 gpu_preferences_.disable_gpu_shader_disk_cache || 92 gpu_preferences_.disable_gpu_shader_disk_cache ||
92 gpu_driver_bug_workarounds_.disable_program_disk_cache; 93 workarounds.disable_program_disk_cache;
93 program_cache_.reset(new gles2::MemoryProgramCache( 94 program_cache_.reset(new gles2::MemoryProgramCache(
94 gpu_preferences_.gpu_program_cache_size, disable_disk_cache)); 95 gpu_preferences_.gpu_program_cache_size,
96 disable_disk_cache,
97 workarounds.disable_program_caching_for_transform_feedback));
95 } 98 }
96 return program_cache_.get(); 99 return program_cache_.get();
97 } 100 }
98 101
99 gles2::ShaderTranslatorCache* 102 gles2::ShaderTranslatorCache*
100 GpuChannelManager::shader_translator_cache() { 103 GpuChannelManager::shader_translator_cache() {
101 if (!shader_translator_cache_.get()) { 104 if (!shader_translator_cache_.get()) {
102 shader_translator_cache_ = 105 shader_translator_cache_ =
103 new gles2::ShaderTranslatorCache(gpu_preferences_); 106 new gles2::ShaderTranslatorCache(gpu_preferences_);
104 } 107 }
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 } 286 }
284 } 287 }
285 if (!stub || !stub->decoder()->MakeCurrent()) 288 if (!stub || !stub->decoder()->MakeCurrent())
286 return; 289 return;
287 glFinish(); 290 glFinish();
288 DidAccessGpu(); 291 DidAccessGpu();
289 } 292 }
290 #endif 293 #endif
291 294
292 } // namespace gpu 295 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/ipc/in_process_command_buffer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698