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

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

Issue 2267163003: Re-enable program memory cache for Adreno 4/5xx (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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
« no previous file with comments | « gpu/config/gpu_driver_bug_workaround_type.h ('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 bool disable_disk_cache =
91 gpu_preferences_.disable_gpu_shader_disk_cache ||
92 gpu_driver_bug_workarounds_.disable_program_disk_cache;
90 program_cache_.reset(new gles2::MemoryProgramCache( 93 program_cache_.reset(new gles2::MemoryProgramCache(
91 gpu_preferences_.gpu_program_cache_size, 94 gpu_preferences_.gpu_program_cache_size, disable_disk_cache));
92 gpu_preferences_.disable_gpu_shader_disk_cache));
93 } 95 }
94 return program_cache_.get(); 96 return program_cache_.get();
95 } 97 }
96 98
97 gles2::ShaderTranslatorCache* 99 gles2::ShaderTranslatorCache*
98 GpuChannelManager::shader_translator_cache() { 100 GpuChannelManager::shader_translator_cache() {
99 if (!shader_translator_cache_.get()) { 101 if (!shader_translator_cache_.get()) {
100 shader_translator_cache_ = 102 shader_translator_cache_ =
101 new gles2::ShaderTranslatorCache(gpu_preferences_); 103 new gles2::ShaderTranslatorCache(gpu_preferences_);
102 } 104 }
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 } 283 }
282 } 284 }
283 if (!stub || !stub->decoder()->MakeCurrent()) 285 if (!stub || !stub->decoder()->MakeCurrent())
284 return; 286 return;
285 glFinish(); 287 glFinish();
286 DidAccessGpu(); 288 DidAccessGpu();
287 } 289 }
288 #endif 290 #endif
289 291
290 } // namespace gpu 292 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/config/gpu_driver_bug_workaround_type.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698