| 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_CONTEXT_3D_TRUSTED_DEV_H_ | 5 #ifndef PPAPI_C_DEV_PPB_CONTEXT_3D_TRUSTED_DEV_H_ |
| 6 #define PPAPI_C_DEV_PPB_CONTEXT_3D_TRUSTED_DEV_H_ | 6 #define PPAPI_C_DEV_PPB_CONTEXT_3D_TRUSTED_DEV_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/dev/ppb_context_3d_dev.h" | 8 #include "ppapi/c/dev/ppb_context_3d_dev.h" |
| 9 #include "ppapi/c/pp_bool.h" | 9 #include "ppapi/c/pp_bool.h" |
| 10 #include "ppapi/c/pp_instance.h" | 10 #include "ppapi/c/pp_instance.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 struct PPB_Context3DTrusted_Dev { | 55 struct PPB_Context3DTrusted_Dev { |
| 56 // Creates a raw Context3D resource. A raw Context3D is intended to be used | 56 // Creates a raw Context3D resource. A raw Context3D is intended to be used |
| 57 // with the trusted interface, through the command buffer (for proxying). In | 57 // with the trusted interface, through the command buffer (for proxying). In |
| 58 // particular, when a Surface3D is bound to a raw context, SwapBuffers has no | 58 // particular, when a Surface3D is bound to a raw context, SwapBuffers has no |
| 59 // effect. | 59 // effect. |
| 60 PP_Resource (*CreateRaw)(PP_Instance instance_id, | 60 PP_Resource (*CreateRaw)(PP_Instance instance_id, |
| 61 PP_Config3D_Dev config, | 61 PP_Config3D_Dev config, |
| 62 PP_Resource share_context, | 62 PP_Resource share_context, |
| 63 const int32_t* attrib_list); | 63 const int32_t* attrib_list); |
| 64 | 64 |
| 65 // Initializes the command buffer with the given size. | 65 // Initializes the command buffer. |
| 66 PP_Bool (*Initialize)(PP_Resource context_id, int32_t size); | 66 PP_Bool (*Initialize)(PP_Resource context_id); |
| 67 | |
| 68 // Gets the ring buffer for the command buffer. | |
| 69 PP_Bool (*GetRingBuffer)(PP_Resource context_id, | |
| 70 int* shm_handle, | |
| 71 uint32_t* shm_size); | |
| 72 | 67 |
| 73 // Returns the current state. | 68 // Returns the current state. |
| 74 struct PP_Context3DTrustedState (*GetState)(PP_Resource context); | 69 struct PP_Context3DTrustedState (*GetState)(PP_Resource context); |
| 75 | 70 |
| 76 // The writer calls this to update its put offset. | 71 // The writer calls this to update its put offset. |
| 77 PP_Bool (*Flush)(PP_Resource context, int32_t put_offset); | 72 PP_Bool (*Flush)(PP_Resource context, int32_t put_offset); |
| 78 | 73 |
| 79 | 74 |
| 80 // The writer calls this to update its put offset. This function returns the | 75 // The writer calls this to update its put offset. This function returns the |
| 81 // reader's most recent get offset. Does not return until after the put offset | 76 // reader's most recent get offset. Does not return until after the put offset |
| (...skipping 17 matching lines...) Expand all Loading... |
| 99 // 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 |
| 100 // different than last_known_get. Allows synchronization with the command | 95 // different than last_known_get. Allows synchronization with the command |
| 101 // processor without forcing immediate command execution. | 96 // processor without forcing immediate command execution. |
| 102 struct PP_Context3DTrustedState (*FlushSyncFast)(PP_Resource context, | 97 struct PP_Context3DTrustedState (*FlushSyncFast)(PP_Resource context, |
| 103 int32_t put_offset, | 98 int32_t put_offset, |
| 104 int32_t last_known_get); | 99 int32_t last_known_get); |
| 105 }; | 100 }; |
| 106 | 101 |
| 107 #endif // PPAPI_C_DEV_PPB_CONTEXT_3D_TRUSTED_DEV_H_ | 102 #endif // PPAPI_C_DEV_PPB_CONTEXT_3D_TRUSTED_DEV_H_ |
| 108 | 103 |
| OLD | NEW |