| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 gpu::gles2::ProgramCache* InProcessCommandBuffer::Service::program_cache() { | 164 gpu::gles2::ProgramCache* InProcessCommandBuffer::Service::program_cache() { |
| 165 if (!program_cache_.get() && | 165 if (!program_cache_.get() && |
| 166 (gl::g_current_gl_driver->ext.b_GL_ARB_get_program_binary || | 166 (gl::g_current_gl_driver->ext.b_GL_ARB_get_program_binary || |
| 167 gl::g_current_gl_driver->ext.b_GL_OES_get_program_binary) && | 167 gl::g_current_gl_driver->ext.b_GL_OES_get_program_binary) && |
| 168 !gpu_preferences().disable_gpu_program_cache) { | 168 !gpu_preferences().disable_gpu_program_cache) { |
| 169 const GpuDriverBugWorkarounds& workarounds = gpu_driver_bug_workarounds_; | 169 const GpuDriverBugWorkarounds& workarounds = gpu_driver_bug_workarounds_; |
| 170 bool disable_disk_cache = | 170 bool disable_disk_cache = |
| 171 gpu_preferences_.disable_gpu_shader_disk_cache || | 171 gpu_preferences_.disable_gpu_shader_disk_cache || |
| 172 workarounds.disable_program_disk_cache; | 172 workarounds.disable_program_disk_cache; |
| 173 program_cache_.reset(new gles2::MemoryProgramCache( | 173 program_cache_.reset(new gles2::MemoryProgramCache( |
| 174 gpu_preferences_.gpu_program_cache_size, | 174 gpu_preferences_.gpu_program_cache_size, disable_disk_cache, |
| 175 disable_disk_cache, | 175 workarounds.disable_program_caching_for_transform_feedback, |
| 176 workarounds.disable_program_caching_for_transform_feedback)); | 176 &activity_flags_)); |
| 177 } | 177 } |
| 178 return program_cache_.get(); | 178 return program_cache_.get(); |
| 179 } | 179 } |
| 180 | 180 |
| 181 InProcessCommandBuffer::InProcessCommandBuffer( | 181 InProcessCommandBuffer::InProcessCommandBuffer( |
| 182 const scoped_refptr<Service>& service) | 182 const scoped_refptr<Service>& service) |
| 183 : command_buffer_id_( | 183 : command_buffer_id_( |
| 184 CommandBufferId::FromUnsafeValue(g_next_command_buffer_id.GetNext())), | 184 CommandBufferId::FromUnsafeValue(g_next_command_buffer_id.GetNext())), |
| 185 delayed_work_pending_(false), | 185 delayed_work_pending_(false), |
| 186 image_factory_(nullptr), | 186 image_factory_(nullptr), |
| (...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1119 return wrapped_callback; | 1119 return wrapped_callback; |
| 1120 } | 1120 } |
| 1121 | 1121 |
| 1122 InProcessCommandBuffer::GpuTask::GpuTask(const base::Closure& callback, | 1122 InProcessCommandBuffer::GpuTask::GpuTask(const base::Closure& callback, |
| 1123 uint32_t order_number) | 1123 uint32_t order_number) |
| 1124 : callback(callback), order_number(order_number) {} | 1124 : callback(callback), order_number(order_number) {} |
| 1125 | 1125 |
| 1126 InProcessCommandBuffer::GpuTask::~GpuTask() {} | 1126 InProcessCommandBuffer::GpuTask::~GpuTask() {} |
| 1127 | 1127 |
| 1128 } // namespace gpu | 1128 } // namespace gpu |
| OLD | NEW |