| 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 "gpu/command_buffer/common/types.h" | 8 #include <stddef.h> |
| 9 #include <stdint.h> |
| 9 | 10 |
| 10 namespace gpu { | 11 namespace gpu { |
| 11 | 12 |
| 12 typedef int32 CommandBufferOffset; | 13 typedef int32_t CommandBufferOffset; |
| 13 const CommandBufferOffset kInvalidCommandBufferOffset = -1; | 14 const CommandBufferOffset kInvalidCommandBufferOffset = -1; |
| 14 | 15 |
| 15 // This enum must stay in sync with NPDeviceContext3DError. | 16 // This enum must stay in sync with NPDeviceContext3DError. |
| 16 namespace error { | 17 namespace error { |
| 17 enum Error { | 18 enum Error { |
| 18 kNoError, | 19 kNoError, |
| 19 kInvalidSize, | 20 kInvalidSize, |
| 20 kOutOfBounds, | 21 kOutOfBounds, |
| 21 kUnknownCommand, | 22 kUnknownCommand, |
| 22 kInvalidArguments, | 23 kInvalidArguments, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 39 kInnocent, | 40 kInnocent, |
| 40 | 41 |
| 41 // It is unknown whether this context provoked the loss of context. | 42 // It is unknown whether this context provoked the loss of context. |
| 42 kUnknown, | 43 kUnknown, |
| 43 kContextLostReasonLast = kUnknown | 44 kContextLostReasonLast = kUnknown |
| 44 }; | 45 }; |
| 45 } | 46 } |
| 46 | 47 |
| 47 // Invalid shared memory Id, returned by RegisterSharedMemory in case of | 48 // Invalid shared memory Id, returned by RegisterSharedMemory in case of |
| 48 // failure. | 49 // failure. |
| 49 const int32 kInvalidSharedMemoryId = -1; | 50 const int32_t kInvalidSharedMemoryId = -1; |
| 50 | 51 |
| 51 // Common Command Buffer shared memory transfer buffer ID. | 52 // Common Command Buffer shared memory transfer buffer ID. |
| 52 const int32 kCommandBufferSharedMemoryId = 4; | 53 const int32_t kCommandBufferSharedMemoryId = 4; |
| 53 | 54 |
| 54 // The size to set for the program cache. | 55 // The size to set for the program cache. |
| 55 const size_t kDefaultMaxProgramCacheMemoryBytes = 6 * 1024 * 1024; | 56 const size_t kDefaultMaxProgramCacheMemoryBytes = 6 * 1024 * 1024; |
| 56 | 57 |
| 57 } // namespace gpu | 58 } // namespace gpu |
| 58 | 59 |
| 59 #endif // GPU_COMMAND_BUFFER_COMMON_CONSTANTS_H_ | 60 #endif // GPU_COMMAND_BUFFER_COMMON_CONSTANTS_H_ |
| OLD | NEW |