OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 PPAPI_C_DEV_PPB_GRAPHICS_3D_TRUSTED_DEV_H_ | 5 #ifndef PPAPI_C_TRUSTED_PPB_GRAPHICS_3D_TRUSTED_H_ |
6 #define PPAPI_C_DEV_PPB_GRAPHICS_3D_TRUSTED_DEV_H_ | 6 #define PPAPI_C_TRUSTED_PPB_GRAPHICS_3D_TRUSTED_H_ |
7 | 7 |
8 #include "ppapi/c/pp_bool.h" | 8 #include "ppapi/c/pp_bool.h" |
9 #include "ppapi/c/pp_instance.h" | 9 #include "ppapi/c/pp_instance.h" |
10 #include "ppapi/c/pp_resource.h" | 10 #include "ppapi/c/pp_resource.h" |
11 #include "ppapi/c/pp_stdint.h" | 11 #include "ppapi/c/pp_stdint.h" |
12 | 12 |
13 #define PPB_GRAPHICS_3D_TRUSTED_DEV_INTERFACE_0_1 \ | 13 #define PPB_GRAPHICS_3D_TRUSTED_INTERFACE_0_1 \ |
14 "PPB_Graphics3DTrusted(Dev);0.1" | 14 "PPB_Graphics3DTrusted;0.1" |
15 #define PPB_GRAPHICS_3D_TRUSTED_DEV_INTERFACE \ | 15 #define PPB_GRAPHICS_3D_TRUSTED_INTERFACE \ |
16 PPB_GRAPHICS_3D_TRUSTED_DEV_INTERFACE_0_1 | 16 PPB_GRAPHICS_3D_TRUSTED_INTERFACE_0_1 |
17 | 17 |
18 typedef enum { | 18 typedef enum { |
19 PPB_GRAPHICS3D_TRUSTED_ERROR_OK, | 19 PPB_GRAPHICS3D_TRUSTED_ERROR_OK, |
20 PPB_GRAPHICS3D_TRUSTED_ERROR_GENERICERROR, | 20 PPB_GRAPHICS3D_TRUSTED_ERROR_GENERICERROR, |
21 PPB_GRAPHICS3D_TRUSTED_ERROR_INVALIDARGUMENTS, | 21 PPB_GRAPHICS3D_TRUSTED_ERROR_INVALIDARGUMENTS, |
22 PPB_GRAPHICS3D_TRUSTED_ERROR_INVALIDSIZE, | 22 PPB_GRAPHICS3D_TRUSTED_ERROR_INVALIDSIZE, |
23 PPB_GRAPHICS3D_TRUSTED_ERROR_LOSTCONTEXT, | 23 PPB_GRAPHICS3D_TRUSTED_ERROR_LOSTCONTEXT, |
24 PPB_GRAPHICS3D_TRUSTED_ERROR_OUTOFBOUNDS, | 24 PPB_GRAPHICS3D_TRUSTED_ERROR_OUTOFBOUNDS, |
25 PPB_GRAPHICS3D_TRUSTED_ERROR_UNKNOWNCOMMAND | 25 PPB_GRAPHICS3D_TRUSTED_ERROR_UNKNOWNCOMMAND |
26 } PPB_Graphics3DTrustedError; | 26 } PPB_Graphics3DTrustedError; |
(...skipping 17 matching lines...) Expand all Loading... |
44 | 44 |
45 // Error status. | 45 // Error status. |
46 PPB_Graphics3DTrustedError error; | 46 PPB_Graphics3DTrustedError error; |
47 | 47 |
48 // Generation index of this state. The generation index is incremented every | 48 // Generation index of this state. The generation index is incremented every |
49 // time a new state is retrieved from the command processor, so that | 49 // time a new state is retrieved from the command processor, so that |
50 // consistency can be kept even if IPC messages are processed out-of-order. | 50 // consistency can be kept even if IPC messages are processed out-of-order. |
51 uint32_t generation; | 51 uint32_t generation; |
52 }; | 52 }; |
53 | 53 |
54 struct PPB_Graphics3DTrusted_Dev { | 54 struct PPB_Graphics3DTrusted { |
55 // Creates a raw Graphics3D resource. A raw Graphics3D is intended to be used | 55 // Creates a raw Graphics3D resource. A raw Graphics3D is intended to be used |
56 // with the trusted interface, through the command buffer (for proxying). | 56 // with the trusted interface, through the command buffer (for proxying). |
57 PP_Resource (*CreateRaw)(PP_Instance instance_id, | 57 PP_Resource (*CreateRaw)(PP_Instance instance_id, |
58 PP_Resource share_context, | 58 PP_Resource share_context, |
59 const int32_t* attrib_list); | 59 const int32_t* attrib_list); |
60 | 60 |
61 // Initializes the command buffer with the given size. | 61 // Initializes the command buffer with the given size. |
62 PP_Bool (*InitCommandBuffer)(PP_Resource context_id, int32_t size); | 62 PP_Bool (*InitCommandBuffer)(PP_Resource context_id, int32_t size); |
63 | 63 |
64 // Gets the ring buffer for the command buffer. | 64 // Gets the ring buffer for the command buffer. |
(...skipping 27 matching lines...) Expand all Loading... |
92 int32_t put_offset); | 92 int32_t put_offset); |
93 | 93 |
94 // Like FlushSync, but returns before processing commands if the get offset is | 94 // Like FlushSync, but returns before processing commands if the get offset is |
95 // different than last_known_get. Allows synchronization with the command | 95 // different than last_known_get. Allows synchronization with the command |
96 // processor without forcing immediate command execution. | 96 // processor without forcing immediate command execution. |
97 struct PP_Graphics3DTrustedState (*FlushSyncFast)(PP_Resource context, | 97 struct PP_Graphics3DTrustedState (*FlushSyncFast)(PP_Resource context, |
98 int32_t put_offset, | 98 int32_t put_offset, |
99 int32_t last_known_get); | 99 int32_t last_known_get); |
100 }; | 100 }; |
101 | 101 |
102 #endif // PPAPI_C_DEV_PPB_GRAPHICS_3D_TRUSTED_DEV_H_ | 102 #endif // PPAPI_C_TRUSTED_PPB_GRAPHICS_3D_TRUSTED_H_ |
103 | 103 |
OLD | NEW |