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 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 // A failure to make the context current caused it to be lost. | 50 // A failure to make the context current caused it to be lost. |
51 kMakeCurrentFailed, | 51 kMakeCurrentFailed, |
52 | 52 |
53 // The GPU channel was lost. This error is set client-side. | 53 // The GPU channel was lost. This error is set client-side. |
54 kGpuChannelLost, | 54 kGpuChannelLost, |
55 | 55 |
56 // The GPU process sent an invalid message/reply. This error is set | 56 // The GPU process sent an invalid message/reply. This error is set |
57 // client-side. | 57 // client-side. |
58 kInvalidGpuMessage, | 58 kInvalidGpuMessage, |
59 | 59 |
60 kContextLostReasonLast = kGpuChannelLost | 60 kContextLostReasonLast = kInvalidGpuMessage |
61 }; | 61 }; |
62 } | 62 } |
63 | 63 |
64 // Invalid shared memory Id, returned by RegisterSharedMemory in case of | 64 // Invalid shared memory Id, returned by RegisterSharedMemory in case of |
65 // failure. | 65 // failure. |
66 const int32_t kInvalidSharedMemoryId = -1; | 66 const int32_t kInvalidSharedMemoryId = -1; |
67 | 67 |
68 // Common Command Buffer shared memory transfer buffer ID. | 68 // Common Command Buffer shared memory transfer buffer ID. |
69 const int32_t kCommandBufferSharedMemoryId = 4; | 69 const int32_t kCommandBufferSharedMemoryId = 4; |
70 | 70 |
71 // The size to set for the program cache. | 71 // The size to set for the program cache. |
72 const size_t kDefaultMaxProgramCacheMemoryBytes = 6 * 1024 * 1024; | 72 const size_t kDefaultMaxProgramCacheMemoryBytes = 6 * 1024 * 1024; |
73 | 73 |
74 // Namespace used to separate various command buffer types. | 74 // Namespace used to separate various command buffer types. |
75 enum CommandBufferNamespace : int8_t { | 75 enum CommandBufferNamespace : int8_t { |
76 INVALID = -1, | 76 INVALID = -1, |
77 | 77 |
78 GPU_IO, | 78 GPU_IO, |
79 IN_PROCESS, | 79 IN_PROCESS, |
80 MOJO, | 80 MOJO, |
81 MOJO_LOCAL, | 81 MOJO_LOCAL, |
82 | 82 |
83 NUM_COMMAND_BUFFER_NAMESPACES | 83 NUM_COMMAND_BUFFER_NAMESPACES |
84 }; | 84 }; |
85 | 85 |
86 } // namespace gpu | 86 } // namespace gpu |
87 | 87 |
88 #endif // GPU_COMMAND_BUFFER_COMMON_CONSTANTS_H_ | 88 #endif // GPU_COMMAND_BUFFER_COMMON_CONSTANTS_H_ |
OLD | NEW |