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/command_buffer/service/in_process_command_buffer.h" | 5 #include "gpu/command_buffer/service/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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 mailbox_manager_ = gles2::MailboxManager::Create(gpu_preferences()); | 177 mailbox_manager_ = gles2::MailboxManager::Create(gpu_preferences()); |
178 } | 178 } |
179 return mailbox_manager_; | 179 return mailbox_manager_; |
180 } | 180 } |
181 | 181 |
182 gpu::gles2::ProgramCache* InProcessCommandBuffer::Service::program_cache() { | 182 gpu::gles2::ProgramCache* InProcessCommandBuffer::Service::program_cache() { |
183 if (!program_cache_.get() && | 183 if (!program_cache_.get() && |
184 (gl::g_driver_gl.ext.b_GL_ARB_get_program_binary || | 184 (gl::g_driver_gl.ext.b_GL_ARB_get_program_binary || |
185 gl::g_driver_gl.ext.b_GL_OES_get_program_binary) && | 185 gl::g_driver_gl.ext.b_GL_OES_get_program_binary) && |
186 !gpu_preferences().disable_gpu_program_cache) { | 186 !gpu_preferences().disable_gpu_program_cache) { |
187 program_cache_.reset(new gpu::gles2::MemoryProgramCache( | 187 bool disable_disk_cache = |
188 gpu_preferences().gpu_program_cache_size, | 188 gpu_preferences_.disable_gpu_shader_disk_cache || |
189 gpu_preferences().disable_gpu_shader_disk_cache)); | 189 gpu_driver_bug_workarounds_.disable_program_disk_cache; |
| 190 program_cache_.reset(new gles2::MemoryProgramCache( |
| 191 gpu_preferences_.gpu_program_cache_size, disable_disk_cache)); |
190 } | 192 } |
191 return program_cache_.get(); | 193 return program_cache_.get(); |
192 } | 194 } |
193 | 195 |
194 InProcessCommandBuffer::InProcessCommandBuffer( | 196 InProcessCommandBuffer::InProcessCommandBuffer( |
195 const scoped_refptr<Service>& service) | 197 const scoped_refptr<Service>& service) |
196 : command_buffer_id_( | 198 : command_buffer_id_( |
197 CommandBufferId::FromUnsafeValue(g_next_command_buffer_id.GetNext())), | 199 CommandBufferId::FromUnsafeValue(g_next_command_buffer_id.GetNext())), |
198 delayed_work_pending_(false), | 200 delayed_work_pending_(false), |
199 image_factory_(nullptr), | 201 image_factory_(nullptr), |
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1054 framebuffer_completeness_cache_ = | 1056 framebuffer_completeness_cache_ = |
1055 new gpu::gles2::FramebufferCompletenessCache; | 1057 new gpu::gles2::FramebufferCompletenessCache; |
1056 return framebuffer_completeness_cache_; | 1058 return framebuffer_completeness_cache_; |
1057 } | 1059 } |
1058 | 1060 |
1059 SyncPointManager* GpuInProcessThread::sync_point_manager() { | 1061 SyncPointManager* GpuInProcessThread::sync_point_manager() { |
1060 return sync_point_manager_; | 1062 return sync_point_manager_; |
1061 } | 1063 } |
1062 | 1064 |
1063 } // namespace gpu | 1065 } // namespace gpu |
OLD | NEW |