OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |