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

Side by Side Diff: gpu/ipc/in_process_command_buffer.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/config/gpu_info_collector_unittest.cc ('k') | gpu/ipc/service/gpu_channel_manager.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/in_process_command_buffer.h" 5 #include "gpu/ipc/in_process_command_buffer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <queue> 10 #include <queue>
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 scoped_refptr<gles2::MailboxManager> 159 scoped_refptr<gles2::MailboxManager>
160 InProcessCommandBuffer::Service::mailbox_manager() { 160 InProcessCommandBuffer::Service::mailbox_manager() {
161 if (!mailbox_manager_.get()) { 161 if (!mailbox_manager_.get()) {
162 mailbox_manager_ = gles2::MailboxManager::Create(gpu_preferences()); 162 mailbox_manager_ = gles2::MailboxManager::Create(gpu_preferences());
163 } 163 }
164 return mailbox_manager_; 164 return mailbox_manager_;
165 } 165 }
166 166
167 gpu::gles2::ProgramCache* InProcessCommandBuffer::Service::program_cache() { 167 gpu::gles2::ProgramCache* InProcessCommandBuffer::Service::program_cache() {
168 if (!program_cache_.get() && 168 if (!program_cache_.get() &&
169 (gl::g_driver_gl.ext.b_GL_ARB_get_program_binary || 169 (gl::g_current_gl_driver->ext.b_GL_ARB_get_program_binary ||
170 gl::g_driver_gl.ext.b_GL_OES_get_program_binary) && 170 gl::g_current_gl_driver->ext.b_GL_OES_get_program_binary) &&
171 !gpu_preferences().disable_gpu_program_cache) { 171 !gpu_preferences().disable_gpu_program_cache) {
172 const GpuDriverBugWorkarounds& workarounds = gpu_driver_bug_workarounds_; 172 const GpuDriverBugWorkarounds& workarounds = gpu_driver_bug_workarounds_;
173 bool disable_disk_cache = 173 bool disable_disk_cache =
174 gpu_preferences_.disable_gpu_shader_disk_cache || 174 gpu_preferences_.disable_gpu_shader_disk_cache ||
175 workarounds.disable_program_disk_cache; 175 workarounds.disable_program_disk_cache;
176 program_cache_.reset(new gles2::MemoryProgramCache( 176 program_cache_.reset(new gles2::MemoryProgramCache(
177 gpu_preferences_.gpu_program_cache_size, 177 gpu_preferences_.gpu_program_cache_size,
178 disable_disk_cache, 178 disable_disk_cache,
179 workarounds.disable_program_caching_for_transform_feedback)); 179 workarounds.disable_program_caching_for_transform_feedback));
180 } 180 }
(...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after
1168 return wrapped_callback; 1168 return wrapped_callback;
1169 } 1169 }
1170 1170
1171 InProcessCommandBuffer::GpuTask::GpuTask(const base::Closure& callback, 1171 InProcessCommandBuffer::GpuTask::GpuTask(const base::Closure& callback,
1172 uint32_t order_number) 1172 uint32_t order_number)
1173 : callback(callback), order_number(order_number) {} 1173 : callback(callback), order_number(order_number) {}
1174 1174
1175 InProcessCommandBuffer::GpuTask::~GpuTask() {} 1175 InProcessCommandBuffer::GpuTask::~GpuTask() {}
1176 1176
1177 } // namespace gpu 1177 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/config/gpu_info_collector_unittest.cc ('k') | gpu/ipc/service/gpu_channel_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698