| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef GPU_COMMAND_BUFFER_CLIENT_SHARED_MEMORY_LIMITS_H_ | 5 #ifndef GPU_COMMAND_BUFFER_CLIENT_SHARED_MEMORY_LIMITS_H_ |
| 6 #define GPU_COMMAND_BUFFER_CLIENT_SHARED_MEMORY_LIMITS_H_ | 6 #define GPU_COMMAND_BUFFER_CLIENT_SHARED_MEMORY_LIMITS_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 namespace gpu { | 10 namespace gpu { |
| 11 | 11 |
| 12 struct SharedMemoryLimits { | 12 struct SharedMemoryLimits { |
| 13 int32_t command_buffer_size = 1024 * 1024; | 13 int32_t command_buffer_size = 1024 * 1024; |
| 14 uint32_t start_transfer_buffer_size = 1 * 1024 * 1024; | 14 uint32_t start_transfer_buffer_size = 1 * 1024 * 1024; |
| 15 uint32_t min_transfer_buffer_size = 1 * 256 * 1024; | 15 uint32_t min_transfer_buffer_size = 1 * 256 * 1024; |
| 16 uint32_t max_transfer_buffer_size = 16 * 1024 * 1024; | 16 uint32_t max_transfer_buffer_size = 16 * 1024 * 1024; |
| 17 | 17 |
| 18 static constexpr uint32_t kNoLimit = 0; | 18 static constexpr uint32_t kNoLimit = 0; |
| 19 uint32_t mapped_memory_reclaim_limit = kNoLimit; | 19 uint32_t mapped_memory_reclaim_limit = kNoLimit; |
| 20 |
| 21 // These are limits for contexts only used for creating textures, mailboxing |
| 22 // them and dealing with synchronization. |
| 23 static SharedMemoryLimits ForMailboxContext() { |
| 24 SharedMemoryLimits limits; |
| 25 limits.command_buffer_size = 64 * 1024; |
| 26 limits.start_transfer_buffer_size = 64 * 1024; |
| 27 limits.min_transfer_buffer_size = 64 * 1024; |
| 28 return limits; |
| 29 } |
| 20 }; | 30 }; |
| 21 | 31 |
| 22 } // namespace gpu | 32 } // namespace gpu |
| 23 | 33 |
| 24 #endif // GPU_COMMAND_BUFFER_CLIENT_SHARED_MEMORY_LIMITS_H_ | 34 #endif // GPU_COMMAND_BUFFER_CLIENT_SHARED_MEMORY_LIMITS_H_ |
| OLD | NEW |