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

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

Issue 2629633003: Refactor GL bindings so there is no global GLApi or DriverGL. (Closed)
Patch Set: rebase Created 3 years, 10 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') | gpu/ipc/service/gpu_channel_unittest.cc » ('j') | 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // Destroy channels before anything else because of dependencies. 77 // Destroy channels before anything else because of dependencies.
78 gpu_channels_.clear(); 78 gpu_channels_.clear();
79 if (default_offscreen_surface_.get()) { 79 if (default_offscreen_surface_.get()) {
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 ||
88 gl::g_driver_gl.ext.b_GL_OES_get_program_binary) &&
89 !gpu_preferences_.disable_gpu_program_cache) { 87 !gpu_preferences_.disable_gpu_program_cache) {
90 const GpuDriverBugWorkarounds& workarounds = gpu_driver_bug_workarounds_; 88 const GpuDriverBugWorkarounds& workarounds = gpu_driver_bug_workarounds_;
91 bool disable_disk_cache = 89 bool disable_disk_cache =
92 gpu_preferences_.disable_gpu_shader_disk_cache || 90 gpu_preferences_.disable_gpu_shader_disk_cache ||
93 workarounds.disable_program_disk_cache; 91 workarounds.disable_program_disk_cache;
94 program_cache_.reset(new gles2::MemoryProgramCache( 92 program_cache_.reset(new gles2::MemoryProgramCache(
95 gpu_preferences_.gpu_program_cache_size, 93 gpu_preferences_.gpu_program_cache_size,
96 disable_disk_cache, 94 disable_disk_cache,
97 workarounds.disable_program_caching_for_transform_feedback)); 95 workarounds.disable_program_caching_for_transform_feedback));
98 } 96 }
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 } 284 }
287 } 285 }
288 if (!stub || !stub->decoder()->MakeCurrent()) 286 if (!stub || !stub->decoder()->MakeCurrent())
289 return; 287 return;
290 glFinish(); 288 glFinish();
291 DidAccessGpu(); 289 DidAccessGpu();
292 } 290 }
293 #endif 291 #endif
294 292
295 } // namespace gpu 293 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/ipc/in_process_command_buffer.cc ('k') | gpu/ipc/service/gpu_channel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698