| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_COMMON_CONSTANTS_H_ | 5 #ifndef GPU_COMMAND_BUFFER_COMMON_CONSTANTS_H_ |
| 6 #define GPU_COMMAND_BUFFER_COMMON_CONSTANTS_H_ | 6 #define GPU_COMMAND_BUFFER_COMMON_CONSTANTS_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include "build/build_config.h" |
| 12 |
| 11 namespace gpu { | 13 namespace gpu { |
| 12 | 14 |
| 13 typedef int32_t CommandBufferOffset; | 15 typedef int32_t CommandBufferOffset; |
| 14 const CommandBufferOffset kInvalidCommandBufferOffset = -1; | 16 const CommandBufferOffset kInvalidCommandBufferOffset = -1; |
| 15 | 17 |
| 16 namespace error { | 18 namespace error { |
| 17 enum Error { | 19 enum Error { |
| 18 kNoError, | 20 kNoError, |
| 19 kInvalidSize, | 21 kInvalidSize, |
| 20 kOutOfBounds, | 22 kOutOfBounds, |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 }; | 63 }; |
| 62 } | 64 } |
| 63 | 65 |
| 64 // Invalid shared memory Id, returned by RegisterSharedMemory in case of | 66 // Invalid shared memory Id, returned by RegisterSharedMemory in case of |
| 65 // failure. | 67 // failure. |
| 66 const int32_t kInvalidSharedMemoryId = -1; | 68 const int32_t kInvalidSharedMemoryId = -1; |
| 67 | 69 |
| 68 // Common Command Buffer shared memory transfer buffer ID. | 70 // Common Command Buffer shared memory transfer buffer ID. |
| 69 const int32_t kCommandBufferSharedMemoryId = 4; | 71 const int32_t kCommandBufferSharedMemoryId = 4; |
| 70 | 72 |
| 71 // The size to set for the program cache. | 73 // The size to set for the program cache for default and low-end device cases. |
| 74 #if !defined(OS_ANDROID) |
| 72 const size_t kDefaultMaxProgramCacheMemoryBytes = 6 * 1024 * 1024; | 75 const size_t kDefaultMaxProgramCacheMemoryBytes = 6 * 1024 * 1024; |
| 76 #else |
| 77 const size_t kDefaultMaxProgramCacheMemoryBytes = 2 * 1024 * 1024; |
| 78 const size_t kLowEndMaxProgramCacheMemoryBytes = 512 * 1024; |
| 79 #endif |
| 73 | 80 |
| 74 // Namespace used to separate various command buffer types. | 81 // Namespace used to separate various command buffer types. |
| 75 enum CommandBufferNamespace : int8_t { | 82 enum CommandBufferNamespace : int8_t { |
| 76 INVALID = -1, | 83 INVALID = -1, |
| 77 | 84 |
| 78 GPU_IO, | 85 GPU_IO, |
| 79 IN_PROCESS, | 86 IN_PROCESS, |
| 80 MOJO, | 87 MOJO, |
| 81 MOJO_LOCAL, | 88 MOJO_LOCAL, |
| 82 | 89 |
| 83 NUM_COMMAND_BUFFER_NAMESPACES | 90 NUM_COMMAND_BUFFER_NAMESPACES |
| 84 }; | 91 }; |
| 85 | 92 |
| 86 } // namespace gpu | 93 } // namespace gpu |
| 87 | 94 |
| 88 #endif // GPU_COMMAND_BUFFER_COMMON_CONSTANTS_H_ | 95 #endif // GPU_COMMAND_BUFFER_COMMON_CONSTANTS_H_ |
| OLD | NEW |